Kernel: Define bitwise operations for KeyModifier

This type is designed to be use as a flag. Define bitwise operations for
convenience.
This commit is contained in:
Timothy Flynn 2024-03-04 14:15:28 -05:00 committed by Andreas Kling
parent 8f3b97e095
commit 4b777397b5
Notes: sideshowbarker 2024-07-17 00:59:43 +09:00

View File

@ -6,6 +6,7 @@
#pragma once
#include <AK/EnumBits.h>
#include <AK/Types.h>
#define ENUMERATE_KEY_CODES \
@ -167,6 +168,8 @@ enum KeyModifier {
Is_Press = 0x80,
};
AK_ENUM_BITWISE_OPERATORS(KeyModifier);
struct KeyEvent {
KeyCode key { Key_Invalid };
u8 map_entry_index { 0 };