You've already forked godot
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user