Last modified: 2014-02-24 22:19:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 27493 - Add jQuery.hotkeys plugin for hooking keyboard events
Add jQuery.hotkeys plugin for hooking keyboard events
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Michael Dale
: javascript
Depends on:
  Show dependency treegraph
Reported: 2011-02-17 10:37 UTC by Helder
Modified: 2014-02-24 22:19 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Helder 2011-02-17 10:37:27 UTC

Could you add this plugin to /resources/jquery, so that it can be used as a module? E.g.:

mw.loader.using( 'jquery.hotkeys', function() {
  // Some code...
} );
Comment 1 Helder 2011-07-01 14:31:20 UTC
Any updates on this?
Comment 2 Helder 2011-08-12 14:05:33 UTC
Does anyone knows if there is any reason to not add this plugin?
Comment 3 Krinkle 2012-08-29 01:27:25 UTC
For one, we need to decide which one to use.

The one linked in the bug is a fork of jeresig[1], but that is a 3-year old fork of a repository where he made 2 commits to fix a jquery 1.4.2 bug.

We probably want to use the original instead which has been maintained throughout the years and was last updated 3 months ago for jQuery 1.7.1.

And the original includes John Resig's changes (


Though there's a change in tzuryby's version. It uses namespaces to pass on which key to listen for. So instead of:
 $(el).on( 'keypress', 'esc', fn );
 $(el).on( 'keypress', { key: 'esc' }, fn );

it now uses:
 $(el).on( 'keypress.esc', fn );

That seems rather cripple in my opinion, not sure why anyone would want that or why they changed it.
Comment 4 Andre Klapper 2014-02-24 22:19:07 UTC
[Removing "easy" keyword as the solution is not clear - see comment 3]

Note You need to log in before you can comment on or make changes to this bug.