curseradio icon indicating copy to clipboard operation
curseradio copied to clipboard

Please add vi(1) key binding

Open rjc opened this issue 6 years ago • 3 comments
trafficstars

Most console/curses programs support vi(1) key bindings - hjkl - out of the box, so having those in addition (instead of?) to the arrow keys, would be great! :^)

Yes, this would mean remapping stop (currently k) to some other key - p (for pause) seems like the best candidate.

How about also using h and l for collapse and expand, i.e. open/close folders, respectively, instead of/additionally to Enter?

For those of us who keep our hands on the home row, this would be invaluable :^)

Anyway, just a handful of ideas.

rjc avatar Apr 02 '19 13:04 rjc

Please try this configuration:

$ cat .config/curseradio/curseradio.cfg  
[opml]
root = http://opml.radiotime.com/

[playback]
command = /usr/local/bin/mpv

[interface]
keymap = vi

[keymap.vi]
up = k
down = j
start = KEY_HOME
end = KEY_END
pageup = KEY_PPAGE
pagedown = KEY_NPAGE
enter = KEY_ENTER
stop = p
exit = q
favourite = f

elewarr avatar Apr 05 '19 19:04 elewarr

And for parent shortcut: https://github.com/chronitis/curseradio/pull/17

elewarr avatar Apr 05 '19 19:04 elewarr

First two sections are obviously redundant - especially if, like me, you'd like to use the same config on OpenBSD, Linux, and macOS(?). You an I both know that - this is meant for those who copy stuff from the web verbatim ;^)

With a minor modification - enter = l (home row, remember?) - and your PR #17, this is pretty much what I had in mind. With p to toggle play/pause (well, obviously there's no pause in live streaming but you know what I mean), and having it all by default, this would be exactly what I need! :^P

Thanks! :^D

rjc avatar Apr 06 '19 11:04 rjc