mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-29 11:12:12 +01:00
Allow posting using Command+Enter on mac
This commit is contained in:
parent
2a7cad6d9e
commit
a457f330a1
@ -194,7 +194,7 @@ export default function PostModal({
|
||||
instanceRef={(inst) => (textAreaRef.current = inst)}
|
||||
onPaste={onPaste}
|
||||
onKeyDown={(e) => {
|
||||
if (e.ctrlKey && e.key === "Enter") submit();
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === "Enter") submit();
|
||||
}}
|
||||
/>
|
||||
{previewDraft.content.length > 0 && (
|
||||
|
@ -76,7 +76,7 @@ export default function ChannelMessageForm({
|
||||
ref={textAreaRef}
|
||||
onPaste={onPaste}
|
||||
onKeyDown={(e) => {
|
||||
if (e.ctrlKey && e.key === "Enter" && formRef.current) formRef.current.requestSubmit();
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === "Enter" && formRef.current) formRef.current.requestSubmit();
|
||||
}}
|
||||
/>
|
||||
<Button type="submit">Send</Button>
|
||||
|
@ -92,7 +92,7 @@ export default function SendMessageForm({
|
||||
ref={textAreaRef}
|
||||
onPaste={onPaste}
|
||||
onKeyDown={(e) => {
|
||||
if (e.ctrlKey && e.key === "Enter" && formRef.current) formRef.current.requestSubmit();
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === "Enter" && formRef.current) formRef.current.requestSubmit();
|
||||
}}
|
||||
/>
|
||||
<Button type="submit">Send</Button>
|
||||
|
@ -87,7 +87,7 @@ export default function ReplyForm({ item, onCancel, onSubmitted, replyKind = kin
|
||||
instanceRef={(inst) => (textAreaRef.current = inst)}
|
||||
onPaste={onPaste}
|
||||
onKeyDown={(e) => {
|
||||
if (e.ctrlKey && e.key === "Enter" && formRef.current) formRef.current.requestSubmit();
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === "Enter" && formRef.current) formRef.current.requestSubmit();
|
||||
}}
|
||||
/>
|
||||
<Flex gap="2" alignItems="center">
|
||||
|
Loading…
x
Reference in New Issue
Block a user