Add keyboard control for a dealer working on a laptop
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
This commit is contained in:
@@ -1219,6 +1219,7 @@ body.hasActionBar #holdemSidebar {
|
||||
}
|
||||
|
||||
.actionBtn {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -1256,6 +1257,29 @@ body.hasActionBar #holdemSidebar {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.actionKey {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 7px;
|
||||
padding: 0 0.25rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid currentColor;
|
||||
opacity: 0.4;
|
||||
font-family: inherit;
|
||||
font-size: 0.6rem;
|
||||
line-height: 1.4;
|
||||
text-transform: uppercase;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* No keyboard, no key badges — on a phone they'd just be clutter on the buttons
|
||||
the dealer is already tapping. */
|
||||
@media (hover: none) {
|
||||
.actionKey {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.actionFold {
|
||||
background: linear-gradient(180deg, #3d1f1f, #2c1515);
|
||||
border-color: #5b2626;
|
||||
|
||||
Reference in New Issue
Block a user