Clear macOS menu bar shortcuts when resetting keybindings (keybind = clear) #4134
Unanswered
frobware
asked this question in
Feature Requests, Ideas
Replies: 1 comment
-
|
I should add... I really want Emacs and readline (bash/zsh) to receive Alt when Command is pressed on macOS. I'm getting Alt due to [1] hack alert: % git log -p -1
commit 28413bb842a9b3d47d32a1252618bc3b027a86e2 (HEAD -> swap-option-and-command)
Author: Andrew McDermott <[email protected]>
Date: Mon Dec 30 15:50:27 2024 +0000
FROBWARE: Swap Cmd/Option
diff --git a/macos/Sources/Ghostty/Ghostty.Input.swift b/macos/Sources/Ghostty/Ghostty.Input.swift
index 0a279ea1..012534cb 100644
--- a/macos/Sources/Ghostty/Ghostty.Input.swift
+++ b/macos/Sources/Ghostty/Ghostty.Input.swift
@@ -81,8 +81,10 @@ extension Ghostty {
if (flags.contains(.shift)) { mods |= GHOSTTY_MODS_SHIFT.rawValue }
if (flags.contains(.control)) { mods |= GHOSTTY_MODS_CTRL.rawValue }
- if (flags.contains(.option)) { mods |= GHOSTTY_MODS_ALT.rawValue }
- if (flags.contains(.command)) { mods |= GHOSTTY_MODS_SUPER.rawValue }
+ if (flags.contains(.option)) { mods |= GHOSTTY_MODS_SUPER.rawValue }
+ if (flags.contains(.command)) { mods |= GHOSTTY_MODS_ALT.rawValue }
+ // if (flags.contains(.option)) { mods |= GHOSTTY_MODS_ALT.rawValue }
+ // if (flags.contains(.command)) { mods |= GHOSTTY_MODS_SUPER.rawValue }
if (flags.contains(.capsLock)) { mods |= GHOSTTY_MODS_CAPS.rawValue }
// Handle sided input. We can't tell that both are pressed in theAll of this hackery works, but the menu bar shortcuts remain bound to Cmd-, which interferes with Emacs and readline. This is why I was hoping that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve set
keybind = clearto minimise keybindings that might conflict with Emacs or readline. While this works well for simplifying conflicts, the macOS app menu bar still retains its default keybindings (e.g., Cmd-W). It would be helpful if settingkeybind = clearalso removed these default menu bar shortcuts to reflect the configuration.For the moment I've been using the following script to clear the app shortcuts.
Running this:
Beta Was this translation helpful? Give feedback.
All reactions