key-emitter

1.4.1 • Public • Published

key emitter

minor snippet to react to key stroke

Arrow key

For every key down or key up operation, it will trigger a change event. Enter key will trigger commit event;

For change handler, it will receive a next index value;

for commit handler, it will receive a current triggered index value.

options

max

It's requried, which will indicate the max index value on key down or key up.

Readme

Keywords

none

Package Sidebar

Install

npm i key-emitter

Weekly Downloads

1

Version

1.4.1

License

MIT

Last publish

Collaborators

  • ryuyutyo