From 92d310a66024ed445c43614770cd90d60f3af9c2 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Mon, 23 Sep 2024 16:55:11 -0600 Subject: [PATCH] macOS: prevent ctrl-return key equivalent macOS 15 adds this as a default key equivalent to show the context menu, this is annoying, so we capture the event and tell macOS we handled it. --- macos/Sources/Ghostty/SurfaceView_AppKit.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index 2aee1cd5a..3c2c17a81 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -692,6 +692,11 @@ extension Ghostty { // sound and we don't like the beep sound. equivalent = "_" + case "\r": + // Pass C- through verbatim + // (prevent the default context menu equivalent) + equivalent = "\r" + default: // Ignore other events return false