1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:47:35 +00:00

Taskbar+Desktop: Add super+D keyboard shortcut

This shortcut has the same effect as pressing the "Show Desktop" button
in the taskbar. This shortcut already exists in Windows.
This commit is contained in:
Olivier De Cannière 2022-06-01 13:40:43 +02:00 committed by Andreas Kling
parent 12682f0bcc
commit 5a3321b899
7 changed files with 38 additions and 0 deletions

View file

@ -344,6 +344,10 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event)
warnln("failed to spawn 'Assistant' when requested via Super+Space");
break;
}
case GUI::Event::WM_SuperDKeyPressed: {
toggle_show_desktop();
break;
}
case GUI::Event::WM_SuperDigitKeyPressed: {
auto& digit_event = static_cast<GUI::WMSuperDigitKeyPressedEvent&>(event);
auto index = digit_event.digit() != 0 ? digit_event.digit() - 1 : 9;