I'm trying to make an extension and which uses chrome.contextMenu
. I create a contextMenu element and it works fine, but now I'm wondering if it is possible to add a keyboard shortcut to my element? I've looked through the documentation but could not find anything. Thanks!
Sadly, no. There is an open feature request for it from 2012.
Issue 142840 in chromium: Add "shortcut" property to chrome.contextMenus API
Reported by [email protected], Aug 15, 2012
For native-like experience it should be possible to specify shortcut text for each menu item. E.g. if you create "Copy" menu item then there should be also "Ctrl+C" shortcut text shown next to it.
Proposed API:
chrome.contextMenus.create({ title: 'Copy', shortcut: 'Ctrl+C', id: 'copy', contexts: ['all'] });
also see How can I display keyboard shortcuts to the context menu options created by my chrome extension?
I would also love to see a way to underline one of the letters in a custom context menu listing for ALT access but that appears to also be unsupported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With