« get me outta code hell

Make BasicGrouplikeItems respond to menu key - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-10-15 18:31:51 -0300
committerFlorrie <towerofnix@gmail.com>2019-10-15 18:31:51 -0300
commit3a8c4c7dcacdd2f292f9b8d32b3fa88caca46f87 (patch)
tree95143852f4b0fade909815e6885401551e3fdbe5
parent5c2e12b7f8cdc48e1ddb41710e60144f5c778cda (diff)
Make BasicGrouplikeItems respond to menu key
So you can press f/m/etc to open the menu on those options, just like on
interactive grouplike items.
-rw-r--r--ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index a7ad672..a221b04 100644
--- a/ui.js
+++ b/ui.js
@@ -2068,7 +2068,7 @@ class BasicGrouplikeItemElement extends Button {
     // By default for buttons, the space key also works, but since in this app
     // space is generally bound to mean "pause" instead of "select", we don't
     // check if space is pressed here.
-    if (telc.isEnter(keyBuf)) {
+    if (telc.isEnter(keyBuf) || input.isMenu(keyBuf)) {
       this.emit('pressed')
     }
   }