forked from XiaoMo/ChatGPT-Next-Web
feat(SubmitKey): add MetaEnter option
Add another option for MacOS user who prefer Cmd+Enter or Linux user who prefer Meta+Enter.
This commit is contained in:
parent
8f498075b9
commit
d822f333c2
@ -131,6 +131,7 @@ function useSubmitHandler() {
|
|||||||
(config.submitKey === SubmitKey.AltEnter && e.altKey) ||
|
(config.submitKey === SubmitKey.AltEnter && e.altKey) ||
|
||||||
(config.submitKey === SubmitKey.CtrlEnter && e.ctrlKey) ||
|
(config.submitKey === SubmitKey.CtrlEnter && e.ctrlKey) ||
|
||||||
(config.submitKey === SubmitKey.ShiftEnter && e.shiftKey) ||
|
(config.submitKey === SubmitKey.ShiftEnter && e.shiftKey) ||
|
||||||
|
(config.submitKey === SubmitKey.MetaEnter && e.metaKey) ||
|
||||||
(config.submitKey === SubmitKey.Enter &&
|
(config.submitKey === SubmitKey.Enter &&
|
||||||
!e.altKey &&
|
!e.altKey &&
|
||||||
!e.ctrlKey &&
|
!e.ctrlKey &&
|
||||||
|
@ -21,6 +21,7 @@ export enum SubmitKey {
|
|||||||
CtrlEnter = "Ctrl + Enter",
|
CtrlEnter = "Ctrl + Enter",
|
||||||
ShiftEnter = "Shift + Enter",
|
ShiftEnter = "Shift + Enter",
|
||||||
AltEnter = "Alt + Enter",
|
AltEnter = "Alt + Enter",
|
||||||
|
MetaEnter = "Meta + Enter",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Theme {
|
export enum Theme {
|
||||||
|
Loading…
Reference in New Issue
Block a user