1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 15:15:07 +00:00

Kernel: Implement AltGr key support

This commit is contained in:
Tibor Nagy 2019-12-31 13:37:38 +01:00 committed by Andreas Kling
parent 36f1de3c89
commit 624116a8b1
6 changed files with 36 additions and 15 deletions

View file

@ -119,7 +119,8 @@ enum KeyModifier {
Mod_Ctrl = 0x02,
Mod_Shift = 0x04,
Mod_Logo = 0x08,
Mod_Mask = 0x0f,
Mod_AltGr = 0x10,
Mod_Mask = 0x1f,
Is_Press = 0x80,
};
@ -132,6 +133,7 @@ struct KeyEvent {
bool ctrl() const { return flags & Mod_Ctrl; }
bool shift() const { return flags & Mod_Shift; }
bool logo() const { return flags & Mod_Logo; }
bool altgr() const { return flags & Mod_AltGr; }
unsigned modifiers() const { return flags & Mod_Mask; }
bool is_press() const { return flags & Is_Press; }
};