mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 18:15:07 +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:
parent
ccced92ac2
commit
f19cb6bb22
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue