You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Merge pull request #50070 from timothyqiu/emu-numpad
Add numpad emulation in 3D viewport
This commit is contained in:
@@ -1967,6 +1967,13 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) {
|
||||
const uint32_t code = k->get_keycode();
|
||||
if (code >= KEY_0 && code <= KEY_9) {
|
||||
k->set_keycode(code - KEY_0 + KEY_KP_0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) {
|
||||
if (_edit.mode != TRANSFORM_NONE) {
|
||||
_edit.snap = !_edit.snap;
|
||||
|
||||
Reference in New Issue
Block a user