Recommend this page to a friend! |
Classes of Jorge Castro | Gentelella BladeOne | vendors/jquery.hotkeys/README.md | Download |
|
DownloadjQuery.HotkeysAboutjQuery Hotkeys is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination. This plugin is based off of the plugin by Tzury Bar Yochay: jQuery.hotkeys The syntax is as follows:
Syntax when wanting to use jQuery's
ExampleEvent TypesSupported types are jQuery CompatibilityWorks with jQuery 1.4.2 and newer. It is known to be working with all the major browsers on all available platforms (Win/Mac/Linux) * IE 6/7/8+ * FF 1.5/2/3+ * Opera-9+ * Safari-3+ * Chrome-0.2+ Browserify CompatibilityIf you want to include this module in a Browserified project, just add it to node_modules and require it.
This will work if jQuery is global (ex. served from a CDN). If it's not, you need to shim it:
NotesModifiers are not case sensitive ( If you want to use more than one modifier (e.g. Hotkeys aren't tracked if you're inside of an input element (unless you explicitly bind the hotkey directly to the input). This helps to avoid conflict with normal user typing. You can use namespacing by adding a suffix to the event type (e.g. Hotkeys within inputsHotkeys aren't tracked if the user is focused within an input element or any element that has * Meta and Hyper KeysMeta and hyper keys don't register on Chrome 33.0.1750.117Meta key registers on Firefox 27.0.1 and Safari 7.0.1Meta key registers on Opera 19.0Meta key doesn't register at all :(
Hyper key registers on TL;DRBind to AddendumFirefox is the most liberal one in the manner of letting you capture all short-cuts even those that are built-in in the browser such as Others, (IE) either let you handle built-in short-cuts, but will add their functionality after your code has executed. Or (Opera/Safari) will not pass those events to the DOM at all. So, if you bind |