« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js5
1 files changed, 5 insertions, 0 deletions
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)
     }