Add Vi-style keyboard controls (h/j/k/l) for left-handed navigation alongside existing arrow key controls
This commit is contained in:
parent
75298a7acc
commit
b6f5f31b10
@ -13,9 +13,10 @@ A FastAPI-based image server that serves files from directories or ZIP archives
|
||||
- Ordered sequential access with configurable delay
|
||||
- Play/pause toggle for auto-advance
|
||||
- **Keyboard Shortcuts**:
|
||||
- Left/Right Arrow: Navigate previous/next
|
||||
- Left/Right Arrow or H/L: Navigate previous/next
|
||||
- Space: Toggle play/pause
|
||||
- +/-: Increase/decrease slide delay
|
||||
- +/= or J: Increase slide delay
|
||||
- - or K: Decrease slide delay
|
||||
- O: Toggle between ordered and random modes
|
||||
- **MIME Type Detection**: Automatically sets correct content types for served files
|
||||
- **Health Check Endpoint**: Monitor server status and indexed file count
|
||||
|
||||
@ -81,14 +81,14 @@
|
||||
if (e.code === 'Space') {
|
||||
var playBtn = document.querySelector('.play-btn');
|
||||
if (playBtn) playBtn.click();
|
||||
} else if (e.code === 'ArrowLeft') {
|
||||
} else if (e.code === 'ArrowLeft' || e.key.toLowerCase() === 'h') {
|
||||
document.getElementById('prev-btn').click();
|
||||
} else if (e.code === 'ArrowRight') {
|
||||
} else if (e.code === 'ArrowRight' || e.key.toLowerCase() === 'l') {
|
||||
document.getElementById('next-btn').click();
|
||||
} else if (e.code === 'Equal') {
|
||||
} else if (e.code === 'Equal' || e.key.toLowerCase() === 'j') {
|
||||
var params = getRefreshParams();
|
||||
if (params) window.location.href = '/' + params.order + '/' + (params.delay + 1) + '/' + params.hash;
|
||||
} else if (e.code === 'Minus') {
|
||||
} else if (e.code === 'Minus' || e.key.toLowerCase() === 'k') {
|
||||
var params = getRefreshParams();
|
||||
if (params && params.delay > 1) window.location.href = '/' + params.order + '/' + (params.delay - 1) + '/' + params.hash;
|
||||
} else if (e.key.toLowerCase() === 'o') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user