mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-29 22:44:45 -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
|
#### Editing
|
||||||
|
|
||||||
| Action | Keys |
|
| Action | Keys |
|
||||||
| ------------------------------------------------ | -------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------ | --------------------------------------------------------- |
|
||||||
| Delete from the cursor to the end of the line. | `Ctrl + K` |
|
| Delete from the cursor to the end of the line. | `Ctrl + K` |
|
||||||
| Delete from the cursor to the start of the line. | `Ctrl + U` |
|
| Delete from the cursor to the start of the line. | `Ctrl + U` |
|
||||||
| Clear all text in the input field. | `Ctrl + C` |
|
| 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 previous word. | `Ctrl + Backspace`<br />`Cmd + Backspace`<br />`Ctrl + W` |
|
||||||
| Delete the next word. | `Ctrl + Delete`<br />`Cmd + Delete` |
|
| 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 left. | `Backspace`<br />`Ctrl + H` |
|
||||||
| Delete the character to the right. | `Delete`<br />`Ctrl + D` |
|
| Delete the character to the right. | `Delete`<br />`Ctrl + D` |
|
||||||
| Undo the most recent text edit. | `Ctrl + Z (no Shift)` |
|
| Undo the most recent text edit. | `Ctrl + Z (no Shift)` |
|
||||||
| Redo the most recent undone text edit. | `Ctrl + Shift + Z` |
|
| Redo the most recent undone text edit. | `Ctrl + Shift + Z` |
|
||||||
|
|
||||||
#### Screen Control
|
#### Screen Control
|
||||||
|
|
||||||
|
|||||||
@@ -136,8 +136,6 @@ export const defaultKeyBindings: KeyBindingConfig = {
|
|||||||
[Command.DELETE_WORD_BACKWARD]: [
|
[Command.DELETE_WORD_BACKWARD]: [
|
||||||
{ key: 'backspace', ctrl: true },
|
{ key: 'backspace', ctrl: true },
|
||||||
{ key: 'backspace', command: true },
|
{ key: 'backspace', command: true },
|
||||||
{ sequence: '\x7f', ctrl: true },
|
|
||||||
{ sequence: '\x7f', command: true },
|
|
||||||
{ key: 'w', ctrl: true },
|
{ key: 'w', ctrl: true },
|
||||||
],
|
],
|
||||||
[Command.MOVE_LEFT]: [
|
[Command.MOVE_LEFT]: [
|
||||||
@@ -158,11 +156,7 @@ export const defaultKeyBindings: KeyBindingConfig = {
|
|||||||
{ key: 'right', command: true },
|
{ key: 'right', command: true },
|
||||||
{ key: 'f', command: true },
|
{ key: 'f', command: true },
|
||||||
],
|
],
|
||||||
[Command.DELETE_CHAR_LEFT]: [
|
[Command.DELETE_CHAR_LEFT]: [{ key: 'backspace' }, { key: 'h', ctrl: true }],
|
||||||
{ key: 'backspace' },
|
|
||||||
{ sequence: '\x7f' },
|
|
||||||
{ key: 'h', ctrl: true },
|
|
||||||
],
|
|
||||||
[Command.DELETE_CHAR_RIGHT]: [{ key: 'delete' }, { key: 'd', ctrl: true }],
|
[Command.DELETE_CHAR_RIGHT]: [{ key: 'delete' }, { key: 'd', ctrl: true }],
|
||||||
[Command.DELETE_WORD_FORWARD]: [
|
[Command.DELETE_WORD_FORWARD]: [
|
||||||
{ key: 'delete', ctrl: true },
|
{ key: 'delete', ctrl: true },
|
||||||
|
|||||||
@@ -102,11 +102,7 @@ describe('keyMatchers', () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
command: Command.DELETE_CHAR_LEFT,
|
command: Command.DELETE_CHAR_LEFT,
|
||||||
positive: [
|
positive: [createKey('backspace'), createKey('h', { ctrl: true })],
|
||||||
createKey('backspace'),
|
|
||||||
{ ...createKey('\x7f'), sequence: '\x7f' },
|
|
||||||
createKey('h', { ctrl: true }),
|
|
||||||
],
|
|
||||||
negative: [createKey('h'), createKey('x', { ctrl: true })],
|
negative: [createKey('h'), createKey('x', { ctrl: true })],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -119,8 +115,6 @@ describe('keyMatchers', () => {
|
|||||||
positive: [
|
positive: [
|
||||||
createKey('backspace', { ctrl: true }),
|
createKey('backspace', { ctrl: true }),
|
||||||
createKey('backspace', { meta: true }),
|
createKey('backspace', { meta: true }),
|
||||||
{ ...createKey('\x7f', { ctrl: true }), sequence: '\x7f' },
|
|
||||||
{ ...createKey('\x7f', { meta: true }), sequence: '\x7f' },
|
|
||||||
createKey('w', { ctrl: true }),
|
createKey('w', { ctrl: true }),
|
||||||
],
|
],
|
||||||
negative: [createKey('backspace'), createKey('delete', { ctrl: true })],
|
negative: [createKey('backspace'), createKey('delete', { ctrl: true })],
|
||||||
|
|||||||
Reference in New Issue
Block a user