支持自定义消息发送和消息换行快捷键

This commit is contained in:
xintaofei
2026-03-12 08:53:47 +08:00
parent f9771d6f27
commit d75e0cef48
14 changed files with 126 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ import { useIsMac } from "@/hooks/use-is-mac"
import { useShortcutSettings } from "@/hooks/use-shortcut-settings"
import {
DEFAULT_SHORTCUTS,
INPUT_SHORTCUT_IDS,
SHORTCUT_DEFINITIONS,
type ShortcutActionId,
formatShortcutLabel,
@@ -64,7 +65,8 @@ export function ShortcutSettings() {
return
}
const shortcut = shortcutFromKeyboardEvent(event)
const allowNoModifier = INPUT_SHORTCUT_IDS.has(recordingAction)
const shortcut = shortcutFromKeyboardEvent(event, allowNoModifier)
if (!shortcut) return
const conflict = SHORTCUT_DEFINITIONS.find(