1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

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

View file

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