Fix numpad emulation in 3d navigation shortcuts#110428
Fix numpad emulation in 3d navigation shortcuts#110428akien-mga merged 1 commit intogodotengine:masterfrom
Conversation
fe59c42 to
099c740
Compare
|
just noting, since it's marked for cherry pick: the issue probably also exists in versions prior to 4.4, but you have to first toggle |
There was a problem hiding this comment.
Tested locally (Linux/X11, fr-oss keyboard layout), it mostly works as expected.
Ctrl + 2 and Ctrl + Alt + 2 work, but not any of the other viewport split shortcuts like Ctrl + 1. They work after switching to QWERTY, so it's probably due to the original bindings.
To fix this, lines 9546-9551 of node_3d_editor_plugin.cpp should be changed to:
p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/1_viewport", TTRC("1 Viewport"), KeyModifierMask::CMD_OR_CTRL + Key::KEY_1, true), MENU_VIEW_USE_1_VIEWPORT);
p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/2_viewports", TTRC("2 Viewports"), KeyModifierMask::CMD_OR_CTRL + Key::KEY_2, true), MENU_VIEW_USE_2_VIEWPORTS);
p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/2_viewports_alt", TTRC("2 Viewports (Alt)"), KeyModifierMask::ALT + KeyModifierMask::CMD_OR_CTRL + Key::KEY_2, true), MENU_VIEW_USE_2_VIEWPORTS_ALT);
p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/3_viewports", TTRC("3 Viewports"), KeyModifierMask::CMD_OR_CTRL + Key::KEY_3, true), MENU_VIEW_USE_3_VIEWPORTS);
p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/3_viewports_alt", TTRC("3 Viewports (Alt)"), KeyModifierMask::ALT + KeyModifierMask::CMD_OR_CTRL + Key::KEY_3, true), MENU_VIEW_USE_3_VIEWPORTS_ALT);
p->add_radio_check_shortcut(ED_SHORTCUT("spatial_editor/4_viewports", TTRC("4 Viewports"), KeyModifierMask::CMD_OR_CTRL + Key::KEY_4, true), MENU_VIEW_USE_4_VIEWPORTS);This will make the bindings physical, so they work on any keyboard layout.
099c740 to
9ec9d9a
Compare
|
@Calinou updated. |
9ec9d9a to
e3eef8c
Compare
|
rebased. |
Calinou
left a comment
There was a problem hiding this comment.
Tested locally on Windows (AZERTY keyboard layout), it works as expected. Code looks good to me.
|
Thanks! |
Fixes #110427.
I was noticing this issue a while, and I saw it wasn't yet fixed for 4.5, so I tried a quick fix, but not sure if this
duplicateworkaround is how you would do it.