fix: ESC key wasn't working in file-show
Massimo Melina committed
Apr 29, 2024 at 15:34 UTC
6840c57a1132d39b5d3df0ca831e47caa7d8f37f
1 file changed
+1
frontend/src/show.ts
+1
@@ -35,6 +35,7 @@ export function fileShow(entry: DirEntry, { startPlaying=false } = {}) {
35
goTo(shuffle[0])
36
}, [shuffle])
37
useEventListener('keydown', ({ key }) => {
38
+ if (key === 'Escape') return close()
39
if (key === 'ArrowLeft') return goPrev()
40
if (key === 'ArrowRight') return goNext()
41
if (key === 'ArrowDown') return scrollY(1)