mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-04 02:44:50 +00:00
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:
@@ -901,8 +901,6 @@ pub const Trigger = struct {
|
||||
.{ "opt", "alt" },
|
||||
.{ "option", "alt" },
|
||||
.{ "control", "ctrl" },
|
||||
.{ "fn", "function" },
|
||||
.{ "globe", "function" },
|
||||
};
|
||||
inline for (alias_mods) |pair| {
|
||||
if (std.mem.eql(u8, part, pair[0])) {
|
||||
|
||||
@@ -35,8 +35,6 @@ pub fn encode(
|
||||
self: *const KeyEncoder,
|
||||
buf: []u8,
|
||||
) ![]const u8 {
|
||||
// log.debug("encode {}", .{self.*});
|
||||
|
||||
if (self.kitty_flags.int() != 0) return try self.kitty(buf);
|
||||
return try self.legacy(buf);
|
||||
}
|
||||
|
||||
@@ -89,11 +89,10 @@ pub const Mods = packed struct(Mods.Backing) {
|
||||
ctrl: bool = false,
|
||||
alt: bool = false,
|
||||
super: bool = false,
|
||||
function: bool = false,
|
||||
caps_lock: bool = false,
|
||||
num_lock: bool = false,
|
||||
sides: side = .{},
|
||||
_padding: u5 = 0,
|
||||
_padding: u6 = 0,
|
||||
|
||||
/// Tracks the side that is active for any given modifier. Note
|
||||
/// that this doesn't confirm a modifier is pressed; you must check
|
||||
@@ -131,7 +130,6 @@ pub const Mods = packed struct(Mods.Backing) {
|
||||
.ctrl = self.ctrl,
|
||||
.alt = self.alt,
|
||||
.super = self.super,
|
||||
.function = self.function,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user