diff options
-rw-r--r-- | README.md | 2 | ||||
m--------- | tui-lib | 0 | ||||
-rw-r--r-- | ui.js | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md index 564dd03..aff943a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ * <kbd>Up</kbd> and <kbd>Down</kbd> - select previous or next item in a listing * <kbd>PageUp</kbd> and <kbd>PageDown</kbd> - navigate up or down a visible-page-length of a listing (the usual meaning of page-up/down!) * <kbd>Tab</kbd> and <kbd><kbd>Shift</kbd>+<kbd>Tab</kbd></kbd> - switch between UI elements +* <kbd>1</kbd> - focus the main track/group listing +* <kbd>2</kbd> - focus the queue listing * <kbd>Enter</kbd> - play the selected track * <kbd><kbd>Shift</kbd>+<kbd>Up</kbd></kbd> - play previous track * <kbd><kbd>Shift</kbd>+<kbd>Down</kbd></kbd> - play next track diff --git a/tui-lib b/tui-lib -Subproject a3df7cf7205d12ab5e6fc7b5746cae6c4a6a821 +Subproject c42add3c9edb6446a759ae4f5a2b3e81cf56f4f diff --git a/ui.js b/ui.js index 3090873..47270bd 100644 --- a/ui.js +++ b/ui.js @@ -137,6 +137,12 @@ class AppElement extends FocusElement { this.playPreviousTrack(this.playingTrack) } else if (telc.isShiftDown(keyBuf)) { this.playNextTrack(this.playingTrack) + } else if (telc.isCharacter(keyBuf, '1') && this.grouplikeListingElement.selectable) { + this.form.curIndex = this.form.inputs.indexOf(this.grouplikeListingElement) + this.form.updateSelectedElement() + } else if (telc.isCharacter(keyBuf, '2') && this.queueListingElement.selectable) { + this.form.curIndex = this.form.inputs.indexOf(this.queueListingElement) + this.form.updateSelectedElement() } else { super.keyPressed(keyBuf) } |