From 0153cb8c16380c32a1d555fb3e54feb5a79e4126 Mon Sep 17 00:00:00 2001 From: Yelloween <134299963+Yelloween10@users.noreply.github.com> Date: Wed, 23 Oct 2024 02:11:33 +0300 Subject: [PATCH] Fix incorrect MODIFIER_MASK value Updated key modifier mask and documented API change Changed the old value Changed the old value inside the .expected file Resolved Conflicts Moved changes to the end --- core/os/keyboard.h | 2 +- doc/classes/@GlobalScope.xml | 2 +- misc/extension_api_validation/4.3-stable.expected | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/os/keyboard.h b/core/os/keyboard.h index 20519733363..1485c519872 100644 --- a/core/os/keyboard.h +++ b/core/os/keyboard.h @@ -249,7 +249,7 @@ enum class Key { enum class KeyModifierMask { CODE_MASK = ((1 << 23) - 1), ///< Apply this mask to any keycode to remove modifiers. - MODIFIER_MASK = (0x7F << 22), ///< Apply this mask to isolate modifiers. + MODIFIER_MASK = (0x7F << 24), ///< Apply this mask to isolate modifiers. //RESERVED = (1 << 23), CMD_OR_CTRL = (1 << 24), SHIFT = (1 << 25), diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index eb22fa087ad..a68d03b07ea 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2365,7 +2365,7 @@ Key Code mask. - + Modifier key mask. diff --git a/misc/extension_api_validation/4.3-stable.expected b/misc/extension_api_validation/4.3-stable.expected index f347c95b2c6..5a27302a126 100644 --- a/misc/extension_api_validation/4.3-stable.expected +++ b/misc/extension_api_validation/4.3-stable.expected @@ -261,3 +261,10 @@ Validate extension JSON: Error: Field 'classes/PointLight2D/properties/texture': Property hints modified to disallow resource types that don't work. The types allowed are now more restricted, but this change only impacts the editor and not the actual exposed API. No adjustments should be necessary. Decal properties were previously changed from Texture to Texture2D in 4.2, so we need to silence those warnings too. + + +GH-98441 +-------- +Validate extension JSON: Error: Field 'global_enums/KeyModifierMask/values/KEY_MODIFIER_MASK': value changed value in new API, from 5.32677e+08 to 2130706432. + +Key modifier mask value corrected. API change documented for compatibility.