remove unnecessary \x7f key bindings (#16646)

This commit is contained in:
Tommaso Sciortino
2026-01-14 12:08:46 -08:00
committed by GitHub
parent a3234fb534
commit 09a7301d80
3 changed files with 13 additions and 25 deletions

View File

@@ -136,8 +136,6 @@ export const defaultKeyBindings: KeyBindingConfig = {
[Command.DELETE_WORD_BACKWARD]: [
{ key: 'backspace', ctrl: true },
{ key: 'backspace', command: true },
{ sequence: '\x7f', ctrl: true },
{ sequence: '\x7f', command: true },
{ key: 'w', ctrl: true },
],
[Command.MOVE_LEFT]: [
@@ -158,11 +156,7 @@ export const defaultKeyBindings: KeyBindingConfig = {
{ key: 'right', command: true },
{ key: 'f', command: true },
],
[Command.DELETE_CHAR_LEFT]: [
{ key: 'backspace' },
{ sequence: '\x7f' },
{ key: 'h', ctrl: true },
],
[Command.DELETE_CHAR_LEFT]: [{ key: 'backspace' }, { key: 'h', ctrl: true }],
[Command.DELETE_CHAR_RIGHT]: [{ key: 'delete' }, { key: 'd', ctrl: true }],
[Command.DELETE_WORD_FORWARD]: [
{ key: 'delete', ctrl: true },

View File

@@ -102,11 +102,7 @@ describe('keyMatchers', () => {
},
{
command: Command.DELETE_CHAR_LEFT,
positive: [
createKey('backspace'),
{ ...createKey('\x7f'), sequence: '\x7f' },
createKey('h', { ctrl: true }),
],
positive: [createKey('backspace'), createKey('h', { ctrl: true })],
negative: [createKey('h'), createKey('x', { ctrl: true })],
},
{
@@ -119,8 +115,6 @@ describe('keyMatchers', () => {
positive: [
createKey('backspace', { ctrl: true }),
createKey('backspace', { meta: true }),
{ ...createKey('\x7f', { ctrl: true }), sequence: '\x7f' },
{ ...createKey('\x7f', { meta: true }), sequence: '\x7f' },
createKey('w', { ctrl: true }),
],
negative: [createKey('backspace'), createKey('delete', { ctrl: true })],