mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
LibGUI+WindowServer: Add new WMEvent
Super+Digit
This adds a keyboard event for Super+0 to Super+9. Later to be consumed in the taskbar. Currently only this keyboard sequence is supported: - Super key down - Digit key down But not this: - Super key down - Digit key down - Digit key up - Digit key down
This commit is contained in:
parent
001b08dec9
commit
6992a07afc
6 changed files with 41 additions and 0 deletions
|
@ -66,6 +66,7 @@ public:
|
|||
WM_AppletAreaSizeChanged,
|
||||
WM_SuperKeyPressed,
|
||||
WM_SuperSpaceKeyPressed,
|
||||
WM_SuperDigitKeyPressed,
|
||||
WM_WorkspaceChanged,
|
||||
WM_KeymapChanged,
|
||||
__End_WM_Events,
|
||||
|
@ -115,6 +116,20 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class WMSuperDigitKeyPressedEvent : public WMEvent {
|
||||
public:
|
||||
WMSuperDigitKeyPressedEvent(int client_id, u8 digit)
|
||||
: WMEvent(Event::Type::WM_SuperDigitKeyPressed, client_id, 0)
|
||||
, m_digit(digit)
|
||||
{
|
||||
}
|
||||
|
||||
u8 digit() const { return m_digit; }
|
||||
|
||||
private:
|
||||
u8 m_digit { 0 };
|
||||
};
|
||||
|
||||
class WMAppletAreaSizeChangedEvent : public WMEvent {
|
||||
public:
|
||||
explicit WMAppletAreaSizeChangedEvent(const Gfx::IntSize& size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue