MapKey: jQuery for Keyboard shortcuts
pixelmatrixdesign.com
MapKey: jQuery for Keyboard shortcuts
1–10 of 11 posts
Re: MapKey: jQuery for Keyboard shortcuts
#2 shortcut.add("Up",function() {
// code to go up
});Re: MapKey: jQuery for Keyboard shortcuts
#3Re: MapKey: jQuery for Keyboard shortcuts
#4Is there any reliable way that works in modern browsers (Firefox, Chrome, Safari) of capturing all the key events on a page, outside of using something like jquery.hotkeys and just doing:
$(document).bind("keyup", "delete", function() { });
Is $(window) better? Some other element I'm not thinking of?
Re: MapKey: jQuery for Keyboard shortcuts
#5I've been struggling with this for a little bit. I have a web application that I'm developing that needs to support keyboard shortcuts. It's basically a giant SVG element on the page with a toolbar at the top, and some popup windows. The problem seems to be always capturing the keys. As long as the user interacts with the SVG element, everything is fine. However, if they move their mouse over the navigation bar (for…
Just in case someone comes across this later on Google.
Re: MapKey: jQuery for Keyboard shortcuts
#6Re: MapKey: jQuery for Keyboard shortcuts
#7For this reason, I'd still far prefer console applications rather than a browser, despite the rendering advantages you get with a browser.
With a console app, you can easily get to a point where it will always work the same, regardless of the platform your user is on.
Keyboard interaction should be a more important part of desktop computer usage than it is in these modern wimpy systems we use. The state of the browser is the main driver of this.
Re: MapKey: jQuery for Keyboard shortcuts
#8Re: MapKey: jQuery for Keyboard shortcuts
#9I'm not a javascript or jquery guru but from what I can tell it's still not possible to reliably grab all keyboard characters within a browser. Browsers will hijack many combinations - backspace key (some browsers change depending where your mouse is), alt+f, etc. And they're inconsistent in what they grab. For this reason, I'd still far prefer console applications rather than a browser, despite the rendering advanta…
Re: MapKey: jQuery for Keyboard shortcuts
#10This seems neat, but would there be any reason for using this over something like jquery.hotkeys? https://github.com/jeresig/jquery.hotkeys
More advanced stuff
This plugin is meant to be a very light one. If you need to do more advanced things, I suggest trying jeresig’s plugin jQuery.hotkeys. That can handle things like key combinations and more