mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-12 18:06:56 +02:00
LibWeb: Define a helper constant for the platform ctrl-ish key
For all intents and purposes, the cmd (super) key on macOS should be treated as the ctrl key. (cherry picked from commit 71b25e3e5a70937f1e2031b94541c04a68d28efa; amended to fix minor conflict)
This commit is contained in:
committed by
Nico Weber
parent
6f9cdc377e
commit
02fae575ca
@@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/EnumBits.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
#define ENUMERATE_KEY_CODES \
|
||||
@@ -166,6 +167,12 @@ enum KeyModifier {
|
||||
Mod_Mask = Mod_Alt | Mod_Ctrl | Mod_Shift | Mod_Super | Mod_AltGr | Mod_Keypad,
|
||||
|
||||
Is_Press = 0x80,
|
||||
|
||||
#if defined(AK_OS_MACOS)
|
||||
Mod_PlatformCtrl = Mod_Super,
|
||||
#else
|
||||
Mod_PlatformCtrl = Mod_Ctrl,
|
||||
#endif
|
||||
};
|
||||
|
||||
AK_ENUM_BITWISE_OPERATORS(KeyModifier);
|
||||
|
||||
Reference in New Issue
Block a user