macos: do not send ctrl or super into UCKeyTranslate

see comment
This commit is contained in:
Mitchell Hashimoto
2023-08-15 22:38:54 -07:00
parent e74a173704
commit 759ae94f15

View File

@ -405,6 +405,17 @@ pub const Surface = struct {
},
}
// On macOS we strip ctrl because UCKeyTranslate
// converts to the masked values (i.e. ctrl+c becomes 3)
// and we don't want that behavior.
//
// We also strip super because its not used for translation
// on macos and it results in a bad translation.
if (comptime builtin.target.isDarwin()) {
translate_mods.ctrl = false;
translate_mods.super = false;
}
break :translate_mods translate_mods;
};