Numpad Equals not working

Hello,

I’m using Glfw in C# using Glfw.net bindings. I made a simple C# app that prints the key I pressed to the console. Every key prints its correct enum name except for my numpad equals key, that prints Unknown (aka its keycode is -1). The normal equals does work fine.
Does anyone else have this problem?

My specs:

Windows 10 x64
Apply Magic Keyboard:


It has an international layout (not US).

This looks like it could be a bug - looking at the source code for Windows I see the following numpad keys:

whereas for Mac OS we have:

GLFW_KEY_KP_EQUAL is present on the Mac OS list but not the Windows one.

We should create an issue for this on https://github.com/glfw/glfw/issues, if you like I can do it if you don’t have a Github account. We may need to know what the scancode windows produces for this key is - does GLFW net give you this? GLFW does via the key callback: http://www.glfw.org/docs/latest/input_guide.html#input_key.

2 Likes

Hi, yes the Glfw.org enum contains a value “NumpadEquals = 336”. The scancode for the numpad equals key on windows is 89 according to the key callback from glfw.

I don’t know if this is relevant at all but I’m running this inside a .net standard 2.0 app (on windows)

1 Like

Thanks @RobertK92 that’s great info. The scancode 89 is 0x059 and not present in the Windows init source code, so we should be able to resolve this quickly.

Do you want to submit the issue to Github (if so link to this conversation)? If you don’t reply by tomorrow I’ll handle it, and I can submit a fix at the same time (note I’m only asking as some people like to submit the issue they found themselves).

2 Likes

I have posted the issue on github

1 Like

I didn’t get around to that due to being busier than expected, but I see you’ve created it.

I see you have commited a fix, thanks. Happy I could help.

1 Like