diff options
Diffstat (limited to 'core/os/keyboard.cpp')
| -rw-r--r-- | core/os/keyboard.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp index 25a4b320cd..1e32e6e096 100644 --- a/core/os/keyboard.cpp +++ b/core/os/keyboard.cpp @@ -367,11 +367,11 @@ String keycode_get_string(Key p_code) { codestr += "+"; } if ((p_code & KeyModifierMask::CMD_OR_CTRL) != Key::NONE) { -#ifdef MACOS_ENABLED - codestr += find_keycode_name(Key::META); -#else - codestr += find_keycode_name(Key::CTRL); -#endif + if (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) { + codestr += find_keycode_name(Key::META); + } else { + codestr += find_keycode_name(Key::CTRL); + } codestr += "+"; } if ((p_code & KeyModifierMask::CTRL) != Key::NONE) { |
