remove wildcard behavior on keybindings (#21315)

This commit is contained in:
Tommaso Sciortino
2026-03-05 22:11:53 +00:00
committed by GitHub
parent ecbd011880
commit 5b980e52ef
10 changed files with 135 additions and 415 deletions
@@ -58,46 +58,6 @@ describe('keyBindings config', () => {
const config: KeyBindingConfig = defaultKeyBindings;
expect(config[Command.HOME]).toBeDefined();
});
it('should have correct specific bindings', () => {
// Verify navigation ignores shift
const navUp = defaultKeyBindings[Command.NAVIGATION_UP];
expect(navUp).toContainEqual({ key: 'up', shift: false });
const navDown = defaultKeyBindings[Command.NAVIGATION_DOWN];
expect(navDown).toContainEqual({ key: 'down', shift: false });
// Verify dialog navigation
const dialogNavUp = defaultKeyBindings[Command.DIALOG_NAVIGATION_UP];
expect(dialogNavUp).toContainEqual({ key: 'up', shift: false });
expect(dialogNavUp).toContainEqual({ key: 'k', shift: false });
const dialogNavDown = defaultKeyBindings[Command.DIALOG_NAVIGATION_DOWN];
expect(dialogNavDown).toContainEqual({ key: 'down', shift: false });
expect(dialogNavDown).toContainEqual({ key: 'j', shift: false });
// Verify physical home/end keys for cursor movement
expect(defaultKeyBindings[Command.HOME]).toContainEqual({
key: 'home',
ctrl: false,
shift: false,
});
expect(defaultKeyBindings[Command.END]).toContainEqual({
key: 'end',
ctrl: false,
shift: false,
});
// Verify physical home/end keys for scrolling
expect(defaultKeyBindings[Command.SCROLL_HOME]).toContainEqual({
key: 'home',
ctrl: true,
});
expect(defaultKeyBindings[Command.SCROLL_END]).toContainEqual({
key: 'end',
ctrl: true,
});
});
});
describe('command metadata', () => {