fix: use ctrl modifier for session browser shortcuts to avoid search conflict#1656
Merged
dgageot merged 1 commit intodocker:mainfrom Feb 9, 2026
Merged
fix: use ctrl modifier for session browser shortcuts to avoid search conflict#1656dgageot merged 1 commit intodocker:mainfrom
dgageot merged 1 commit intodocker:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Review Summary
ctrl+c as a key binding for copying session IDs, but this conflicts with the global quit handler and will never work as intended.
Problem
The session browser dialog binds ctrl+c to copy session IDs (lines 45, 309), but HandleQuit() is called before the dialog's key bindings are processed (line 61 in Update()). This means:
- When users press
ctrl+c, the app immediately quits viaHandleQuit() - The
CopyIDhandler is never reached - Users cannot copy session IDs using the advertised shortcut
Evidence
In session_browser.go Update method:
case tea.KeyPressMsg:
if cmd := HandleQuit(msg); cmd != nil {
return d, cmd // ← Returns here for ctrl+c
}
// ... later code never reached
case key.Matches(msg, d.keyMap.CopyID): // ← Unreachable for ctrl+cRecommendation
Choose a different key binding for CopyID that doesn't conflict with the global quit handler. Consider:
ctrl+y(yank/copy in some editors)ctrl+alt+c(less common, unlikely to conflict)alt+c(modifier but not ctrl)
The original issue #1642 was about conflicts with search input (s, f, c). Using ctrl+s and ctrl+f solves that, but ctrl+c creates a different conflict.
0eff3c2 to
6b53fef
Compare
…conflict Plain 's', 'f', and 'c' keys were intercepted by the star, filter, and copy-id actions before reaching the search text input, making it impossible to search for sessions containing those characters. Change the key bindings to alt+s, alt+f, and alt+c so that unmodified key presses are forwarded to the search input as expected. Fixes docker#1642
6b53fef to
1d4fa9b
Compare
trungutt
approved these changes
Feb 9, 2026
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.
Plain
s,f, andckeys were intercepted by the star, filter, and copy-id actions before reaching the search text input, making it impossible to search for sessions containing those characters.Change the key bindings to
ctrl+s,ctrl+f, andctrl+cso that unmodified key presses are forwarded to the search input as expected.Fixes #1642
Follow up of #1653