mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-04 20:37: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:
@@ -133,7 +133,6 @@ fn prettyPrint(alloc: Allocator, keybinds: Config.Keybinds) !u8 {
|
||||
const ctrl_style: vaxis.Style = .{ .fg = .{ .index = 2 } };
|
||||
const alt_style: vaxis.Style = .{ .fg = .{ .index = 3 } };
|
||||
const shift_style: vaxis.Style = .{ .fg = .{ .index = 4 } };
|
||||
const fn_style: vaxis.Style = .{ .fg = .{ .index = 5 } };
|
||||
|
||||
var longest_col: usize = 0;
|
||||
|
||||
@@ -143,10 +142,6 @@ fn prettyPrint(alloc: Allocator, keybinds: Config.Keybinds) !u8 {
|
||||
|
||||
var result: vaxis.Window.PrintResult = .{ .col = 0, .row = 0, .overflow = false };
|
||||
const trigger = bind.trigger;
|
||||
if (trigger.mods.function) {
|
||||
result = try win.printSegment(.{ .text = "fn ", .style = fn_style }, .{ .col_offset = result.col });
|
||||
result = try win.printSegment(.{ .text = " + " }, .{ .col_offset = result.col });
|
||||
}
|
||||
if (trigger.mods.super) {
|
||||
result = try win.printSegment(.{ .text = "super", .style = super_style }, .{ .col_offset = result.col });
|
||||
result = try win.printSegment(.{ .text = " + " }, .{ .col_offset = result.col });
|
||||
|
||||
Reference in New Issue
Block a user