mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Add missing YEN, SECTION and OPENURL names to keycode mappings
(cherry picked from commit 8908ac4e6e
)
This commit is contained in:
parent
3c84e5a947
commit
90b8a2ae8c
@ -420,6 +420,10 @@ void register_global_constants() {
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, LAUNCHD);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, LAUNCHE);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, LAUNCHF);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, GLOBE);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KEYBOARD);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_EISU);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_KANA);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, UNKNOWN);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, SPACE);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, EXCLAM);
|
||||
@ -492,10 +496,6 @@ void register_global_constants() {
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, ASCIITILDE);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, YEN);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, SECTION);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, GLOBE);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KEYBOARD);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_EISU);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_KANA);
|
||||
|
||||
BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(KeyModifierMask, KEY_CODE_MASK, CODE_MASK);
|
||||
BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(KeyModifierMask, KEY_MODIFIER_MASK, MODIFIER_MASK);
|
||||
|
@ -146,6 +146,7 @@ static const _KeyCodeText _keycodes[] = {
|
||||
{Key::FAVORITES ,"Favorites"},
|
||||
{Key::SEARCH ,"Search"},
|
||||
{Key::STANDBY ,"StandBy"},
|
||||
{Key::OPENURL ,"OpenURL"},
|
||||
{Key::LAUNCHMAIL ,"LaunchMail"},
|
||||
{Key::LAUNCHMEDIA ,"LaunchMedia"},
|
||||
{Key::LAUNCH0 ,"Launch0"},
|
||||
@ -238,6 +239,8 @@ static const _KeyCodeText _keycodes[] = {
|
||||
{Key::BAR ,"Bar"},
|
||||
{Key::BRACERIGHT ,"BraceRight"},
|
||||
{Key::ASCIITILDE ,"AsciiTilde"},
|
||||
{Key::YEN ,"Yen"},
|
||||
{Key::SECTION ,"Section"},
|
||||
{Key::NONE ,nullptr}
|
||||
/* clang-format on */
|
||||
};
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
#include "core/string/ustring.h"
|
||||
|
||||
// Keep the values in this enum in sync with `_keycodes` in `keyboard.cpp`,
|
||||
// and the bindings in `core_constants.cpp`.
|
||||
enum class Key {
|
||||
NONE = 0,
|
||||
// Special key: The strategy here is similar to the one used by toolkits,
|
||||
|
@ -2032,6 +2032,18 @@
|
||||
<constant name="KEY_LAUNCHF" value="4194415" enum="Key">
|
||||
Launch Shortcut F key.
|
||||
</constant>
|
||||
<constant name="KEY_GLOBE" value="4194416" enum="Key">
|
||||
"Globe" key on Mac / iPad keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_KEYBOARD" value="4194417" enum="Key">
|
||||
"On-screen keyboard" key on iPad keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_JIS_EISU" value="4194418" enum="Key">
|
||||
英数 key on Mac keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_JIS_KANA" value="4194419" enum="Key">
|
||||
かな key on Mac keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_UNKNOWN" value="8388607" enum="Key">
|
||||
Unknown key.
|
||||
</constant>
|
||||
@ -2248,18 +2260,6 @@
|
||||
<constant name="KEY_SECTION" value="167" enum="Key">
|
||||
§ key.
|
||||
</constant>
|
||||
<constant name="KEY_GLOBE" value="4194416" enum="Key">
|
||||
"Globe" key on Mac / iPad keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_KEYBOARD" value="4194417" enum="Key">
|
||||
"On-screen keyboard" key iPad keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_JIS_EISU" value="4194418" enum="Key">
|
||||
英数 key on Mac keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_JIS_KANA" value="4194419" enum="Key">
|
||||
かな key on Mac keyboard.
|
||||
</constant>
|
||||
<constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true">
|
||||
Key Code mask.
|
||||
</constant>
|
||||
|
Loading…
Reference in New Issue
Block a user