mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Use physical shortcuts for freelook navigation in the editor
(cherry picked from commit 52de40310a)
This commit is contained in:
parent
4762303f18
commit
b17f0f593e
6 changed files with 29 additions and 24 deletions
|
|
@ -474,10 +474,15 @@ String InputEventKey::to_string() {
|
|||
return vformat("InputEventKey: keycode=%s, mods=%s, physical=%s, pressed=%s, echo=%s", kc, mods, physical, p, e);
|
||||
}
|
||||
|
||||
Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode) {
|
||||
Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode, bool p_physical) {
|
||||
Ref<InputEventKey> ie;
|
||||
ie.instantiate();
|
||||
ie->set_keycode(p_keycode & KeyModifierMask::CODE_MASK);
|
||||
if (p_physical) {
|
||||
ie->set_physical_keycode(p_keycode & KeyModifierMask::CODE_MASK);
|
||||
} else {
|
||||
ie->set_keycode(p_keycode & KeyModifierMask::CODE_MASK);
|
||||
}
|
||||
|
||||
ie->set_unicode(char32_t(p_keycode & KeyModifierMask::CODE_MASK));
|
||||
|
||||
if ((p_keycode & KeyModifierMask::SHIFT) != Key::NONE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue