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

Support numpad keycodes #13

Open
hatmix opened this issue Jun 7, 2024 · 0 comments
Open

Support numpad keycodes #13

hatmix opened this issue Jun 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@hatmix
Copy link

hatmix commented Jun 7, 2024

Feature Description

(This is actually a minor bug, but a bigger enhancement request...) If a numpad keycode, KEY_KP_* is encountered, it causes the error Invalid get index 'Kp...' (on base: 'Dictionary') because the KEY_KP_ entries are missing from the _KEYS array. Quick fix is to add those to _KEYS, however this just leads to an empty texture. That can also be addressed (one way is to parse out the "Kp " before looking for the texture), but it leads to a bigger question. How can the UI differentiate between numpad keys and their non-numpad equivalents?

Is there some way I missed to handle this?

If I haven't missed something, I imagine two possibilities. Show two textures for numpad keys (numlock and the key), or use a color to differentiate (red is already used in the high-res Kenney icons, so this seems reasonable).

image

The meaning of the red color for numpad keys might be explained by adding a keyboard representation colored the same way (for example, imagine extending the keyboard below with a red keypad)

image
(Keyboard is from openclipart.org, the rest is from Kenney's)

What do you think? Have you dealt with this a different way?

Contribution Request

Yes

Additional Notes (Optional)

No response

@hatmix hatmix added the enhancement New feature or request label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants