mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
remove unnecessary \x7f key bindings (#16646)
This commit is contained in:
committed by
GitHub
parent
a3234fb534
commit
09a7301d80
@@ -26,17 +26,17 @@ available combinations.
|
||||
|
||||
#### Editing
|
||||
|
||||
| Action | Keys |
|
||||
| ------------------------------------------------ | -------------------------------------------------------------------------------------------- |
|
||||
| Delete from the cursor to the end of the line. | `Ctrl + K` |
|
||||
| Delete from the cursor to the start of the line. | `Ctrl + U` |
|
||||
| Clear all text in the input field. | `Ctrl + C` |
|
||||
| Delete the previous word. | `Ctrl + Backspace`<br />`Cmd + Backspace`<br />`Ctrl + ""`<br />`Cmd + ""`<br />`Ctrl + W` |
|
||||
| Delete the next word. | `Ctrl + Delete`<br />`Cmd + Delete` |
|
||||
| Delete the character to the left. | `Backspace`<br />`""`<br />`Ctrl + H` |
|
||||
| Delete the character to the right. | `Delete`<br />`Ctrl + D` |
|
||||
| Undo the most recent text edit. | `Ctrl + Z (no Shift)` |
|
||||
| Redo the most recent undone text edit. | `Ctrl + Shift + Z` |
|
||||
| Action | Keys |
|
||||
| ------------------------------------------------ | --------------------------------------------------------- |
|
||||
| Delete from the cursor to the end of the line. | `Ctrl + K` |
|
||||
| Delete from the cursor to the start of the line. | `Ctrl + U` |
|
||||
| Clear all text in the input field. | `Ctrl + C` |
|
||||
| Delete the previous word. | `Ctrl + Backspace`<br />`Cmd + Backspace`<br />`Ctrl + W` |
|
||||
| Delete the next word. | `Ctrl + Delete`<br />`Cmd + Delete` |
|
||||
| Delete the character to the left. | `Backspace`<br />`Ctrl + H` |
|
||||
| Delete the character to the right. | `Delete`<br />`Ctrl + D` |
|
||||
| Undo the most recent text edit. | `Ctrl + Z (no Shift)` |
|
||||
| Redo the most recent undone text edit. | `Ctrl + Shift + Z` |
|
||||
|
||||
#### Screen Control
|
||||
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 })],
|
||||
|
||||
Reference in New Issue
Block a user