Added keyboard support for enter and backspace
This commit is contained in:
parent
cfe313c9a3
commit
5cb44dd17e
3 changed files with 33 additions and 3 deletions
|
|
@ -19,7 +19,7 @@
|
|||
<div data-controller="keyboard"
|
||||
data-keyboard-playfield-outlet=".playfield"
|
||||
data-action="
|
||||
keypress@window->keyboard#onKeyPress
|
||||
keydown@window->keyboard#onKeyPress
|
||||
guessResults@window->keyboard#colorizeKeys
|
||||
resetKeyColors@window->keyboard#resetKeyColors
|
||||
">
|
||||
|
|
@ -54,6 +54,8 @@
|
|||
<button data-keyboard-target="key" data-action="keyboard#tappedKey" data-key="b">b</button>
|
||||
<button data-keyboard-target="key" data-action="keyboard#tappedKey" data-key="n">n</button>
|
||||
<button data-keyboard-target="key" data-action="keyboard#tappedKey" data-key="m">m</button>
|
||||
<button data-keyboard-target="key" data-action="keyboard#tapEnter">enter</button>
|
||||
<button data-keyboard-target="key" data-action="keyboard#tapBackspace">back</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue