diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-02-13 14:20:13 -0800 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-02-13 14:20:13 -0800 |
| commit | 9978ea3b9c0312fe4a27bf818d8fc988441bcaba (patch) | |
| tree | 3ce1879d547ec96dacebac33d4520828f87fe696 /src | |
| parent | 710ea1c8d9a1005a9f7f03fe98297b13a21b8e44 (diff) | |
Revert "macos: don't remove ctrl modifier for text input"
This reverts commit 3104b217581a9e580155216a260b1a79135b701a.
Diffstat (limited to 'src')
| -rw-r--r-- | src/apprt/embedded.zig | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/apprt/embedded.zig b/src/apprt/embedded.zig index ffcf7fdbe..c4e69f917 100644 --- a/src/apprt/embedded.zig +++ b/src/apprt/embedded.zig @@ -182,9 +182,14 @@ pub const App = struct { if (strip) translate_mods.alt = false; } - // We strip super on macOS because its not used for translation - // it results in a bad translation. + // 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; } @@ -231,14 +236,7 @@ pub const App = struct { .surface => |surface| &surface.keymap_state, }, @intCast(keycode), - if (comptime builtin.target.isDarwin()) mods: { - // 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. - var v = translate_mods; - v.ctrl = false; - break :mods v; - } else translate_mods, + translate_mods, ); // TODO(mitchellh): I think we can get rid of the above keymap |
