mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-15 07:48:20 +00:00
clean up bindings so that they match macOS menus
This commit is contained in:
@@ -1043,12 +1043,16 @@ extension Ghostty {
|
||||
}
|
||||
|
||||
// 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
|
||||
if let surface {
|
||||
var ghosttyEvent = event.ghosttyKeyEvent(GHOSTTY_ACTION_PRESS)
|
||||
let match = (event.characters ?? "").withCString { ptr in
|
||||
ghosttyEvent.text = ptr
|
||||
return ghostty_surface_key_is_binding(surface, ghosttyEvent)
|
||||
}
|
||||
if match {
|
||||
self.keyDown(with: event)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
let equivalent: String
|
||||
|
Reference in New Issue
Block a user