enhance(frontend): Enterでチャットのメッセージを送信できるように
This commit is contained in:
parent
8c1fc85d00
commit
2272eceffa
6 changed files with 78 additions and 13 deletions
|
|
@ -151,8 +151,16 @@ function onDrop(ev: DragEvent): void {
|
|||
}
|
||||
|
||||
function onKeydown(ev: KeyboardEvent) {
|
||||
if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey)) {
|
||||
send();
|
||||
if (ev.key === 'Enter') {
|
||||
if (prefer.s['chat.sendOnEnter']) {
|
||||
if (!(ev.ctrlKey || ev.metaKey || ev.shiftKey)) {
|
||||
send();
|
||||
}
|
||||
} else {
|
||||
if ((ev.ctrlKey || ev.metaKey)) {
|
||||
send();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue