space-game: default Shift boost never matches because shiftKey is treated as a modifier #1032

Closed
opened 2026-08-13 04:48:14 +00:00 by spikerj · 1 comment
Owner

Default boost binding is currentKey: "Shift" with no modifiers. onKeyDown always passes shift: event.shiftKey, and a Shift keydown has shiftKey === true. KeybindingManager.matchesKeybinding then rejects the press because !!modifiers.shift !== !!kbMods.shift.

Result: the default Shift boost never engages (or releases) through the real keyboard path.

Repro: space-game, press Shift — isBoostActive stays false.

Fix options:

  • Store modifiers: { shift: true } on the boost binding, or
  • When the bound key itself is Shift/Control/Alt/Meta, do not treat that key's own modifier bit as an extra required modifier.

Caught by space-game.component.logic.spec.ts (Wave 7 a2).

Default boost binding is `currentKey: "Shift"` with no `modifiers`. `onKeyDown` always passes `shift: event.shiftKey`, and a Shift keydown has `shiftKey === true`. `KeybindingManager.matchesKeybinding` then rejects the press because `!!modifiers.shift !== !!kbMods.shift`. Result: the default Shift boost never engages (or releases) through the real keyboard path. Repro: space-game, press Shift — `isBoostActive` stays false. Fix options: - Store `modifiers: { shift: true }` on the boost binding, or - When the bound key itself is Shift/Control/Alt/Meta, do not treat that key's own modifier bit as an extra required modifier. Caught by `space-game.component.logic.spec.ts` (Wave 7 a2).
Author
Owner

Fixed in spikersoft-angular PR #823 (a0f0ccd9). Closing.

Fixed in `spikersoft-angular` [PR #823](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/823) (`a0f0ccd9`). Closing.
Sign in to join this conversation.