Reputation: 2249
Evt is a SyntheticEvent here:
handleEnterPress(evt){
if(evt.ctrlKey){
doSomething();
}
//..
}
Apparently ⌘+enter does not set evt.ctrlKey here? How do I catch those events then?
Upvotes: 0
Views: 218
Reputation: 9979
Check out the reference for KeyboardEvent on MDN
event.metaKey
is probably the event you're after. Check out the example at the bottom of the page linked above.
Upvotes: 1