1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-11 08:24:58 +01:00

Merge pull request #4770 from h3poteto/iss-4653/mac-key

Fix shortcut key for mac
This commit is contained in:
AkiraFukushima 2024-01-13 11:29:51 +09:00 committed by GitHub
commit ea60b6313d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ export default function Compose(props: Props) {
const handleKeyPress = useCallback(
(event: KeyboardEvent) => {
if (event.ctrlKey === true && event.key === 'Enter') {
if ((event.ctrlKey === true && event.key === 'Enter') || (event.metaKey === true && event.key === 'Enter')) {
post()
}
},

View File

@ -32,7 +32,7 @@ export default function Timeline(props: Props) {
const scrollerRef = useRef<HTMLElement | null>(null)
const streaming = useRef<WebSocketInterface | null>(null)
const composeRef = useRef<HTMLDivElement | null>(null)
useHotkeys('ctrl+r', () => reload())
useHotkeys('mod+r', () => reload())
useEffect(() => {
const observer = new ResizeObserver(entries => {