diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/panes.zig | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/panes.zig b/src/panes.zig index 88e6a8ea..93abae30 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -6803,7 +6803,20 @@ pub const Terminal = struct { .consumed_mods = .{ .shift = key.text.len > 0 and key.shift }, .utf8 = text, .unshifted_codepoint = if (key.cp >= 'A' and key.cp <= 'Z') key.cp - 'A' + 'a' else if (key.cp < Key.up) key.cp else 0, - }, input.KeyEncodeOptions.fromTerminal(&state.vt)) catch return; + }, options: { + var opts = input.KeyEncodeOptions.fromTerminal(&state.vt); + // fromTerminal cannot know this one and says so, defaulting to + // "option is not alt" — right for an app that lets macOS do the + // unicode translation and hands the encoder the composed text. + // Every pardes shell resolves the modifier itself and hands the + // core the BASE key with the alt bit and no text at all (see + // PardesView.keyDown, and app.mjs doing the same with the same + // two bits), so by the time this runs alt already means alt. + // Left at the default, a macOS build drops the ESC prefix on + // the floor and forwards Alt-n to the child as a bare `n`. + opts.macos_option_as_alt = .true; + break :options opts; + }) catch return; if (writer.end > 0) p.emit(.{ .write = .{ .pane = @intCast(id), .bytes = .from(writer.buffered()) } }); return; } |
