From aabdddbbf7092c83369b77617ce5eb2b7af3dde8 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 28 Dec 2018 20:14:31 -0400 Subject: (g), (G) to select first, last item in listings --- README.md | 1 + ui.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index c59f80b..379db82 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ You're also welcome to share any ideas, suggestions, and questions through there * Ctrl+C - exit * Up and Down - select previous or next item in a listing * Tab and Shift+Tab - switch between UI elements +* g and G - move to the first and last item in a listing * 1 - focus the main track/group listing * 2 - focus the queue listing * Enter - play the selected track diff --git a/ui.js b/ui.js index 43c72bc..7013ea5 100644 --- a/ui.js +++ b/ui.js @@ -938,6 +938,11 @@ class GrouplikeListingElement extends Form { this.loadParentGrouplike() } else if (telc.isCharacter(keyBuf, '/') || keyBuf[0] === 6) { // '/', ctrl-F this.showJumpElement() + } else if (telc.isCharacter(keyBuf, 'g')) { + this.form.selectAndShow(this.grouplike.items[0]) + this.form.scrollToBeginning() + } else if (telc.isCharacter(keyBuf, 'G')) { + this.form.selectAndShow(this.grouplike.items[this.grouplike.items.length - 1]) } else { return super.keyPressed(keyBuf) } -- cgit 1.3.0-6-gf8a5