macos: Don't encode option as alt in kitty mode

This is the same fix as #9406 applied to kitty keyboard.

Note: I cannot personally test this as I do not have a mac.
pull/9816/head
CJ van den Berg 2025-12-05 12:17:06 +01:00
parent 1207240cf1
commit 518755c4ad
No known key found for this signature in database
GPG Key ID: 8EB1E1BB660E3FB9
1 changed files with 14 additions and 1 deletions

View File

@ -116,7 +116,20 @@ fn kitty(
}
}
const all_mods = event.mods;
const all_mods = mods: {
var mods_binding = event.mods;
if (comptime builtin.target.os.tag.isDarwin()) alt: {
switch (opts.macos_option_as_alt) {
.false => {},
.true => break :alt,
.left => if (event.mods.sides.alt == .left) break :alt,
.right => if (event.mods.sides.alt == .right) break :alt,
}
mods_binding.alt = false;
}
break :mods mods_binding;
};
const effective_mods = event.effectiveMods();
const binding_mods = effective_mods.binding();