Support command/ctrl/alt backspace correctly (#17175)

This commit is contained in:
Tommaso Sciortino
2026-01-21 10:13:26 -08:00
committed by GitHub
parent e894871afc
commit f190b87223
27 changed files with 487 additions and 298 deletions
+5 -3
View File
@@ -280,8 +280,9 @@ export function useVim(buffer: TextBuffer, onSubmit?: (value: string) => void) {
// Special handling for Enter key to allow command submission (lower priority than completion)
if (
normalizedKey.name === 'return' &&
!normalizedKey.alt &&
!normalizedKey.ctrl &&
!normalizedKey.meta
!normalizedKey.cmd
) {
if (buffer.text.trim() && onSubmit) {
// Handle command submission directly
@@ -309,9 +310,10 @@ export function useVim(buffer: TextBuffer, onSubmit?: (value: string) => void) {
(key: Key): Key => ({
name: key.name || '',
sequence: key.sequence || '',
ctrl: key.ctrl || false,
meta: key.meta || false,
shift: key.shift || false,
alt: key.alt || false,
ctrl: key.ctrl || false,
cmd: key.cmd || false,
insertable: key.insertable || false,
}),
[],