feat: add new SubmitKey (⌘ + Enter)

This commit is contained in:
iSource 2023-03-28 10:14:06 +08:00
parent 77a3fdea5f
commit e22943d51f
2 changed files with 2 additions and 0 deletions

View File

@ -131,6 +131,7 @@ function useSubmitHandler() {
(config.submitKey === SubmitKey.AltEnter && e.altKey) ||
(config.submitKey === SubmitKey.CtrlEnter && e.ctrlKey) ||
(config.submitKey === SubmitKey.ShiftEnter && e.shiftKey) ||
(config.submitKey === SubmitKey.MetaEnter && e.metaKey) ||
(config.submitKey === SubmitKey.Enter &&
!e.altKey &&
!e.ctrlKey &&

View File

@ -21,6 +21,7 @@ export enum SubmitKey {
CtrlEnter = "Ctrl + Enter",
ShiftEnter = "Shift + Enter",
AltEnter = "Alt + Enter",
MetaEnter = "⌘ + Enter",
}
export enum Theme {