Repository navigation
Conversation
Cards are now focusable buttons with a visible focus ring. Enter or Space opens a card's action menu with focus on its first item (arrows, ArrowRight into the player submenu, Escape all come from Mantine's Menu). Focus comes back to the card after an action, including when a veto re-sorts the set, and passes to the card in the same slot when a redraw replaces the card or a hidden veto removes it. Pocket-pick search and label removal return focus to the card too. Arrow keys move between cards: left/right within a set, up/down to the nearest card in the row above or below (across sets and older draws), and up from the top row into the header. Arrow down from the header's buttons returns to the last focused card. New draws: N opens the draw dialog, focus starts in the title field, Enter submits, and focus lands on the new draw's first card. The settings link is a single tab stop now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01By1tH8wfYsnJBCtF3FJdhw
A number key on a focused card opens its action menu like Enter does, but for the player at that position in display order. The menu is headed "As <player>" and protect, pocket pick, veto and winner act for that player directly instead of opening the player submenu; an empty placeholder only offers the pick to that player. Numbers past the last player do nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01By1tH8wfYsnJBCtF3FJdhw
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a Button Mapping section under Global Settings > This Browser Only. Each of two sides binds keys to up/down/left/right, a green accept and a red back button. Accept can either open a card's menu like Enter, or act for a chosen player like the 1-9 keys. Bindings are stored by KeyboardEvent.code in localStorage (ddrtools.keymap), for every event. A window capture listener takes over mapped keys before anything else sees them, so a key bound to a button stops doing its default job (N no longer opens a draw, a digit no longer opens a card menu). It dispatches the matching synthetic arrow, Enter or Escape at the focused element for the existing handlers, and fills in the defaults synthetic events lack: accept clicks buttons and submits forms, and an unhandled direction moves through the tab order of the current dialog or header. With nothing focused, the first press lands on a card or the Draw button. A key bound to its own native function (the real down arrow as Down) is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01By1tH8wfYsnJBCtF3FJdhw
Each panel button can now also have a gamepad input bound: a button, or a stick/d-pad axis pushed past halfway in one direction. Pads are told apart by their index, so a cabinet whose two sides show up as two gamepads can bind each side to its own pad. The binding UI takes whichever comes first, a key or a pad input (an input already held when binding starts has to be released first), and a button can have one of each. A polling loop (running only while a pad is connected) fires the bound button when its input goes down, and repeats held directions after 400ms every 120ms. An input only ever fires on a fresh press, so one bound while held doesn't go off the moment binding ends. The button actions move out of keymap-listener into panel-actions, shared by the key and pad listeners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01By1tH8wfYsnJBCtF3FJdhw
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #627 (Blueprint → Mantine). Merge that first, or retarget this PR once it lands.
Makes the full loop of drawing and then protecting, vetoing, pocket picking and picking winners work from the keyboard.
Cards
role="button",aria-haspopup="menu"). They have a:focus-visiblering outside the card's colored border, so mouse clicks don't show it.Focus after actions
<body>.returnFocus={false}, because the element it would return to is the menu item, which no longer exists.Arrow keys between cards (
src/utils/card-nav.ts)data-card-group) in order and stop at the ends.New draws
<form>so Enter submits, and focus lands on the new draw's first card. Cancelling returns focus to Draw!. The form used to edit an existing match's details also submits on Enter.preventDefault, so confirming the field doesn't also submit the form with the old value.ActionIcon component={Link}: one Tab stop instead of two.Testing
oxlint,oxfmt --checkandtsc --noemitare clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01By1tH8wfYsnJBCtF3FJdhw
Generated by Claude Code