Bind Play to Backspace by default
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
* Reduce CPU usage of the frequency spectrum visualizer.
|
* Reduce CPU usage of the frequency spectrum visualizer.
|
||||||
* Enable Link Time Optimization by default.
|
* Enable Link Time Optimization by default.
|
||||||
* Enable full sorting of items in the local browser if it's not.
|
* 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)
|
# ncmpcpp-0.9 (2020-12-20)
|
||||||
* Fix various Mopidy specific bugs.
|
* Fix various Mopidy specific bugs.
|
||||||
|
|||||||
@@ -152,7 +152,6 @@
|
|||||||
##
|
##
|
||||||
## - set_volume
|
## - set_volume
|
||||||
## - load
|
## - load
|
||||||
## - play
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
#def_key "mouse"
|
#def_key "mouse"
|
||||||
@@ -328,6 +327,9 @@
|
|||||||
#def_key "backspace"
|
#def_key "backspace"
|
||||||
# replay_song
|
# replay_song
|
||||||
#
|
#
|
||||||
|
#def_key "backspace"
|
||||||
|
# play
|
||||||
|
#
|
||||||
#def_key "f"
|
#def_key "f"
|
||||||
# seek_forward
|
# seek_forward
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -797,6 +797,11 @@ void DeleteStoredPlaylist::run()
|
|||||||
myPlaylistEditor->requestPlaylistsUpdate();
|
myPlaylistEditor->requestPlaylistsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReplaySong::canBeRun()
|
||||||
|
{
|
||||||
|
return Status::State::currentSongPosition() >= 0;
|
||||||
|
}
|
||||||
|
|
||||||
void ReplaySong::run()
|
void ReplaySong::run()
|
||||||
{
|
{
|
||||||
Mpd.Play(Status::State::currentSongPosition());
|
Mpd.Play(Status::State::currentSongPosition());
|
||||||
|
|||||||
@@ -495,6 +495,7 @@ struct ReplaySong: BaseAction
|
|||||||
ReplaySong(): BaseAction(Type::ReplaySong, "replay_song") { }
|
ReplaySong(): BaseAction(Type::ReplaySong, "replay_song") { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual bool canBeRun() override;
|
||||||
virtual void run() override;
|
virtual void run() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -610,6 +610,7 @@ void BindingsConfiguration::generateDefaults()
|
|||||||
{
|
{
|
||||||
bind(k, Actions::Type::JumpToParentDirectory);
|
bind(k, Actions::Type::JumpToParentDirectory);
|
||||||
bind(k, Actions::Type::ReplaySong);
|
bind(k, Actions::Type::ReplaySong);
|
||||||
|
bind(k, Actions::Type::Play);
|
||||||
}
|
}
|
||||||
if (notBound(k = stringToKey("f")))
|
if (notBound(k = stringToKey("f")))
|
||||||
bind(k, Actions::Type::SeekForward);
|
bind(k, Actions::Type::SeekForward);
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ void write_bindings(NC::Scrollpad &w)
|
|||||||
key(w, Type::Pause, "Pause");
|
key(w, Type::Pause, "Pause");
|
||||||
key(w, Type::Next, "Next track");
|
key(w, Type::Next, "Next track");
|
||||||
key(w, Type::Previous, "Previous 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::SeekForward, "Seek forward in playing song");
|
||||||
key(w, Type::SeekBackward, "Seek backward in playing song");
|
key(w, Type::SeekBackward, "Seek backward in playing song");
|
||||||
key(w, Type::VolumeDown,
|
key(w, Type::VolumeDown,
|
||||||
|
|||||||
Reference in New Issue
Block a user