react-keydown icon indicating copy to clipboard operation
react-keydown copied to clipboard

Key library incomplete

Open glortho opened this issue 10 years ago • 5 comments

Not all key codes have string equivalents in keys.js.

glortho avatar Oct 11 '15 18:10 glortho

I miss :

  • minus (109)
  • plus (107)

It is otherwise not possible to make combinaison ('meta + 107'), am I right ?

lpillonel avatar Feb 23 '18 09:02 lpillonel

@lpillonel We should have minus - in there as an option but I show 189 for that https://github.com/glortho/react-keydown/blob/master/src/lib/keys.js#L25.

As for plus + are you able to do shift + =?

glortho avatar Feb 23 '18 14:02 glortho

It might work, but I have a swiss french keyboard (I'm developing an app for swiss market...).

the key - (the dash) on swiss keyboard produces a code 189, but ctrl + - produces a code 191 😞 . And the plus is shift + 1 with swiss layout...

What I actually want is to use the plus / minus from the numeric keypad

lpillonel avatar Feb 23 '18 14:02 lpillonel

Okay what do you like as an api for this @lpillonel ?

@keydown( 'shift + 191' )Keys.set( '-', 189 )keydown.setLocale( 'SM' ) • some combination of the above...

glortho avatar Mar 04 '18 18:03 glortho

Hi, I also miss '*' (asterisk) key which is used in tree view accessibility.

brumik avatar Nov 21 '18 10:11 brumik