macos: if a key event would result in an immediate binding then do it

This commit is contained in:
Mitchell Hashimoto
2025-01-03 14:39:22 -08:00
parent 8b8c53fc4c
commit 4031815a8d

View File

@ -810,7 +810,14 @@ extension Ghostty {
return false return false
} }
// If this event as-is would result in a key event then // If this event as-is would result in a key binding then we send it.
if let surface,
ghostty_surface_key_is_binding(
surface,
event.ghosttyKeyEvent(GHOSTTY_ACTION_PRESS)) {
self.keyDown(with: event)
return true
}
// Only process keys when Control is active. All known issues we're // Only process keys when Control is active. All known issues we're
// resolving happen only in this scenario. This probably isn't fully robust // resolving happen only in this scenario. This probably isn't fully robust