diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2023-11-29 21:35:47 -0800 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2023-11-29 21:36:10 -0800 |
| commit | bc7643eae973b7e9da1a92ad4f08257df84ec6ec (patch) | |
| tree | 9be8762ae1fc04f4d47dcda52ba198e93a046de5 /src/input/KeyEncoder.zig | |
| parent | 659b43de378e830a0e8e4b7cfcb49809f501ba60 (diff) | |
input: update preventsText comment
Diffstat (limited to 'src/input/KeyEncoder.zig')
| -rw-r--r-- | src/input/KeyEncoder.zig | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/input/KeyEncoder.zig b/src/input/KeyEncoder.zig index d4b6a5cad..887e522fc 100644 --- a/src/input/KeyEncoder.zig +++ b/src/input/KeyEncoder.zig @@ -607,17 +607,16 @@ const KittyMods = packed struct(u8) { }; } - /// Returns true if the modifiers prevent printable text + /// Returns true if the modifiers prevent printable text. + /// + /// Note on macOS: this logic alone is not enough, since you must + /// consider macos_option_as_alt. See the Kitty encoder for more details. pub fn preventsText(self: KittyMods) bool { - if (self.alt or + return self.alt or self.ctrl or self.super or self.hyper or - self.meta) - { - return true; - } - return false; + self.meta; } /// Returns the raw int value of this packed struct. |
