Add keyboard copy mode for terminal scrollback (#792)

* Add keyboard copy mode for terminal scrollback

* Show vim copy mode indicator in terminal

* Fix vi copy-mode symbol keys and pending yank handling

* Refine copy-mode badge wording and font

* Rename keyboard copy-mode badge to VI MODE

* Address PR feedback for copy-mode routing and keyup handling

* Refresh copy-mode viewport row after scrolling
This commit is contained in:
Lawrence Chen 2026-03-03 19:01:21 -08:00 committed by GitHub
parent bfe843f0bd
commit 2f6cb6ff38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1092 additions and 1 deletions

View file

@ -6030,6 +6030,19 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
return true
}
if matchShortcut(event: event, shortcut: KeyboardShortcutSettings.shortcut(for: .toggleTerminalCopyMode)) {
let handled = tabManager?.toggleFocusedTerminalCopyMode() ?? false
#if DEBUG
dlog(
"shortcut.action name=toggleTerminalCopyMode handled=\(handled ? 1 : 0) " +
"\(debugShortcutRouteSnapshot(event: event))"
)
#endif
// Only consume when a focused terminal actually handled the toggle.
// Otherwise allow the event to continue through the responder chain.
return handled
}
// Workspace navigation: Cmd+Ctrl+] / Cmd+Ctrl+[
if matchShortcut(event: event, shortcut: KeyboardShortcutSettings.shortcut(for: .nextSidebarTab)) {
#if DEBUG