Navigation fixes

This commit is contained in:
ZXY101
2023-10-04 21:00:57 +02:00
parent 04cf5a8a53
commit 14ec2c5274
2 changed files with 7 additions and 3 deletions

View File

@@ -120,7 +120,9 @@
});
function handleShortcuts(event: KeyboardEvent & { currentTarget: EventTarget & Window }) {
switch (event.code) {
const action = event.code || event.key;
switch (action) {
case 'ArrowLeft':
case 'ArrowUp':
case 'PageUp':
@@ -213,7 +215,7 @@
<svelte:window
on:resize={zoomDefault}
on:keyup|preventDefault={handleShortcuts}
on:keyup={handleShortcuts}
on:touchstart={handleTouchStart}
on:touchend={handlePointerUp}
/>