Open hackergrrl opened 10 years ago
It would be swell if vkey could map in both directions: both keyCode->string but also string->keyCode. To minimally modify the existing API (a map), the string entries could just be added to said existing map.
:+1:
Also see keycode https://github.com/timoxley/keycode/blob/master/index.js
keycode
You can get this behavior pretty easily by composing this module with invert-hash:
https://www.npmjs.org/package/invert-hash
It would be swell if vkey could map in both directions: both keyCode->string but also string->keyCode. To minimally modify the existing API (a map), the string entries could just be added to said existing map.