Make Tab key configurable via next_screen/next_tab keybindings#10
Open
vsnote wants to merge 1 commit intotimhartmann7:mainfrom
Open
Make Tab key configurable via next_screen/next_tab keybindings#10vsnote wants to merge 1 commit intotimhartmann7:mainfrom
vsnote wants to merge 1 commit intotimhartmann7:mainfrom
Conversation
Previously the Tab key was hardcoded for screen cycling (non-Terminal) and tab switching (Terminal). This prevented Tab from being forwarded to the remote shell for command completion — a frequent pain point when working inside SSH sessions. Changes: - Add next_screen and next_tab fields to KeybindingsConfig, defaulting to "Tab" for backward compatibility - Add KeyBind struct supporting "Ctrl+<char>" format in config - Replace hardcoded KeyCode::Tab with config-driven checks in both handle_key and handle_terminal_key - Move TermOpenHostPicker shortcut from Ctrl+T to Ctrl+N to avoid conflict when users bind next_tab to Ctrl+T - Update UI hints and help popup to reflect Ctrl+N for new tabs Users can now set e.g. next_tab = "Ctrl+T" in ~/.config/omnyssh/config.toml to free Tab for shell completion.
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.
Summary
Previously the Tab key was hardcoded for screen cycling (non-Terminal screens) and tab switching (Terminal screen). This prevented Tab from being forwarded to the remote shell for command completion — a significant pain point when working inside SSH sessions.
Changes
New keybinding fields — Added
next_screenandnext_tabtoKeybindingsConfig, both defaulting to"Tab"for backward compatibility.KeyBind struct — Added support for
"Ctrl+<char>"format in config (e.g."Ctrl+T","Ctrl+W") via the newparse_keybindfunction andKeyBindstruct with.matches(key)method.Terminal handler — Replaced the hardcoded
KeyCode::Tabcheck inhandle_terminal_keywithself.view.keybindings.next_tab.matches(key).Screen cycling — Replaced
KeyCode::Tabinhandle_key's match block withself.view.keybindings.next_screen.matches(key).Moved host picker — Changed
TermOpenHostPickershortcut fromCtrl+TtoCtrl+N(more intuitive: "New tab"). Updated all UI hints and help popup text accordingly. This freesCtrl+Tfor users who want to bind tab switching to it.Usage
Users who want to free Tab for shell completion can set in
~/.config/omnyssh/config.toml:Default behavior is unchanged — existing users are not affected.
Test plan
parse_keybind(Ctrl+ combo parsing and plain key parsing)