slightly better

This commit is contained in:
2025-10-06 02:16:23 +02:00
parent ba37b94908
commit ac772054c9
35 changed files with 1874 additions and 390 deletions

View File

@ -10,6 +10,9 @@ export interface KeyboardShortcutHandlers {
onDoubleEnter?: () => void
onR?: () => void
onShiftR?: () => void
onC?: () => void
onShiftC?: () => void
onEscape?: () => void
}
const DOUBLE_ENTER_THRESHOLD = 300
@ -77,6 +80,21 @@ export function useKeyboardShortcuts(handlers: KeyboardShortcutHandlers) {
h.onR?.()
}
break
case 'c':
case 'C':
e.preventDefault()
if (e.shiftKey) {
h.onShiftC?.()
} else {
h.onC?.()
}
break
case 'Escape':
e.preventDefault()
h.onEscape?.()
break
}
}