From 4b777397b57ef840de756500cc3807988c3eb487 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 4 Mar 2024 14:15:28 -0500 Subject: [PATCH] Kernel: Define bitwise operations for KeyModifier This type is designed to be use as a flag. Define bitwise operations for convenience. --- Kernel/API/KeyCode.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kernel/API/KeyCode.h b/Kernel/API/KeyCode.h index cd1ddd8560..d05a24563a 100644 --- a/Kernel/API/KeyCode.h +++ b/Kernel/API/KeyCode.h @@ -6,6 +6,7 @@ #pragma once +#include #include #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 };