mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-29 06:25:16 -07:00
Remove sequence binding (#16664)
This commit is contained in:
committed by
GitHub
parent
5ed275ce39
commit
fb7640886b
@@ -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) {
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user