From 49d5270e296d6948c19bfa67120800ac7975d488 Mon Sep 17 00:00:00 2001 From: Sabine Date: Wed, 16 Jul 2025 10:56:41 +0200 Subject: [PATCH] chore(common): use new namespace km_vk in kmx_processevent.cpp, Compiler.cpp and savekeyboard.cpp --- common/include/keyman_vkey.h | 6 ++++++ core/src/kmx/kmx_processevent.h | 1 + developer/src/kmcmplib/src/Compiler.cpp | 2 ++ developer/src/kmdecomp/savekeyboard.cpp | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/common/include/keyman_vkey.h b/common/include/keyman_vkey.h index fb02a2160b..5c880fcce5 100644 --- a/common/include/keyman_vkey.h +++ b/common/include/keyman_vkey.h @@ -150,4 +150,10 @@ namespace km_vk { #define VK_OEM_CLEAR 0xFE +/* + * VK__MAX _S2 defines the highest virtual key code defined in the system = 0xFF. Custom VK codes start at 256 + */ +#define VK__MAX 255 + + } // namespace km_vk \ No newline at end of file diff --git a/core/src/kmx/kmx_processevent.h b/core/src/kmx/kmx_processevent.h index 8082c37833..af42872e37 100644 --- a/core/src/kmx/kmx_processevent.h +++ b/core/src/kmx/kmx_processevent.h @@ -23,6 +23,7 @@ #include "kmx_options.h" #include "kmx_environment.h" #include "kmx_debugger.h" +#include "../../../common/include/keyman_vkey.h" /***************************************************************************/ diff --git a/developer/src/kmcmplib/src/Compiler.cpp b/developer/src/kmcmplib/src/Compiler.cpp index 3b53453dce..34deae8984 100644 --- a/developer/src/kmcmplib/src/Compiler.cpp +++ b/developer/src/kmcmplib/src/Compiler.cpp @@ -82,6 +82,7 @@ #include "../../../../common/windows/cpp/include/keymanversion.h" #include "../../../../common/windows/cpp/include/crc32.h" #include "../../../../common/windows/cpp/include/ConvertUTF.h" +#include "../../../../common/include/keyman_vkey.h" #include "debugstore.h" #include "NamedCodeConstants.h" @@ -110,6 +111,7 @@ #define SUBLANGID(lgid) ((uint16_t)(lgid) >> 10) using namespace kmcmp; +using namespace km_vk; KMX_BOOL AWarnDeprecatedCode_GLOBAL_LIB; diff --git a/developer/src/kmdecomp/savekeyboard.cpp b/developer/src/kmdecomp/savekeyboard.cpp index e71da93dbd..3d29ae3cfb 100644 --- a/developer/src/kmdecomp/savekeyboard.cpp +++ b/developer/src/kmdecomp/savekeyboard.cpp @@ -31,6 +31,10 @@ #include "../../../common/windows/cpp/include/legacy_kmx_file.h" #include "../../../common/windows/cpp/include/legacy_kmx_memory.h" #include "../../../common/windows/cpp/include/vkeys.h" +#include "../../../common/include/keyman_vkey.h" + +using namespace km_vk + #define SSN__PREFIX L"&"