Skip to content

Add ctrl+[0-9] tab switching hotkeys to ShellV2#2264

Merged
KCarretto merged 2 commits intomainfrom
copilot/update-shellv2-hotkey-support
Apr 17, 2026
Merged

Add ctrl+[0-9] tab switching hotkeys to ShellV2#2264
KCarretto merged 2 commits intomainfrom
copilot/update-shellv2-hotkey-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

Adds keyboard shortcuts for fast tab navigation in the Shell page: ctrl+1 focuses the main REPL, ctrl+2ctrl+9 switch to portal tabs 1–8, and ctrl+0 targets the 10th tab.

  • New useTabHotkeys hook — Listens for keydown on window, maps digit to tab index (0 → index 9, otherwise digit - 1), bounds-checks against totalTabs, and calls preventDefault to suppress browser defaults. Ignores combos with alt/shift/meta.
  • Integrated into ShellV2useTabHotkeys(1 + portalTabs.length, setTabIndex) wired up alongside existing tab state.
  • 13 unit tests — Covers all digits, modifier filtering, out-of-bounds rejection, preventDefault behavior, and cleanup on unmount.

Agent-Logs-Url: https://github.com/spellshift/realm/sessions/a4953e2a-0a2a-4168-8357-7934012913e9

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@KCarretto KCarretto merged commit 1985488 into main Apr 17, 2026
6 of 8 checks passed
@KCarretto KCarretto deleted the copilot/update-shellv2-hotkey-support branch April 17, 2026 22:39
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