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

Don't interpret K_KP_DOWNARROW and K_KP_UPARROW in console. #269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mickael9
Copy link

@mickael9 mickael9 commented Mar 7, 2017

These map to the 2 and 8 on the keypad which makes it impossible to use them on the console for entering numbers.

This is especially important for AZERTY layouts where the number keys are not directly accessible in the first row and using the keypad is more convenient.

These map to the 2 and 8 on the keypad which makes it impossible to use
them on the console for entering numbers.

This is especially important for AZERTY layouts where the number keys are not
directly accessible in the first row and using the keypad is more
convenient.
@ensiform
Copy link

ensiform commented Mar 8, 2017

IIRC you're supposed to turn numlock off to use the keypad as numbers. However, I think instead of removing this an optional feature to treat keypad binds in the sdl_input.c code as char events when console or chat is open would be a better approach. Cvar optional please.

@mickael9
Copy link
Author

mickael9 commented Mar 8, 2017

Two events are actually emitted, one key event for the UP/DOWN key and then one char event (if numlock is on) with the number, so if you press keypad 2, it first clears the input line permanently (down key) then it adds the number 2.

Maybe adding new K_KP_0..9 (except for 5) keys would be an option, but I think this goes against the spirit of the bindings system where modifiers are never taken into account and keys are just identified by their physical position (eg, you can bind "[" but not "{", those would be equivalent since shift modifier and caps lock are ignored, or more precisely, considered as regular keys).

Adding a cvar for this? I'm not sure if it's worth it since you can still use the normal directional keys or Ctrl-p / Ctrl-n. Besides, who ever has numlock off (not by mistake!) and is actually using the keypad for movement? (Perhaps I'm biased in this regard since I have an AZERTY keyboard and no number keys on the first row without shifting)

Base automatically changed from master to main February 10, 2021 09:26
@BidyBiddle BidyBiddle deleted the no-keypad-movement branch September 24, 2021 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants