« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md10
-rw-r--r--ui.js10
2 files changed, 9 insertions, 11 deletions
diff --git a/README.md b/README.md
index 53a31c7..b5bbc47 100644
--- a/README.md
+++ b/README.md
@@ -24,12 +24,12 @@ playlist.json file (usually generated by http-music or downloaded from online).
 * <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
-* <kbd>Space</kbd>, <kbd>p</kbd>, or <kbd>k</kbd> - toggle pause
+* <kbd><kbd>Shift</kbd>+<kbd>Up</kbd></kbd> or <kbd>p</kbd> - play previous track
+* <kbd><kbd>Shift</kbd>+<kbd>Down</kbd></kbd> or <kbd>n</kbd> - play next track
+* <kbd>Space</kbd> - toggle pause
 * <kbd>Escape</kbd> - stop playing the current track
-* <kbd>Right</kbd> or <kbd>l</kbd> - seek ahead
-* <kbd>Left</kbd> or <kbd>j</kbd> - seek back
+* <kbd>Right</kbd> - seek ahead
+* <kbd>Left</kbd> - seek back
 * **In the main listing:**
   * <kbd>Enter</kbd> - if the selected item is a group, enter it; otherwise play it
   * <kbd>Backspace</kbd> - leave the current group (if in one)
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)