Keypress icon indicating copy to clipboard operation
Keypress copied to clipboard

is there a way to capture a key combo?

Open mreinstein opened this issue 10 years ago • 2 comments

I'm wondering if there's a way to do something like

listener.captureNextCombo(function(combo){
  console.log ('captured combo:', combo);
});

which would print something like:

captured combo: cmd-s

mreinstein avatar Jan 25 '15 00:01 mreinstein

the use case is building the key binding system for a game and capturing the key sequence to bind to that action.

mreinstein avatar Jan 25 '15 00:01 mreinstein

There isn't currently any way to do that with Keypress. Sorry :(

dmauro avatar Jan 25 '15 16:01 dmauro