« get me outta code hell

Misc. control changes - 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:
authorFlorrie <towerofnix@gmail.com>2018-07-02 23:51:48 -0300
committerFlorrie <towerofnix@gmail.com>2018-07-02 23:51:50 -0300
commit1ec8d7987879d8717dc251cbbdbd419622c5b6e2 (patch)
treee0694dd18bb35269c0334961cb6e0b2434a29942 /ui.js
parent4612f37b2a7b3402253fc7982f6829d668ed326c (diff)
Misc. control changes
No more JKL controls (left, pause, right). P and N mean prev/next.
(P used to mean pause.)
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/ui.js b/ui.js
index 21ac9df..4fe1d8a 100644
--- a/ui.js
+++ b/ui.js
@@ -139,17 +139,15 @@ class AppElement extends FocusElement {
       return
     }
 
-    if (telc.isRight(keyBuf) || telc.isCaselessLetter(keyBuf, 'l')) {
+    if (telc.isRight(keyBuf)) {
       this.seekAhead(10)
-    } else if (telc.isLeft(keyBuf) || telc.isCaselessLetter(keyBuf, 'j')) {
+    } else if (telc.isLeft(keyBuf)) {
       this.seekBack(10)
-    } else if (telc.isCaselessLetter(keyBuf, 'p') || telc.isCaselessLetter(keyBuf, 'k')) {
-      this.togglePause()
     } else if (telc.isEscape(keyBuf)) {
       this.clearPlayingTrack()
-    } else if (telc.isShiftUp(keyBuf)) {
+    } else if (telc.isShiftUp(keyBuf) || telc.isCaselessLetter(keyBuf, 'p')) {
       this.playPreviousTrack(this.playingTrack)
-    } else if (telc.isShiftDown(keyBuf)) {
+    } else if (telc.isShiftDown(keyBuf) || telc.isCaselessLetter(keyBuf, 'n')) {
       this.playNextTrack(this.playingTrack)
     } else if (telc.isCharacter(keyBuf, '1') && this.grouplikeListingElement.selectable) {
       this.form.curIndex = this.form.inputs.indexOf(this.grouplikeListingElement)