Keyboard control for a dealer working on a laptop #27

Merged
jheaps merged 1 commits from feature/casino-holdem-keyboard into feature/casino-holdem-action-undo 2026-08-31 23:34:55 -06:00
Owner

The phone got gestures a few rounds back; the desktop still had a mouse and nothing else. On a bar that gets tapped thirty times a hand, moving a hand to the trackpad between every decision is the slow part — so this is the desktop half of the same idea.

F folds · C checks or calls · R opens the raise pad · A shoves · Enter confirms a raise or moves the hand on · Esc backs out · U takes the last action back.

Each button wears its key in the corner, hidden on touch devices where it would just be clutter on a button being tapped anyway.

The shortcuts press the same buttons a dealer would tap rather than calling the betting engine themselves. There is no second code path to drift out of step with what the bar is offering — if a button is not on screen, its key does nothing, automatically.

Validation (Playwright, headed — real key presses, not synthetic events)

  • A hand driven entirely from the keyboard: c called for Ann (pot $3 → $5), f folded Ben, r opened the raise pad with Min/½ pot/Pot/All-in, Esc closed it, a then Enter shoved Cass all-in (stack → 0, currentBet → 200, pot $204), u undid the shove completely (stack back to 199, currentBet back to 2, pot back to $5).
  • The guard that matters: typing Francesca into a seat name — four separate shortcut letters — changed nothing. No fold, no raise pad, acting player and pot untouched.
  • Overlay guard: with the card picker open, f folded nobody and the picker stayed up.
  • Badges: F/C/R render on the buttons, and the (hover: none) rule that hides them on touch was asserted against the loaded stylesheet rather than assumed.
  • No console errors.

Based on feature/casino-holdem-action-undo (PR #26) — merge order #22 → #23 → #24 → #25 → #26 → this.

The phone got gestures a few rounds back; the desktop still had a mouse and nothing else. On a bar that gets tapped thirty times a hand, moving a hand to the trackpad between every decision is the slow part — so this is the desktop half of the same idea. **F** folds · **C** checks or calls · **R** opens the raise pad · **A** shoves · **Enter** confirms a raise or moves the hand on · **Esc** backs out · **U** takes the last action back. Each button wears its key in the corner, hidden on touch devices where it would just be clutter on a button being tapped anyway. **The shortcuts press the same buttons a dealer would tap** rather than calling the betting engine themselves. There is no second code path to drift out of step with what the bar is offering — if a button is not on screen, its key does nothing, automatically. ## Validation (Playwright, headed — real key presses, not synthetic events) - **A hand driven entirely from the keyboard**: `c` called for Ann (pot $3 → $5), `f` folded Ben, `r` opened the raise pad with Min/½ pot/Pot/All-in, `Esc` closed it, `a` then `Enter` shoved Cass all-in (stack → 0, currentBet → 200, pot $204), `u` undid the shove completely (stack back to 199, currentBet back to 2, pot back to $5). - **The guard that matters**: typing `Francesca` into a seat name — four separate shortcut letters — changed nothing. No fold, no raise pad, acting player and pot untouched. - **Overlay guard**: with the card picker open, `f` folded nobody and the picker stayed up. - **Badges**: F/C/R render on the buttons, and the `(hover: none)` rule that hides them on touch was asserted against the loaded stylesheet rather than assumed. - No console errors. Based on `feature/casino-holdem-action-undo` (PR #26) — merge order **#22 → #23 → #24 → #25 → #26 → this**.
jheaps added 1 commit 2026-08-31 22:53:11 -06:00
The phone got gestures a few rounds back; the desktop still had a mouse and
nothing else. On a bar that gets tapped thirty times a hand, moving a hand to
the trackpad between every decision is the slow part.

F folds, C checks or calls, R opens the raise pad, A shoves, Enter confirms a
raise or moves the hand on, Esc backs out, U takes the last action back. Each
button wears its key in the corner, hidden on touch devices where it would just
be clutter on a button being tapped anyway.

The shortcuts press the same buttons a dealer would tap rather than calling the
betting engine themselves, so there's no second code path to drift out of step
with what the bar is actually offering — if a button isn't on screen, its key
does nothing.

Nothing fires while a name, amount or note is being typed, or while an overlay
owns the keyboard. Typing "Francesca" into a seat name must not fold the table.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps merged commit 1f1b7e840d into feature/casino-holdem-action-undo 2026-08-31 23:34:55 -06:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jheaps/JoshHeaps.Net#27