mirror of
https://codeberg.org/armin/noiz.git
synced 2026-09-01 14:00:54 +02:00
Cmd+A / Ctrl+A selects all tracks in playlist
This commit is contained in:
parent
7ff0d0ac95
commit
76fa21d405
1 changed files with 9 additions and 0 deletions
|
|
@ -1562,6 +1562,15 @@ async function collectFiles(entry, files, paths, path, onFile) {
|
|||
}
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT') return;
|
||||
if (e.code === 'KeyA' && (e.metaKey || e.ctrlKey)) {
|
||||
e.preventDefault();
|
||||
if (tracks.length) {
|
||||
selectedIndices = new Set(tracks.keys());
|
||||
anchorTrack = null;
|
||||
renderTracks();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (e.code === 'Space') { e.preventDefault(); playBtn.click(); }
|
||||
if (e.code === 'ArrowRight') nextBtn.click();
|
||||
if (e.code === 'ArrowLeft') prevBtn.click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue