New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for keyup/keydown for .on() events #5734
Comments
Hey, I would be happy to take this first issue:) If it's still open |
Hi, I've just submitted a PR (#6421) adding the requested feature. |
* Added support for 'keydown' and 'keyup' events, as requested in issue #5734 * Added tests for 'keydown', 'keypress' and 'keyup' events binding and constified the key codes used in the test file
hi. I use the keypress event, but it just doesn't work when I press ctrl key. The disadvantage of using alphabetic and numeric keys. |
That's exactly why we enabled binding |
I do not need this. I want to turn Drawing mode on and off by pressing a key. |
I see. It's not Leaflet that puts this limit - Ctrl key just doesn't trigger the |
* Added support for 'keydown' and 'keyup' events, as requested in issue Leaflet#5734 * Added tests for 'keydown', 'keypress' and 'keyup' events binding and constified the key codes used in the test file
How to reproduce
What behaviour I'm expecting and which behaviour I'm seeing
Because keypress doesn't register inputs that don't render characters, keypress doesn't work for things like backspace or escape.
Minimal example reproducing the issue
The text was updated successfully, but these errors were encountered: