Started working on keyboard input

This commit is contained in:
Leon Mika 2025-01-22 22:15:24 +11:00
parent 11f658afcc
commit cfe313c9a3
2 changed files with 15 additions and 1 deletions

View file

@ -18,7 +18,11 @@
<div data-controller="keyboard"
data-keyboard-playfield-outlet=".playfield"
data-action="guessResults@window->keyboard#colorizeKeys resetKeyColors@window->keyboard#resetKeyColors">
data-action="
keypress@window->keyboard#onKeyPress
guessResults@window->keyboard#colorizeKeys
resetKeyColors@window->keyboard#resetKeyColors
">
<div>
<button data-keyboard-target="key" data-action="keyboard#tappedKey" data-key="q">q</button>
<button data-keyboard-target="key" data-action="keyboard#tappedKey" data-key="w">w</button>