Skip to content

Commit

Permalink
sim: Update keybinds (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
JerwuQu authored Apr 11, 2024
1 parent 216457b commit 4fbf6b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ Simulate your badge on the interwebz.

## Controls

- Escape: open menu
- WASD/Arrow Keys + Shift: 4 direction pad + click
- Space: start
- Enter: select
- Joystick: Arrow keys/WASD
- Joystick click: Shift
- A: Z/K
- B: X/J
- Start: Enter/Y
- Select: Backspace/T
- Open system menu: Escape

## Supported Hardware Components

Expand Down
8 changes: 4 additions & 4 deletions simulator/src/ui/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ export class App extends LitElement {

let mask = 0;
switch (event.code) {
case "Space":
case "Enter": case "KeyY":
mask |= constants.CONTROLS_START;
break;
case "Enter":
case "Backspace": case "KeyT":
mask |= constants.CONTROLS_SELECT;
break;
case "KeyQ":
case "KeyZ": case "KeyK":
mask |= constants.CONTROLS_A;
break;
case "KeyE":
case "KeyX": case "KeyJ":
mask |= constants.CONTROLS_B;
break;
case "ShiftLeft": case "ShiftRight":
Expand Down

0 comments on commit 4fbf6b9

Please sign in to comment.