You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Use physical keys for numpad emulation in the 3D editor
This makes numpad emulation work on non-QWERTY keyboard layouts more reliably.
This commit is contained in:
@@ -2042,7 +2042,7 @@ void SpatialEditorViewport::_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 uint32_t code = k->get_scancode();
|
const uint32_t code = k->get_physical_scancode();
|
||||||
if (code >= KEY_0 && code <= KEY_9) {
|
if (code >= KEY_0 && code <= KEY_9) {
|
||||||
k->set_scancode(code - KEY_0 + KEY_KP_0);
|
k->set_scancode(code - KEY_0 + KEY_KP_0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user