Remove sequence binding (#16664)

This commit is contained in:
Tommaso Sciortino
2026-01-14 15:09:09 -08:00
committed by GitHub
parent 5ed275ce39
commit fb7640886b
5 changed files with 9 additions and 58 deletions
+3 -6
View File
@@ -28,12 +28,9 @@ describe('keyBindings config', () => {
it('should have valid key binding structures', () => {
for (const [_, bindings] of Object.entries(defaultKeyBindings)) {
for (const binding of bindings) {
// Each binding should have either key or sequence, but not both
const hasKey = binding.key !== undefined;
const hasSequence = binding.sequence !== undefined;
expect(hasKey || hasSequence).toBe(true);
expect(hasKey && hasSequence).toBe(false);
// Each binding must have a key name
expect(typeof binding.key).toBe('string');
expect(binding.key.length).toBeGreaterThan(0);
// Modifier properties should be boolean or undefined
if (binding.ctrl !== undefined) {
+2 -7
View File
@@ -94,9 +94,7 @@ export enum Command {
*/
export interface KeyBinding {
/** The key name (e.g., 'a', 'return', 'tab', 'escape') */
key?: string;
/** The key sequence (e.g., '\x18' for Ctrl+X) - alternative to key name */
sequence?: string;
key: string;
/** Control key requirement: true=must be pressed, false=must not be pressed, undefined=ignore */
ctrl?: boolean;
/** Shift key requirement: true=must be pressed, false=must not be pressed, undefined=ignore */
@@ -221,10 +219,7 @@ export const defaultKeyBindings: KeyBindingConfig = {
],
// External tools
[Command.OPEN_EXTERNAL_EDITOR]: [
{ key: 'x', ctrl: true },
{ sequence: '\x18', ctrl: true },
],
[Command.OPEN_EXTERNAL_EDITOR]: [{ key: 'x', ctrl: true }],
[Command.PASTE_CLIPBOARD]: [
{ key: 'v', ctrl: true },
{ key: 'v', command: true },