diff --git a/game.js b/game.js index 515133b..8a75706 100644 --- a/game.js +++ b/game.js @@ -666,10 +666,13 @@ class Game { keys.forEach((k, i) => k.style.outline = i === c ? '2px solid #f8c030' : ''); } - if (justPressed(0)) { /* A — select letter */ - keys[this._gpKeyCursor]?.click(); + if (justPressed(0) || justPressed(1)) { /* A or B — select highlighted letter */ + const key = keys[this._gpKeyCursor]; + if (key) { + key.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true, isPrimary: true })); + } } - if (justPressed(1) || justPressed(2)) { /* B or X — delete */ + if (justPressed(2)) { /* X — delete */ this.delChar(); } if (justPressed(9) || justPressed(8)) { /* Start or Select — confirm name */