mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-03 18:57:43 +01:00
Fix shortcut key for mac
This commit is contained in:
parent
e7ca7c3bea
commit
3f03424608
@ -148,7 +148,7 @@ export default function Compose(props: Props) {
|
|||||||
|
|
||||||
const handleKeyPress = useCallback(
|
const handleKeyPress = useCallback(
|
||||||
(event: KeyboardEvent) => {
|
(event: KeyboardEvent) => {
|
||||||
if (event.ctrlKey === true && event.key === 'Enter') {
|
if ((event.ctrlKey === true && event.key === 'Enter') || (event.metaKey === true && event.key === 'Enter')) {
|
||||||
post()
|
post()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -32,7 +32,7 @@ export default function Timeline(props: Props) {
|
|||||||
const scrollerRef = useRef<HTMLElement | null>(null)
|
const scrollerRef = useRef<HTMLElement | null>(null)
|
||||||
const streaming = useRef<WebSocketInterface | null>(null)
|
const streaming = useRef<WebSocketInterface | null>(null)
|
||||||
const composeRef = useRef<HTMLDivElement | null>(null)
|
const composeRef = useRef<HTMLDivElement | null>(null)
|
||||||
useHotkeys('ctrl+r', () => reload())
|
useHotkeys('mod+r', () => reload())
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const observer = new ResizeObserver(entries => {
|
const observer = new ResizeObserver(entries => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user