mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 15:14:13 +00:00
SoundPlayer: Add keyboard shortcuts for stop and volume
These shortcuts allow us to stop the player (key S) and adjust the volume level (key Up and key Down).
This commit is contained in:
@@ -142,6 +142,15 @@ void SoundPlayerWidgetAdvancedView::keydown_event(GUI::KeyEvent& event)
|
||||
if (event.key() == Key_Space)
|
||||
m_play_button->click();
|
||||
|
||||
if (event.key() == Key_S)
|
||||
m_stop_button->click();
|
||||
|
||||
if (event.key() == Key_Up)
|
||||
m_volume_slider->set_value(m_volume_slider->value() + m_volume_slider->page_step());
|
||||
|
||||
if (event.key() == Key_Down)
|
||||
m_volume_slider->set_value(m_volume_slider->value() - m_volume_slider->page_step());
|
||||
|
||||
GUI::Widget::keydown_event(event);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user