资 源 简 介
Description
Hotkeys.js is a Prototype plugin for binding custom hotkeys and keyboard shortcuts.
Features
Lightweight - 3.8 KB minified
Cross-browser - Tested on Internet Explorer 6+, Firefox 2+, Google Chrome
Browser-integrated
It can bind and overwrite keyboard shortcuts already registered by the browser (like CTRL+S)
When the focus is inside input fields or textareas it doesn"t interfere
Usage
Download hotkeys.js or hotkeys-min.js
Include the script in your page, after the Prototype library:
Bind any combination of keys:
Hotkeys.bind(combination, function, [param1, param2, etc]);