mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-03 01:08:05 +09:00
Enter sends message, ctrl/meta/shift + enter makes newline
This commit is contained in:
parent
3b047f1482
commit
7b6665653e
@ -125,7 +125,10 @@ function onDrop(ev: DragEvent): void {
|
|||||||
|
|
||||||
function onKeydown(ev: KeyboardEvent) {
|
function onKeydown(ev: KeyboardEvent) {
|
||||||
typing();
|
typing();
|
||||||
if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey) && canSend) {
|
if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey || ev.shiftKey) && canSend) {
|
||||||
|
textEl.value += '\n'
|
||||||
|
}
|
||||||
|
else if (ev.key === 'Enter' && canSend) {
|
||||||
send();
|
send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user