Repository navigation
sessions: separate keybindings for grid focus vs open-from-list - #320684
Merged
Sandeep Somavarapu (sandy081) merged 1 commit intoJun 9, 2026
Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
Sandeep Somavarapu (sandy081) merged 1 commit into
Conversation
Ctrl/Cmd+1..9 collided between two distinct command families in the agents window: focusing a session already open in the grid vs opening the Nth session from the list. On Windows both resolved to Ctrl+1..9, producing inconsistent behavior (#320552) and Ctrl+9 opening the last session instead of the 9th (#320553). - Focus Session in Grid keeps Ctrl/Cmd+1..9 and now treats 9 as the LAST slot, matching core's Focus Last Editor Group. - Open Session from list moves to Alt+1..9 (Win/Linux) and Ctrl+1..9 (macOS, WinCtrl) to avoid the collision and Option+digit symbol input on macOS. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves keybinding collisions in the Agents (sessions) window by separating the shortcuts for “focus an already-open session in the grid” vs “open the Nth session from the sessions list”, and by making the 9 binding consistently mean “last” (mirroring core editor-group behavior).
Changes:
- Rebind “Open Session from list at index 1..9” to
Alt+1..9on Windows/Linux andCtrl+1..9on macOS (WinCtrl), avoiding collisions with grid-focus bindings. - Update “Focus Session in Grid 1..9” so
9focuses the last open grid slot (and rename the command title accordingly).
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts | Moves the “open from list at index” keybindings off Ctrl/Cmd+1..9 (platform-specific split) while keeping behavior that 9 targets the last item. |
| src/vs/sessions/contrib/sessions/browser/sessionsActions.ts | Adjusts grid-focus actions so 9 targets the last visible grid slot and updates the command title for position 9. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Joaquín Ruales (jruales)
approved these changes
Jun 9, 2026
Sandeep Somavarapu (sandy081)
deleted the
sandy081/sessions-grid-session-keybindings
branch
June 9, 2026 22:37
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
In the agents window,
Ctrl/Cmd+1..9was bound to two distinct command families at the same weight andwhencontext, so they collided:sessions.focusSessionInGrid*).sessionsViewPane.openSessionAtIndex*).On Windows both resolved to
Ctrl+1..9, so only one ever ran from the keyboard, producing the reported inconsistencies.Changes
Ctrl/Cmd+1..9and now treats9as the LAST grid slot (matching core's Focus Last Editor Group), instead of literally the 9th. Title for position 9 is now "Focus Last Session in Grid".Ctrl+1..9to:Alt+1..9Ctrl+1..9(WinCtrl) — the grid usesCmd+1..9there, soCtrlis free, and this avoidsOption+digittyping symbols.Net result: Ctrl/Cmd = focus grid slot, Alt (Win/Linux) / Ctrl (mac) = open from list, with
9 = lastconsistent across both families.Fixes
Ctrl+9opening the last session instead of the 9th.Notes for reviewers