Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am not really a coder at all, but I am a huge fan of Admin2 (+Rubik). I am not sure how hard something like this would be to do, but is there a way to add a keyboard shortcut for admin? I use F12 to get into Firebug and would love to assign a shortcut to Admin to expand the menu. Again, this may be totally not possible, but thought I would ask.
This is an awesome module, thanks for all the hard work.
Comment | File | Size | Author |
---|---|---|---|
#6 | admin-hotkey-728832-6.patch | 12.04 KB | muhleder |
#2 | admin-hotkey.patch | 20.12 KB | ronan |
Comments
Comment #1
yhahn CreditAttribution: yhahn commentedSwitching versions.
Comment #2
ronan CreditAttribution: ronan commentedHere's a patch that adds basic keybindings to the admin toolbar. It uses the jquery.hotkeys plugin http://code.google.com/p/js-hotkeys/ which is added in this patch.
The patch creates a hotkey to activate the toolbar (alt/ctrl-space by default) and allows you to navigate the various tabs and menu items with the tab key (to switch tabs) and arrow keys (to navigate the menu trees) and the return key to activate.
It's pretty basic, it only deals with the basic menus (you can't switch users, or activate the devel 'Other tools' for example) but it works. Also, there's no automatic scrolling of lists that overflow (so if you key down to a link past the bottom of the visible area you can't see it). Tested in Safari 4 (mac), Firefox 3.6 (mac) and IE 6/7/8.
Let me know what you think.
Comment #3
ronan CreditAttribution: ronan commentedOh, another point. If the page loads with the toolbar already active the key control is not active (because that would override users' tab and arrow keys unexpectedly) so in this case the first use of the hotkey activates the key control rather than toggling the toolbar. This is not necessarily obvious when you first use the module so some sort of visual feedback to indicate that the keyboard control has been activated might be useful. I'm probably not the best person to determine what that feedback should be though.
Comment #4
RockSoup CreditAttribution: RockSoup commentedAwesome!
Comment #5
sepla CreditAttribution: sepla commentedI second this.
Comment #6
muhleder CreditAttribution: muhleder commentedI'd also love to see this.
Here's a patch against 7.x-2.0-beta3
Only change from the D6 patch is updating the jquery hotkeys library.
Comment #7
mgiffordInteresting. There are some real advantages to adding this, but also risks.
The link in the code should go to:
https://github.com/tzuryby/jquery.hotkeys
The link in the patch is broken.
I've asked a question about making this user configurable:
https://github.com/tzuryby/jquery.hotkeys/issues/14
There's also a discussion about the general issue from an accessibility point of view here:
http://drupal.org/node/23628
This would be very good if it were user configurable.
Comment #8
muhleder CreditAttribution: muhleder commentedI think this should be user configurable, I'm seeing a checkbox 'Enable Keyboard Control' at
/admin/config/user-interface/admin
(D7 version)
The 6.x version does include the jquery.hotkeys.js library which contains outdated links. My thoughts are that the library should be installed in /sites/all/libraries.
The jresig version of the library seems to work with Drupal 7.
Comment #9
muhleder CreditAttribution: muhleder commentedAlso might be worth looking at https://github.com/madrobby/keymaster instead of the jquery dependendent hotkeys library. We have jquery with Drupal of course, but it makes us dependent upon jquery version.
Comment #10
mgiffordI couldn't get keymaster to work in the test environment. Not sure if it's how I've got FF configured or what.
From the docs it's not clear that there can be user defined pages or links. It looked really good, but I'm not sure how it will work with this particular request.
It looks very interesting though...