diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/Piano/MainWidget.cpp | 3 | ||||
-rw-r--r-- | Userland/Applications/Piano/PlayerWidget.cpp | 5 | ||||
-rw-r--r-- | Userland/Applications/Piano/PlayerWidget.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Applications/Piano/MainWidget.cpp b/Userland/Applications/Piano/MainWidget.cpp index 571a86de98..2c83269f73 100644 --- a/Userland/Applications/Piano/MainWidget.cpp +++ b/Userland/Applications/Piano/MainWidget.cpp @@ -119,6 +119,9 @@ void MainWidget::special_key_action(int key_code) case Key_C: m_knobs_widget->cycle_waveform(); break; + case Key_Space: + m_player_widget->toggle_paused(); + break; } } diff --git a/Userland/Applications/Piano/PlayerWidget.cpp b/Userland/Applications/Piano/PlayerWidget.cpp index 50201e9747..2ef688431f 100644 --- a/Userland/Applications/Piano/PlayerWidget.cpp +++ b/Userland/Applications/Piano/PlayerWidget.cpp @@ -112,3 +112,8 @@ void PlayerWidget::next_track() { m_track_dropdown->set_selected_index(m_track_manager.next_track_index()); } + +void PlayerWidget::toggle_paused() +{ + m_play_button->click(); +} diff --git a/Userland/Applications/Piano/PlayerWidget.h b/Userland/Applications/Piano/PlayerWidget.h index 19a6198392..2164d0b2c7 100644 --- a/Userland/Applications/Piano/PlayerWidget.h +++ b/Userland/Applications/Piano/PlayerWidget.h @@ -18,6 +18,7 @@ public: void add_track(); void next_track(); + void toggle_paused(); private: explicit PlayerWidget(TrackManager&, AudioPlayerLoop&); |