Skip to content

Add TAB-hold shortcuts menu - #389

Merged
stephenkirk merged 5 commits into
mainfrom
claude/add-shortcuts-menu-tab-vahke
Apr 12, 2026
Merged

Add TAB-hold shortcuts menu#389
stephenkirk merged 5 commits into
mainfrom
claude/add-shortcuts-menu-tab-vahke

Conversation

@stephenkirk

@stephenkirk stephenkirk commented Apr 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Hold TAB to open a context-aware shortcut overlay for common multiplayer actions (join/create/leave lobby, copy/view code, choose deck/stake, reconnect)
  • Shortcuts adapt to current state: in-lobby vs not, connected vs disconnected
  • Menu only appears on main menu — no in-game shortcuts
  • Deck picker shortcut respects existing enable logic (host or different-decks mode)
  • Reuses existing localization keys where possible

Test plan

  • Hold TAB on main menu while disconnected — should show Reconnect
  • Hold TAB on main menu while connected, no lobby — should show Join/Create options
  • Hold TAB on main menu while in lobby — should show Copy/View Code, Choose Deck (if allowed), Leave
  • Hold TAB during a run — menu should not appear
  • Release TAB or press a shortcut key — menu should dismiss
  • Verify Choose Deck shortcut is hidden when guest + different_decks is off

claude and others added 5 commits March 24, 2026 08:51
Pressing TAB shows a context-aware overlay with keyboard shortcuts:
- Main menu (connected): V to join from clipboard, J to join lobby, C to create lobby
- Main menu (in lobby): C to copy code, V to view code, L to leave
- Main menu (disconnected): R to reconnect
- In-game (in lobby): C to copy code, I for lobby info

Shortcuts can be triggered by pressing the key while TAB is held,
or by clicking the shortcut row. Menu dismisses on TAB release.

https://claude.ai/code/session_014FaSJ5FwuXMfcUmM5Hiy81
…shortcut

- Replace duplicate b_sc_* keys with existing b_copy_code, b_view_code,
  b_join_lobby, b_create_lobby, b_leave_lobby, b_reconnect, b_lobby_info
- Re-add View Code shortcut using existing b_view_code
- Add Choose Deck/Stake shortcut (D key), gated on host or different_decks
- Only new loc keys: k_sc_title, k_sc_hint, b_sc_choose_deck
lobby_choose_deck passes its argument to vanilla setup_run which
indexes e.config. Pass a stub UI element table to avoid nil index.
No need for lobby code or lobby info shortcuts during gameplay.
@stephenkirk
stephenkirk merged commit 6394728 into main Apr 12, 2026
stephenkirk added a commit that referenced this pull request Apr 16, 2026
* Add TAB-hold shortcuts menu for quick multiplayer actions

Pressing TAB shows a context-aware overlay with keyboard shortcuts:
- Main menu (connected): V to join from clipboard, J to join lobby, C to create lobby
- Main menu (in lobby): C to copy code, V to view code, L to leave
- Main menu (disconnected): R to reconnect
- In-game (in lobby): C to copy code, I for lobby info

Shortcuts can be triggered by pressing the key while TAB is held,
or by clicking the shortcut row. Menu dismisses on TAB release.

https://claude.ai/code/session_014FaSJ5FwuXMfcUmM5Hiy81

* Adjust shortcuts menu overlay: 40% opacity, left-aligned positioning

* Reuse existing localization keys for shortcuts menu, add deck picker shortcut

- Replace duplicate b_sc_* keys with existing b_copy_code, b_view_code,
  b_join_lobby, b_create_lobby, b_leave_lobby, b_reconnect, b_lobby_info
- Re-add View Code shortcut using existing b_view_code
- Add Choose Deck/Stake shortcut (D key), gated on host or different_decks
- Only new loc keys: k_sc_title, k_sc_hint, b_sc_choose_deck

* Fix crash when opening deck picker from shortcuts menu

lobby_choose_deck passes its argument to vanilla setup_run which
indexes e.config. Pass a stub UI element table to avoid nil index.

* Remove in-game shortcuts from TAB menu

No need for lobby code or lobby info shortcuts during gameplay.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants