mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-23 12:16:11 +03:00
Merge pull request #1582 from mitchellh/macos-responder
macos: only process key equivalents if we're focused
This commit is contained in:
@ -702,6 +702,13 @@ extension Ghostty {
|
||||
if (event.type != .keyDown) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Only process events if we're focused. Some key events like C-/ macOS
|
||||
// appears to send to the first view in the hierarchy rather than the
|
||||
// the first responder (I don't know why). This prevents us from handling it.
|
||||
if (!focused) {
|
||||
return false
|
||||
}
|
||||
|
||||
let equivalent: String
|
||||
switch (event.charactersIgnoringModifiers) {
|
||||
|
Reference in New Issue
Block a user