You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #58024 from geowarin/master
use physical keys for numpad emulation in the editor
This commit is contained in:
@@ -1888,7 +1888,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) {
|
if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) {
|
||||||
const Key code = k->get_keycode();
|
const Key code = k->get_physical_keycode();
|
||||||
if (code >= Key::KEY_0 && code <= Key::KEY_9) {
|
if (code >= Key::KEY_0 && code <= Key::KEY_9) {
|
||||||
k->set_keycode(code - Key::KEY_0 + Key::KP_0);
|
k->set_keycode(code - Key::KEY_0 + Key::KP_0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user