Modifier keys combined with normal keys
See original GitHub issueI am looking for key handler library and this one seems to be very promising 😃
Maybe it’s not supported or I am doing something wrong but this is not working (same for Shift):
whenipress("Alt", "s")
.then(() => console.log("press alt+s"))
.whenReleased(() => console.log("release alt+s"));
It’s only triggered once or not at all and the release hook is never triggered. I am using a Macbook Pro.
codesandbox: https://codesandbox.io/s/focused-forest-vdg1l?file=/src/index.js
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Modifier key - Wikipedia
In computing, a modifier key is a special key (or combination) on a computer keyboard that temporarily modifies the normal action of another...
Read more >Change the behavior of the modifier keys on Mac
Change the behavior of the modifier keys on Mac · On your Mac, choose Apple menu > System Settings, then click Keyboard in...
Read more >Your PC Keyboard's Modifier Keys - Dummies.com
Four keys on your keyboard are modifier keys. A modifier key works in combination with other keys to do various interesting and unbelievable ......
Read more >Use normal keys as modifier keys, e.g. press S and F together ...
Base keys are all keyboard keys except modifier keys. Luckily there is a trick. ... If yes, we send our new key combination...
Read more >Modifier Keys - the Tcler's Wiki!
A binding with Modifier Alt is overridden by a binding with Modifier Option, Mod2, or M2. When the Modifier key is pressed, two...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually @moklick further to this, ignore my previous comment.
It doesn’t work because alt modifies the S key. You can use the key code instead:
This site is super useful for this kind of stuff: https://keycode.info
Thanks! I wasn’t aware that it’s possible to pass the code as well.