From 1ec8d7987879d8717dc251cbbdbd419622c5b6e2 Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 2 Jul 2018 23:51:48 -0300 Subject: Misc. control changes No more JKL controls (left, pause, right). P and N mean prev/next. (P used to mean pause.) --- README.md | 10 +++++----- ui.js | 10 ++++------ 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). * 1 - focus the main track/group listing * 2 - focus the queue listing * Enter - play the selected track -* Shift+Up - play previous track -* Shift+Down - play next track -* Space, p, or k - toggle pause +* Shift+Up or p - play previous track +* Shift+Down or n - play next track +* Space - toggle pause * Escape - stop playing the current track -* Right or l - seek ahead -* Left or j - seek back +* Right - seek ahead +* Left - seek back * **In the main listing:** * Enter - if the selected item is a group, enter it; otherwise play it * Backspace - 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) -- cgit 1.3.0-6-gf8a5