Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpad 3D shortcuts only work with numlock on #52546

Closed
ghost opened this issue Sep 10, 2021 · 7 comments
Closed

Numpad 3D shortcuts only work with numlock on #52546

ghost opened this issue Sep 10, 2021 · 7 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2021

Godot version

3.4.beta4

System information

Windows 10 Lenovo IdeaPad Flex, keyboard is logitech

Issue description

Keyboard shortcuts for 3D like numpad 5 to switch orthogonal do not work unless numlock is on.

Steps to reproduce

  1. Turn numlock off
  2. press 5 on the numpad
  3. turn numlock on
  4. press 5 on the numpad

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Sep 10, 2021

If you create a script with an _input(event) function and print(event) inside, do you get anything printed when you press numpad keys with numlock disabled in the Output panel?

I wonder if Godot can even "see" the key presses here.

@ghost
Copy link
Author

ghost commented Sep 10, 2021

Yes, the event gets printed out.

@Calinou
Copy link
Member

Calinou commented Sep 10, 2021

I guess this can be fixed by assigning a second shortcut by default once #51273 is merged.

@EricEzaM
Copy link
Contributor

EricEzaM commented Sep 21, 2021

I am quite confident this is 100% expected and correct. The shortcuts for the 3d editor are for Keypad numbers.

The whole point of numlock is that is switches between two different functionalities of the numpad. See below from this site.
image
In Godot, make a script with func _input(event): print(event.as_text()) and with numlock on it will print numbers (KP_8, etc), and with numlock off, it will print home, pageup, end, UNKNOWN, etc (for 7, 9, 1, and 5 respectively).

@akien-mga
Copy link
Member

Indeed, that's expected behavior. We could handle both events for the 3D shortcuts but I don't see much point doing so, as it may conflict with existing shortcuts, or prevent users from using those keys for their own shortcuts.

@Calinou
Copy link
Member

Calinou commented Sep 21, 2021

We could handle both events for the 3D shortcuts but I don't see much point doing so, as it may conflict with existing shortcuts, or prevent users from using those keys for their own shortcuts.

If #51273 is merged, we can support this out of the box while allowing users to customize both shortcuts.

@Calinou
Copy link
Member

Calinou commented Nov 11, 2021

For future reference, I can't reproduce this issue on master on Linux (using the fr-oss keyboard layout). So this appears to have been resolved indirectly somehow.

If this is still needed on other platforms, feel free to use https://github.com/Calinou/godot/tree/editor-shortcut-add-non-numlock-variants as a base. I haven't added all 3D editor shortcuts, but it should be easy to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants