Fix shift+tab keybinding when not in kitty mode (#12552)

This commit is contained in:
Tommaso Sciortino
2025-11-04 11:45:22 -08:00
committed by GitHub
parent 460c3debf5
commit f796650122
2 changed files with 2 additions and 1 deletions

View File

@@ -166,7 +166,7 @@ function parseKittyPrefix(buffer: string): { key: Key; length: number } | null {
shift: true,
paste: false,
sequence: buffer.slice(0, m[0].length),
kittyProtocol: true,
kittyProtocol: false,
},
length: m[0].length,
};

View File

@@ -88,6 +88,7 @@ describe.each([true, false])(`useKeypress with useKitty=%s`, (useKitty) => {
{ key: { name: 'right', sequence: '\x1b[C' } },
{ key: { name: 'up', sequence: '\x1b[A' } },
{ key: { name: 'down', sequence: '\x1b[B' } },
{ key: { name: 'tab', sequence: '\x1b[Z', shift: true } },
])('should listen for keypress when active for key $key.name', ({ key }) => {
renderKeypressHook(true);
act(() => stdin.write(key.sequence));