Examples use event.metaKey to capture ctrlKey, but on Windows this does not work
See original GitHub issueOn Windows event.metaKey is false when using the Ctrl
key. This leads to the plugin examples not working on Windows and the same for any other code copying this method: https://docs.slatejs.org/walkthroughs/using-plugins
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
KeyboardEvent.metaKey - Web APIs | MDN
The KeyboardEvent.metaKey read-only property returning a boolean value that indicates if the Meta key was pressed (true) or not (false) when ...
Read more >How does one capture a Mac's command key via JavaScript?
It seems that event.metaKey works in the current versions of Safari, Firefox and Chrome like a charm. IMO it is much clear solution....
Read more >#3368 (event.metaKey should be assigned to event.ctrlKey on ...
metaKey = event.ctrlKey;. This is causing a buggy behavior in the following scenario: A user wish to bind ctrl+x to function-A and command ......
Read more >Detect ctrl/cmd/alt/shift + Click in Vanilla JavaScript, React and ...
All of metaKey , ctrlKey , altKey and shiftKey are booleans, ... command/windows (meta), alt and shift click detection is the following:.
Read more >Javascript Keyboard Events for multiple Operating Systems
The ctrlKey property of the event does indeed map to the ctrl key in ... The metaKey property does not seem to work...
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 Free
Top 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
Yep no worries!
event.ctrlKey
works as expected on Macs as well so I think we’re all set.Correct, but on Mac it’s the Command Key (the Clover), which is used in place of Ctrl in Mac often if I’m not mistaken, for example Command+C to copy instead of Ctrl+C. Someone correct me if I’m wrong.