chrisdickinson / vkey

map ev.keyCode to human names
82 stars 6 forks source link

vkey as bi-directional map #4

Open hackergrrl opened 10 years ago

hackergrrl commented 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.

Raynos commented 10 years ago

:+1:

Also see keycode https://github.com/timoxley/keycode/blob/master/index.js

mikolalysenko commented 10 years ago

You can get this behavior pretty easily by composing this module with invert-hash:

https://www.npmjs.org/package/invert-hash