It seems to be a recurrent tricky question but I still don't have a fix nor workaround for it:
Is there a way to intercept accesskeys before keyboard shortcuts?
I need to use accesskeys on my favorites navigator IE and also FF, but I don't wan't to consider existing shortkeys as reserved. Otherwise it doesn't leave a lot of possibilities (currently I only use numbers).
Note: by accesskey, I mean the accesskey
html attribute.
Any idea ? Flash apps can do it, so what about JavaScript ?
<button onclick="alert('Hello');" accesskey="F">Alt+F to activate</button>
When I try to activate it I just open File menu :'(
John Resig (the creator of jQuery) has been working on a "hotkey" addon for jQuery which should do what you are looking for.
https://github.com/jeresig/jquery.hotkeys
I know this isn't a 'jQuery question', and adding a framework for something 'small' isn't ideal, but it should offer a solution. On the other hand, you can always look over how he did it for inspiration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With