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!
Adding keyboard shortcut to context menu for Google Chrome extensions?
4.8k Views Asked by gimmian At
2
There are 2 best solutions below
0
D_S_toowhite
On
One workaround is you can create commands and assign shortcut keys. You can make the context menu item and the command trigger the same functionality.
https://developer.chrome.com/docs/extensions/reference/commands/
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in GOOGLE-CHROME
- detect requests calls in a url similar to network in chrome dev tools
- Html File Input on Chrome for Android missing extension and mime type
- Angular multiple http requests chrome android
- Interact with chrome bookmarks outside of extensions
- Animation Blink not working properly on Chrome
- Can't use subdomain in Chrome using Apache (XAMPP)
- How to start Chrome Hosted App in window?
- Webpage - Font size of table items on mobile phone browsers changes
- Could Not Instantiate Mail Function - PHPMailer - With Attachments - Only Google Chrome
- Chrome print preview disable only link location in footer and header
- CSS spinner sequence not working smoothly in iOS Chrome?
- google chrome remove automatically td when it is not in table and tr
- selecting and using textPath elements in Chrome
- Can I create and publish extension to the Chrome Store from my website?
- How can I get a button on the side of a text box to be perfectly aligned all the time?
Related Questions in GOOGLE-CHROME-EXTENSION
- detect requests calls in a url similar to network in chrome dev tools
- How to get chrome extension ID in dev and production?
- Can I create and publish extension to the Chrome Store from my website?
- webkitMediaStream Object Type lost while using sendMessage in Chrome Extension
- Send sqlresult from background to content script
- Adding eventListeners to checkboxes in for loop in chrome-extension
- Is it possible for chrome to nest tabs within a tab?
- JQuery .find() failing on an .ajax() result
- Chrome Extensions - Copy Link Google Search
- Why my color customized theme isn't working? (PC)
- chrome extensions Uncaught ReferenceError: $ is not defined
- Are there any Chrome-specific techniques to scope/isolate CSS?
- Can Chrome extension content script access all tabs?
- How to register service workers to a redirected script URL
- My Chrome Extension Keeps Saying Its Corrupted
Related Questions in CONTEXTMENU
- ContextMenu Closes Immediately
- Android toolbar context menu for listview items
- WPF: get my object after ListView context menu right click instead of item index
- Add paste item to windows right click menu in c#
- how to unbind/prevent context menu by keyboard (key #93) with FF?
- Angularjs - context menu on a table cell
- Why does Source for ContextMenuOpening behave differently for Canvas and UserControl?
- How can i reference a MenuItem?
- Disable/Enable context menu item depending on listview item
- Does Firefox not support the oncontextmenu event on SVG (JS without frameworks)?
- Context Menu ShortcutKeys do not work C#
- Git -- QuickEdit on Command Line?
- preventDefault on mouse up
- Add item above "Project" in eclipse project explorer contextmenu
- Bring up CAB with a short click
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Sadly, no. There is an open feature request for it from 2012.
Issue 142840 in chromium: Add "shortcut" property to chrome.contextMenus API
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.