piranha / keymage

Yet Another JS Keybinding library
ISC License
332 stars 31 forks source link

Make bindings for blessed #11

Open dbkaplun opened 8 years ago

dbkaplun commented 8 years ago

Hey, nice library! It would be really cool if I could use this with chjj/blessed, which as you may know is a TUI library like ncurses. Is there any way to change the key listener backend to something other than the browser?

piranha commented 8 years ago

Well, I'm not opposed to this idea, but it's not exactly my focus. If you want to play with it, I guess checking for availability window.addEventListener or binding on something similar to keydown in chjj/blessed (it seems there is only keypress? Should work fine though) should be the way to go.

So yeah, I'm willing to accept pull request if it won't make keymage significantly bigger. :) I don't think it should, most of keymage just deals with pressed key and not with some browser stuff, so adding support for blessing should be pretty straightforward.