From 332a40a1980a7f246fd67e0a91cdbf104f46bf41 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 15 Sep 2019 18:38:48 -0300 Subject: Add Home/End support to scroll to top/bottom --- README.md | 2 +- todo.txt | 6 ++++-- tui-lib | 2 +- ui.js | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 282452a..6d01683 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ You're also welcome to share any ideas, suggestions, and questions through there * Ctrl+C - exit * Up and Down - select previous or next item in a listing * Tab and Shift+Tab - switch between UI elements -* g and G (shift+G) - move to the first and last item in a listing +* g and G (shift+G) or Home and End - move to the first and last item in a listing * [ - focus the main track/group listing * ] - focus the queue listing * Enter - play the selected track diff --git a/todo.txt b/todo.txt index 2163271..45cee2f 100644 --- a/todo.txt +++ b/todo.txt @@ -353,8 +353,10 @@ TODO: g/G should work for navigation in context menus! And probably all TODO: PageUp/PageDown support is complicated to implement (I've tried) and should come eventually, but for now just make Home/End work as aliases - for g/G. This means making it possible for the keybinding system to let - a single input function return true for multiple different keys! + for g/G. ~~This means making it possible for the keybinding system to let + a single input function return true for multiple different keys!~~ + Actually, we already had that part implemented. :P + (Done!) TODO: Work out the BIGGER framerate shenanigans. Specifically: down with the render interval! Or, more literally, get rid of it altogether. Only diff --git a/tui-lib b/tui-lib index f397462..3b94a56 160000 --- a/tui-lib +++ b/tui-lib @@ -1 +1 @@ -Subproject commit f3974627bddb9f62132bf54bde3a66c87dbf7b23 +Subproject commit 3b94a56ecad81980448cb1f7f78acd8e58ab0c67 diff --git a/ui.js b/ui.js index bdc4258..b1eb7c4 100644 --- a/ui.js +++ b/ui.js @@ -60,6 +60,8 @@ const keyBindings = [ ['isMenu', 'f'], ['isScrollToStart', 'g', {caseless: false}], ['isScrollToEnd', 'G', {caseless: false}], + ['isScrollToStart', telc.isHome], + ['isScrollToEnd', telc.isEnd], ['isTogglePause', telc.isSpace], ['isToggleLoop', 'l', {caseless: false}], ['isStop', telc.isEscape], -- cgit 1.3.0-6-gf8a5