admin管理员组文章数量:1188999
I've created a basic extension for Google Chrome to change the behavior of which tab is selected when you close a tab so that the selected tab is the last one you had selected instead of just the one before the tab you closed.
I want to add keyboard shortcuts, and I've found a way to do that using jquery and jquery hotkeys, but the problem I'm finding is that the keyboard shortcuts only work once a page is loaded. So for example, if you open a new tab without going anywhere, the shortcut keys don't work because the javascript only loads when a page is on the screen. Same problem if you have the extensions page open in a tab.
Does anyone know of a better way to do keyboard shortcuts in Chrome extensions? I've been looking through the extensions documentation, but I haven't found anything that looks promising.
I've created a basic extension for Google Chrome to change the behavior of which tab is selected when you close a tab so that the selected tab is the last one you had selected instead of just the one before the tab you closed.
I want to add keyboard shortcuts, and I've found a way to do that using jquery and jquery hotkeys, but the problem I'm finding is that the keyboard shortcuts only work once a page is loaded. So for example, if you open a new tab without going anywhere, the shortcut keys don't work because the javascript only loads when a page is on the screen. Same problem if you have the extensions page open in a tab.
Does anyone know of a better way to do keyboard shortcuts in Chrome extensions? I've been looking through the extensions documentation, but I haven't found anything that looks promising.
Share Improve this question asked Jan 22, 2010 at 4:56 mmrobinsmmrobins 13.8k8 gold badges43 silver badges43 bronze badges 04 Answers
Reset to default 13Unfortunately there's no way to hook into global hotkeys. The best you can do is add a window event keypress listener.
Source: a Chromium developer post on the chromium-extensions group.
Just as an update it's actually being developed now:
http://developer.chrome.com/trunk/apps/commands.html
Keyboard shortcuts are implemented with chrome.commands in Chrome 25 and above: developer.chrome.com/apps/commands.html.
Google Shortcut key like from readrwrite site GOOGLE CHROME SHORTCUTS Shortcut Function Ctrl + O To open any data/file in internet search engines Ctrl + N To open new internet window not tab Ctrl + Shift + N To open new internet window with black background Ctrl + T To open new tab Ctrl + F4 To close the open tab Ctrl + W To close the internet search engine read more and explore all about chrome shortcuts
本文标签: javascriptKeyboard Shortcuts in Google ChromeChromium ExtensionsStack Overflow
版权声明:本文标题:javascript - Keyboard Shortcuts in Google ChromeChromium Extensions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738375931a2083370.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论