From 6e4cf06ea657f360c8a98fbd5080ae45a0df8376 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Sat, 13 Dec 2025 10:48:41 +0800 Subject: [PATCH 1/2] feat: shortcuts case insensitive --- src/features/shortcuts.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/shortcuts.ts b/src/features/shortcuts.ts index 926b0fab8..37353e76d 100644 --- a/src/features/shortcuts.ts +++ b/src/features/shortcuts.ts @@ -15,6 +15,7 @@ export function shortcuts(restart: () => void): () => void { let actionRunning = false async function onInput(input: string) { if (actionRunning) return + input = input.trim().toLowerCase() const SHORTCUTS: Shortcut[] = [ { key: 'r', @@ -51,8 +52,8 @@ export function shortcuts(restart: () => void): () => void { globalLogger.info( dim` press ` + - bold`${shortcut.key} + enter` + - dim` to ${shortcut.description}`, + bold`${shortcut.key} + enter` + + dim` to ${shortcut.description}`, ) } From 5852aeea2a353ae6535c8447b706192be27e1fe8 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Sat, 13 Dec 2025 10:49:55 +0800 Subject: [PATCH 2/2] chore: format --- src/features/shortcuts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/shortcuts.ts b/src/features/shortcuts.ts index 37353e76d..1e70e0fdd 100644 --- a/src/features/shortcuts.ts +++ b/src/features/shortcuts.ts @@ -52,8 +52,8 @@ export function shortcuts(restart: () => void): () => void { globalLogger.info( dim` press ` + - bold`${shortcut.key} + enter` + - dim` to ${shortcut.description}`, + bold`${shortcut.key} + enter` + + dim` to ${shortcut.description}`, ) }