use physical keys for numpad emulation in the editor

This allows non-qwerty keyboard to benefit from this features
This commit is contained in:
Geoffroy Warin 2022-02-12 20:40:39 +01:00
parent d3a6b6daaa
commit cf90394d10

View file

@ -1883,7 +1883,7 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
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) {
k->set_keycode(code - Key::KEY_0 + Key::KP_0);
}