diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-03 12:32:15 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-03 12:32:15 +0100 |
commit | 5e40aa4f1a4f5e9c36a0e071f53bc25d857fd18f (patch) | |
tree | 2b4c3605302f346c6060e65fdcf733e42b0c0dd0 /Kernel | |
parent | 725b57fe1fd99b00a432b84299839109b2fa3ff9 (diff) | |
download | serenity-5e40aa4f1a4f5e9c36a0e071f53bc25d857fd18f.zip |
LibGUI: Move shortcut actions from GEventLoop to GApplications.
I'm gonna want to have nested event loops sooner or later, so let's not
pollute GEventLoop with things that are meant to work globally.
This patch also changes key events to pass around their modifiers as a
bitfield all the way around the system instead of breaking them up.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/KeyCode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/KeyCode.h b/Kernel/KeyCode.h index 4394bd2f60..558ebcfcdc 100644 --- a/Kernel/KeyCode.h +++ b/Kernel/KeyCode.h @@ -113,6 +113,8 @@ enum KeyModifier { Mod_Alt = 0x01, Mod_Ctrl = 0x02, Mod_Shift = 0x04, + Mod_Mask = 0x07, + Is_Press = 0x80, }; @@ -123,5 +125,6 @@ struct KeyEvent { bool alt() const { return flags & Mod_Alt; } bool ctrl() const { return flags & Mod_Ctrl; } bool shift() const { return flags & Mod_Shift; } + unsigned modifiers() const { return flags & Mod_Mask; } bool is_press() const { return flags & Is_Press; } }; |