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

@@ -1130,8 +1130,10 @@ export function matchesKey(data: string, keyId: KeyId): boolean {
const isDigit = isDigitKey(key);
if (ctrl && alt && !shift && !_kittyProtocolActive && rawCtrl) {
// Legacy: ctrl+alt+key is ESC followed by the control character
return data === `\x1b${rawCtrl}`;
// Legacy: ctrl+alt+key is ESC followed by the control character.
// If that legacy form does not match, continue so CSI-u and
// modifyOtherKeys sequences from tmux can still be recognized.
if (data === `\x1b${rawCtrl}`) return true;
}
if (alt && !ctrl && !shift && !_kittyProtocolActive && (isLetter || isDigit)) {