Merge pull request #60768 from Calinou/3d-editor-numpad-emulation-use-physical-keys-3.x

Use physical keys for numpad emulation in the 3D editor
This commit is contained in:
Rémi Verschelde 2022-05-05 08:35:40 +02:00 committed by GitHub
commit 80244cb844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2042,7 +2042,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
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) {
k->set_scancode(code - KEY_0 + KEY_KP_0);
}