diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2024-12-20 08:25:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-20 08:25:30 -0800 |
| commit | 0f588d72c70c7e0f4e29ffb23ae41b59220e03b2 (patch) | |
| tree | 2140951311d9ece7e07ca910b110b270a044247b /src/input/function_keys.zig | |
| parent | b8ffee7acbdd5ee97953f6e6d02e047d4bfda37b (diff) | |
| parent | 8cadc7030ce7f8c5d06c5bf56eedd24128bf3455 (diff) | |
Change to F3 legacy encoding with modifiers (#3019)
The [fixterms](http://www.leonerd.org.uk/hacks/fixterms/) "Really
Special Keypresses" section suggests using CSI 1 ; Ps R for F3, but this
is also a valid cursor position report. The intention was to make
back-compatible changes, so this is fairly considered a specification
bug.
This changes F3 in legacy mode to send CSI 13 ; Ps ~ instead, this is a
variant listed in fixterms, is what kitty protocol uses, and lacks the
problematic overlap with cursor positions.
The KeyEncoder.zig unit test has been changed accordingly, and all tests
pass on my machine.
Diffstat (limited to 'src/input/function_keys.zig')
| -rw-r--r-- | src/input/function_keys.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input/function_keys.zig b/src/input/function_keys.zig index 61af5b037..1156faf56 100644 --- a/src/input/function_keys.zig +++ b/src/input/function_keys.zig @@ -89,7 +89,7 @@ pub const keys = keys: { // Function Keys. todo: f13-f35 but we need to add to input.Key result.set(.f1, pcStyle("\x1b[1;{}P") ++ .{.{ .sequence = "\x1BOP" }}); result.set(.f2, pcStyle("\x1b[1;{}Q") ++ .{.{ .sequence = "\x1BOQ" }}); - result.set(.f3, pcStyle("\x1b[1;{}R") ++ .{.{ .sequence = "\x1BOR" }}); + result.set(.f3, pcStyle("\x1b[13;{}~") ++ .{.{ .sequence = "\x1BOR" }}); result.set(.f4, pcStyle("\x1b[1;{}S") ++ .{.{ .sequence = "\x1BOS" }}); result.set(.f5, pcStyle("\x1b[15;{}~") ++ .{.{ .sequence = "\x1B[15~" }}); result.set(.f6, pcStyle("\x1b[17;{}~") ++ .{.{ .sequence = "\x1B[17~" }}); |
