Remove F shortcut for photo zooming

This commit is contained in:
Sam Becker 2025-04-25 20:11:23 -05:00
parent 63e843e2d6
commit 4d5d57b6ba
2 changed files with 0 additions and 9 deletions

View File

@ -19,7 +19,6 @@ export default function ZoomControls({
selectImageElement?:
(container: HTMLElement | null) => HTMLImageElement | null
isEnabled?: boolean
shouldZoomOnFKeydown?: boolean
}) {
const refImageContainer = useRef<HTMLDivElement>(null);

View File

@ -1,6 +1,5 @@
import useMetaThemeColor from '@/utility/useMetaThemeColor';
import { useAppState } from '@/state/AppState';
import useKeydownHandler from '@/utility/useKeydownHandler';
import {
ComponentProps,
RefObject,
@ -16,7 +15,6 @@ export default function useImageZoomControls({
refImageContainer,
selectImageElement,
isEnabled,
shouldZoomOnFKeydown,
} : {
refImageContainer: RefObject<HTMLElement | null>
} & Omit<ComponentProps<typeof ZoomControls>, 'ref' | 'children'>) {
@ -46,12 +44,6 @@ export default function useImageZoomControls({
viewerRef.current?.reset();
}, []);
// On 'F' keydown, toggle fullscreen
const onKeyDown = useCallback(() => {
if (shouldZoomOnFKeydown) { open(); }
}, [shouldZoomOnFKeydown, open]);
useKeydownHandler({ onKeyDown, keys: ['F'] });
useEffect(() => {
if (isEnabled) {
const imageRef = (