macos: remove the ability to bind fn/globe

This was recently introduced a few days ago. Unfortunately, this doesn't
work as expected. The "function" modifier is not actually the fn key
but used by macOS to represent a variety of "functional" key presses.
This breaks other bindings such as #2411.

I can't find a source on the internet that reliably tells me how we
can detect fn key presses, but I do find a number of sources that tell
us we can't.
This commit is contained in:
Mitchell Hashimoto
2024-10-07 14:34:38 -10:00
parent 3e3c666244
commit ed2cd6d436
9 changed files with 13 additions and 42 deletions

View File

@@ -670,22 +670,13 @@ class: ?[:0]const u8 = null,
/// translated by any system keyboard layouts. Example: "ctrl+physical:a"
///
/// Valid modifiers are `shift`, `ctrl` (alias: `control`), `alt` (alias: `opt`,
/// `option`), `super` (alias: `cmd`, `command`), and `function` (alias: `fn`,
/// `globe`). You may use the modifier or the alias. When debugging keybinds,
/// the non-aliased modifier will always be used in output.
/// `option`), and `super` (alias: `cmd`, `command`). You may use the modifier
/// or the alias. When debugging keybinds, the non-aliased modifier will always
/// be used in output.
///
/// Some notes about the `function` modifier:
///
/// * It is only available on macOS.
/// * It is used by many system shortcuts and Ghostty is not able to
/// override these shortcuts. If a system shortcut is triggered, the
/// system shortcut will take precedence.
/// * If you have multiple keyboard layouts active and don't press the
/// combination fast enough, macOS will switch to the next keyboard
/// layout.
/// * Menu items on macOS cannot be bound to the `function` modifier,
/// so this modifier will work with Ghostty but will not be visible
/// in the menu.
/// Note that the fn or "globe" key on keyboards are not supported as a
/// modifier. This is a limitation of the operating systems and GUI toolkits
/// that Ghostty uses.
///
/// You may also specify multiple triggers separated by `>` to require a
/// sequence of triggers to activate the action. For example,