mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: style changes, make equivalent not an optional
This commit is contained in:
@ -838,17 +838,18 @@ extension Ghostty {
|
||||
return false
|
||||
}
|
||||
|
||||
let equivalent: String?
|
||||
let equivalent: String
|
||||
switch (event.charactersIgnoringModifiers) {
|
||||
case "/":
|
||||
// Treat C-/ as C-_
|
||||
// Treat C-/ as C-_. We do this because C-/ makes macOS make a beep
|
||||
// sound and we don't like the beep sound.
|
||||
equivalent = "_"
|
||||
|
||||
default:
|
||||
equivalent = nil
|
||||
// Ignore other events
|
||||
return false
|
||||
}
|
||||
|
||||
guard let equivalent else { return false }
|
||||
|
||||
let newEvent = NSEvent.keyEvent(
|
||||
with: .keyDown,
|
||||
location: event.locationInWindow,
|
||||
|
Reference in New Issue
Block a user