Fix Ctrl+Alt key matching in tmux (#2989)

This commit is contained in:
Kao Félix
2026-04-14 19:36:08 +01:00
committed by GitHub
parent 462b3d21e3
commit 6cf5098f6b
2 changed files with 16 additions and 2 deletions

View File

@@ -239,6 +239,18 @@ describe("matchesKey", () => {
assert.strictEqual(parseKey("\x1b[27;5;49~"), "ctrl+1");
assert.strictEqual(parseKey("\x1b[27;2;49~"), "shift+1");
});
it("should match Ctrl+Alt+letter via CSI-u when kitty inactive", () => {
setKittyProtocolActive(false);
assert.strictEqual(matchesKey("\x1b[104;7u", "ctrl+alt+h"), true);
assert.strictEqual(parseKey("\x1b[104;7u"), "ctrl+alt+h");
});
it("should match Ctrl+Alt+letter via xterm modifyOtherKeys", () => {
setKittyProtocolActive(false);
assert.strictEqual(matchesKey("\x1b[27;7;104~", "ctrl+alt+h"), true);
assert.strictEqual(parseKey("\x1b[27;7;104~"), "ctrl+alt+h");
});
});
describe("Legacy key matching", () => {