From eb248a1cdbb22e4938e31d849c6f736ef8661ecb Mon Sep 17 00:00:00 2001 From: "Matthew Z." <87685252+che-3@users.noreply.github.com> Date: Sun, 22 Mar 2026 19:52:42 -0400 Subject: [PATCH] Fix Cmd+Shift+key combos being swallowed for unbound keys (#1959) Use charactersIgnoringModifiers instead of characters when redispatching Cmd-modified key events in performKeyEquivalent. Cmd-modified keys don't produce text characters, so event.characters returns an empty string for Cmd+Shift combos, preventing Ghostty from encoding them as kitty protocol sequences. charactersIgnoringModifiers returns the actual key character (e.g. "k" for Cmd+Shift+K) while modifiers are preserved in modifierFlags. Fixes #1718 Co-authored-by: CHE-3 Co-authored-by: Claude Opus 4.6 (1M context) --- Sources/GhosttyTerminalView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/GhosttyTerminalView.swift b/Sources/GhosttyTerminalView.swift index b4640d8b..3aec1096 100644 --- a/Sources/GhosttyTerminalView.swift +++ b/Sources/GhosttyTerminalView.swift @@ -5110,7 +5110,7 @@ class GhosttyNSView: NSView, NSUserInterfaceValidations { if let lastPerformKeyEvent { self.lastPerformKeyEvent = nil if lastPerformKeyEvent == event.timestamp { - equivalent = event.characters ?? "" + equivalent = event.charactersIgnoringModifiers ?? "" break } }