You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[Web] Detect host OS and use macOS keys on mac hosts.
This commit is contained in:
@@ -451,11 +451,8 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
}
|
||||
|
||||
/* Ctrl + Hover symbols */
|
||||
#ifdef MACOS_ENABLED
|
||||
if (k->get_keycode() == Key::META) {
|
||||
#else
|
||||
if (k->get_keycode() == Key::CTRL) {
|
||||
#endif
|
||||
bool mac_keys = OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios");
|
||||
if ((mac_keys && k->get_keycode() == Key::META) || (!mac_keys && k->get_keycode() == Key::CTRL)) {
|
||||
if (symbol_lookup_on_click_enabled) {
|
||||
if (k->is_pressed() && !is_dragging_cursor()) {
|
||||
symbol_lookup_new_word = get_word_at_pos(get_local_mouse_pos());
|
||||
|
||||
Reference in New Issue
Block a user