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
commit 5a3321b899
Notes: sideshowbarker 2024-07-17 10:32:45 +09:00
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;