mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
Support command/ctrl/alt backspace correctly (#17175)
This commit is contained in:
committed by
GitHub
parent
e894871afc
commit
f190b87223
@@ -154,9 +154,10 @@ function formatBindings(bindings: readonly KeyBinding[]): string[] {
|
||||
|
||||
function formatBinding(binding: KeyBinding): string {
|
||||
const modifiers: string[] = [];
|
||||
if (binding.ctrl) modifiers.push('Ctrl');
|
||||
if (binding.command) modifiers.push('Cmd');
|
||||
if (binding.shift) modifiers.push('Shift');
|
||||
if (binding.alt) modifiers.push('Alt');
|
||||
if (binding.ctrl) modifiers.push('Ctrl');
|
||||
if (binding.cmd) modifiers.push('Cmd');
|
||||
|
||||
const keyName = formatKeyName(binding.key);
|
||||
if (!keyName) {
|
||||
@@ -167,12 +168,13 @@ function formatBinding(binding: KeyBinding): string {
|
||||
let combo = segments.join(' + ');
|
||||
|
||||
const restrictions: string[] = [];
|
||||
if (binding.ctrl === false) restrictions.push('no Ctrl');
|
||||
if (binding.shift === false) restrictions.push('no Shift');
|
||||
if (binding.command === false) restrictions.push('no Cmd');
|
||||
if (binding.shift === false) restrictions.push('Shift');
|
||||
if (binding.alt === false) restrictions.push('Alt');
|
||||
if (binding.ctrl === false) restrictions.push('Ctrl');
|
||||
if (binding.cmd === false) restrictions.push('Cmd');
|
||||
|
||||
if (restrictions.length > 0) {
|
||||
combo = `${combo} (${restrictions.join(', ')})`;
|
||||
combo = `${combo} (no ${restrictions.join(', ')})`;
|
||||
}
|
||||
|
||||
return combo ? `\`${combo}\`` : '';
|
||||
|
||||
Reference in New Issue
Block a user