term: fix encoding for modified F1-F4
refs: https://github.com/wez/wezterm/issues/2263
This commit is contained in:
1 parent
5e60743519
commit
fc6cfd1f72
2 files changed
+12
-2
No files matched your search
@@ -51,6 +51,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* Quickselect: now selects the bottom-most match rather than the top-most match. [#2250](https://github.com/wez/wezterm/issues/2250)
|
||||
* Mux: `wezterm.mux.set_active_workspace` didn't update the current window to match the newly activated workspace. [#2248](https://github.com/wez/wezterm/issues/2248)
|
||||
* Overlays such as debug and launcher menu now handle resize better
|
||||
* Shift-F1 through F4 generated different encoding than xterm [#2263](https://github.com/wez/wezterm/issues/2263)
|
||||
|
||||
#### Updated
|
||||
* Bundled harfbuzz to 4.4.1
|
||||
|
||||
+11
-2
@@ -661,9 +661,18 @@ impl KeyCode {
|
||||
_ => unreachable!("wat?"),
|
||||
}
|
||||
)?;
|
||||
} else if n < 5 {
|
||||
// Special case for F1-F4 with modifiers
|
||||
let code = match n {
|
||||
1 => 'P',
|
||||
2 => 'Q',
|
||||
3 => 'R',
|
||||
4 => 'S',
|
||||
_ => unreachable!("wat?"),
|
||||
};
|
||||
write!(buf, "\x1b[1;{}{code}", 1 + encode_modifiers(mods))?;
|
||||
} else {
|
||||
// Higher numbered F-keys plus modified F-keys are encoded
|
||||
// using CSI instead of SS3.
|
||||
// Higher numbered F-keys using CSI instead of SS3.
|
||||
let intro = match n {
|
||||
1 => "\x1b[11",
|
||||
2 => "\x1b[12",
|
||||
|
||||
Reference in new issue
Block a user