Bind Play to Backspace by default

master
Andrzej Rybczak 5 years ago
parent e0fe49e3e3
commit 7e4f3b1917
  1. 1
      CHANGELOG.md
  2. 4
      doc/bindings
  3. 5
      src/actions.cpp
  4. 1
      src/actions.h
  5. 1
      src/bindings.cpp
  6. 2
      src/screens/help.cpp

@ -10,6 +10,7 @@
* Reduce CPU usage of the frequency spectrum visualizer.
* Enable Link Time Optimization by default.
* Enable full sorting of items in the local browser if it's not.
* Bind `Play` to `Backspace` by default.
# ncmpcpp-0.9 (2020-12-20)
* Fix various Mopidy specific bugs.

@ -152,7 +152,6 @@
##
## - set_volume
## - load
## - play
##
#
#def_key "mouse"
@ -328,6 +327,9 @@
#def_key "backspace"
# replay_song
#
#def_key "backspace"
# play
#
#def_key "f"
# seek_forward
#

@ -797,6 +797,11 @@ void DeleteStoredPlaylist::run()
myPlaylistEditor->requestPlaylistsUpdate();
}
bool ReplaySong::canBeRun()
{
return Status::State::currentSongPosition() >= 0;
}
void ReplaySong::run()
{
Mpd.Play(Status::State::currentSongPosition());

@ -495,6 +495,7 @@ struct ReplaySong: BaseAction
ReplaySong(): BaseAction(Type::ReplaySong, "replay_song") { }
private:
virtual bool canBeRun() override;
virtual void run() override;
};

@ -610,6 +610,7 @@ void BindingsConfiguration::generateDefaults()
{
bind(k, Actions::Type::JumpToParentDirectory);
bind(k, Actions::Type::ReplaySong);
bind(k, Actions::Type::Play);
}
if (notBound(k = stringToKey("f")))
bind(k, Actions::Type::SeekForward);

@ -178,7 +178,7 @@ void write_bindings(NC::Scrollpad &w)
key(w, Type::Pause, "Pause");
key(w, Type::Next, "Next track");
key(w, Type::Previous, "Previous track");
key(w, Type::ReplaySong, "Replay the current song");
key(w, Type::ReplaySong, "Replay current song");
key(w, Type::SeekForward, "Seek forward in playing song");
key(w, Type::SeekBackward, "Seek backward in playing song");
key(w, Type::VolumeDown,

Loading…
Cancel
Save