Skip to content

Commit 0153cb8

Browse files
committed
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
1 parent abf4796 commit 0153cb8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

core/os/keyboard.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ enum class Key {
249249

250250
enum class KeyModifierMask {
251251
CODE_MASK = ((1 << 23) - 1), ///< Apply this mask to any keycode to remove modifiers.
252-
MODIFIER_MASK = (0x7F << 22), ///< Apply this mask to isolate modifiers.
252+
MODIFIER_MASK = (0x7F << 24), ///< Apply this mask to isolate modifiers.
253253
//RESERVED = (1 << 23),
254254
CMD_OR_CTRL = (1 << 24),
255255
SHIFT = (1 << 25),

doc/classes/@GlobalScope.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@
23652365
<constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true">
23662366
Key Code mask.
23672367
</constant>
2368-
<constant name="KEY_MODIFIER_MASK" value="532676608" enum="KeyModifierMask" is_bitfield="true">
2368+
<constant name="KEY_MODIFIER_MASK" value="2130706432" enum="KeyModifierMask" is_bitfield="true">
23692369
Modifier key mask.
23702370
</constant>
23712371
<constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask" is_bitfield="true">

misc/extension_api_validation/4.3-stable.expected

+7
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,10 @@ Validate extension JSON: Error: Field 'classes/PointLight2D/properties/texture':
261261

262262
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.
263263
Decal properties were previously changed from Texture to Texture2D in 4.2, so we need to silence those warnings too.
264+
265+
266+
GH-98441
267+
--------
268+
Validate extension JSON: Error: Field 'global_enums/KeyModifierMask/values/KEY_MODIFIER_MASK': value changed value in new API, from 5.32677e+08 to 2130706432.
269+
270+
Key modifier mask value corrected. API change documented for compatibility.

0 commit comments

Comments
 (0)