mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-19 12:00:32 +02:00
Allow posting using Command+Enter on mac
This commit is contained in:
@@ -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">
|
||||
|
Reference in New Issue
Block a user