GLFW3: Wrong Keys used

Monkey Targets Forums/Desktop/GLFW3: Wrong Keys used

Shinkiro1(Posted 2016) [#1]
Hey guys,

I get the wrong keys when using KeyHit() and KeyDown() only on GLFW3. (html5 is okay)
I am running macOS 10.11, have a german keyboard layout but use english system language (if that's relevant). When using the code below the output is the reverse of what I expect.
If KeyHit(KEY_Z)
	Print "key z" 'prints y
Elseif KeyHit(KEY_Y)
	Print "key y" 'prints z
End


PS: In the macOS settings for keyboards I only have a german layout.


Shinkiro1(Posted 2016) [#2]
Can anybody reproduce this? Should I probably file a bug report?


Simonsuuri(Posted 2017) [#3]
Im quite sure that it has something to do with german layout.. since german layout the KEY_Z and KEY_Y is swapped

i quess in glfw target takes system language and uses that as ascii map or something...


Xaron(Posted 2017) [#4]
Yes, that's the German Layout and absolutely "normal". ;)


Shinkiro1(Posted 2017) [#5]
I found this issue for glfw: https://github.com/glfw/glfw/issues/464
Seems a workaround would be to use glfwGetKeyText() to get a string representation.