mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #65241 from bruvzg/no_keymap_ambiguity
Fix key mapping changes when moving from macOS to other platform.
This commit is contained in:
commit
69233093d7
50 changed files with 513 additions and 494 deletions
|
@ -1467,9 +1467,10 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c
|
|||
#ifdef MACOS_ENABLED
|
||||
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
|
||||
if (keycode == Key::KEY_DELETE) {
|
||||
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
|
||||
keycode = KeyModifierMask::META | Key::BACKSPACE;
|
||||
}
|
||||
#endif
|
||||
|
||||
Ref<InputEventKey> ie;
|
||||
if (keycode != Key::NONE) {
|
||||
ie = InputEventKey::create_reference(keycode);
|
||||
|
@ -1500,7 +1501,7 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons
|
|||
#ifdef MACOS_ENABLED
|
||||
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
|
||||
if (keycode == Key::KEY_DELETE) {
|
||||
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
|
||||
keycode = KeyModifierMask::META | Key::BACKSPACE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue