mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
hotkey for adjusting tree width
This commit is contained in:
parent
0d46d548b9
commit
92f923effe
|
@ -193,9 +193,11 @@ the browser has the following hotkeys
|
|||
* `U/O` skip 10sec back/forward
|
||||
* `J/L` prev/next song
|
||||
* `P` play/pause (also starts playing the folder)
|
||||
* when tree-sidebar is open:
|
||||
* `A/D` adjust tree width
|
||||
* in the grid view:
|
||||
* `S` toggle multiselect
|
||||
* `A/D` zoom
|
||||
* shift+`A/D` zoom
|
||||
|
||||
|
||||
## tree-mode
|
||||
|
|
|
@ -1729,10 +1729,14 @@ document.onkeydown = function (e) {
|
|||
if (!document.activeElement || document.activeElement != document.body && document.activeElement.nodeName.toLowerCase() != 'a')
|
||||
return;
|
||||
|
||||
if (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey || e.isComposing)
|
||||
if (e.ctrlKey || e.altKey || e.metaKey || e.isComposing)
|
||||
return;
|
||||
|
||||
var k = (e.code + ''), pos = -1, n;
|
||||
|
||||
if (e.shiftKey && k != 'KeyA' && k != 'KeyD')
|
||||
return;
|
||||
|
||||
if (k.indexOf('Digit') === 0)
|
||||
pos = parseInt(k.slice(-1)) * 0.1;
|
||||
|
||||
|
@ -1768,6 +1772,14 @@ document.onkeydown = function (e) {
|
|||
if (k == 'KeyT')
|
||||
return ebi('thumbs').click();
|
||||
|
||||
if (!treectl.hidden && (!e.shiftKey || !thegrid.en)) {
|
||||
if (k == 'KeyA')
|
||||
return QS('#twig').click();
|
||||
|
||||
if (k == 'KeyD')
|
||||
return QS('#twobytwo').click();
|
||||
}
|
||||
|
||||
if (thegrid.en) {
|
||||
if (k == 'KeyS')
|
||||
return ebi('gridsel').click();
|
||||
|
|
Loading…
Reference in a new issue