1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

[Web] Detect host OS and use macOS keys on mac hosts.

This commit is contained in:
bruvzg
2022-11-14 16:27:26 +02:00
parent c3ed7af123
commit a5009f4d3c
10 changed files with 71 additions and 48 deletions

View File

@@ -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) {