-
Notifications
You must be signed in to change notification settings - Fork 0
jimo1001/js-lib-keybinds
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
the script is a simple JavaScript library for keyboard shortcut. the keybinds is a factory class of Keybind[s](shortcutkey[s]) Usage: - add Keybind(Control+y) keybinds.add(element, 'C-y', function (event, [object Keybind]) { ... }, false) .add(element, 'C-x', function (event, [object Keybind]) { ... }, false); - remove Keybind keybinds.remove([object Keybind]); or keybinds.removeByKey('C-y'); or keybinds.removeByKey('C-y', element); - get key var textform = document.getElementById('text-form'); keybinds.getKey(textform, function(key, event) { ... }); - get Keybinds - all keybinds var keybinds = keybinds.getKeybinds(); - by key var keybinds = keybinds.getKeybinds('C-y'); - by element var keybinds = keybinds.getKeybinds(window); - by key and element var keybinds = keybinds.getKeybinds('C-y', window);
About
JavaScript Libraries
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published