bindings: add bindings for shift-up/down (select and scroll)

This commit is contained in:
Andrzej Rybczak
2015-09-27 03:58:59 +02:00
parent 6ad3de7366
commit d96a6f0b65
3 changed files with 13 additions and 0 deletions

1
NEWS
View File

@@ -32,6 +32,7 @@ ncmpcpp-0.7 (????-??-??)
* Output of the visualizer now scales automatically as long as 'visualizer_sample_multiplier' is set to 1.
* Command line switch that prints current song to the standard output is available once again.
* Defined action chains are now shown in help screen.
* Action chains for selecting an item and scrolling up/down are now bound to Shift-Up and Shift-Down respectively.
ncmpcpp-0.6.7 (2015-09-12)
* Fetching artist info from last.fm was fixed.

View File

@@ -154,9 +154,17 @@
#def_key "up"
# scroll_up
#
#def_key "shift-up"
# select_item
# scroll_up
#
#def_key "down"
# scroll_down
#
#def_key "shift-down"
# select_item
# scroll_down
#
#def_key "["
# scroll_up_album
#

View File

@@ -471,8 +471,12 @@ void BindingsConfiguration::generateDefaults()
bind(k, Actions::Type::MouseEvent);
if (notBound(k = stringToKey("up")))
bind(k, Actions::Type::ScrollUp);
if (notBound(k = stringToKey("shift-up")))
bind(k, Binding::ActionChain({ &Actions::get(Actions::Type::SelectItem), &Actions::get(Actions::Type::ScrollUp) }));
if (notBound(k = stringToKey("down")))
bind(k, Actions::Type::ScrollDown);
if (notBound(k = stringToKey("shift-down")))
bind(k, Binding::ActionChain({ &Actions::get(Actions::Type::SelectItem), &Actions::get(Actions::Type::ScrollDown) }));
if (notBound(k = stringToKey("[")))
bind(k, Actions::Type::ScrollUpAlbum);
if (notBound(k = stringToKey("]")))