Skip to content

Commit

Permalink
Specify that bindings react only to press events
Browse files Browse the repository at this point in the history
  • Loading branch information
pihart committed Jun 9, 2021
1 parent 868b4d5 commit 629a724
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export default class KeyboardHandler {

/**
* Creates a keyboard.js binding from the key combination {@param key} to the action {@param action},
* writing to `localStorage` if {@param save}
* writing to `localStorage` if {@param save}.
* The binding reacts only to the `press` event and not the `release` event.
*/
bind = (key: string, action: Action, save = true): void => {
this.keyMap[key] = action;
Expand Down

0 comments on commit 629a724

Please sign in to comment.