Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I need to be able to prompt users with the correct key names to press for actions, and also to allow them to configure their key bindings and display the correct key name rather than the Key Token.
I can't see this functionality present in GLFW 3, and it would be very useful. I'd be willing to help program and test this if it was thought an appropriate addition to GLFW.
This is a planned feature for 3.x. I'd welcome a pull request for this. Here's an initial design:
GLFWAPI const char* glfwGetKeyName(int key);
Great, thanks - I'll look into this next week (busy this week), starting with Windows which I'm more familiar with for this. Anyone with any hints on links to documentation on Linux/OS X feel free to post on this thread.
XKB for X.
I have a working Windows version here: https://github.com/dougbinks/glfw/commit/f4ed02f6c87d2689cb313c1911d846c0f6f1f7cc
Note that I've not yet put stub functions in for the other OSs, but will move on to this and then the OS X and Linux implementations.
The Windows function may need to be changed if this issue is resolved: https://github.com/glfw/glfw/issues/114
Stub methods for OS X and Linux now in: https://github.com/dougbinks/glfw/commit/6edcc75a6bbe6f358a2ba5d5101c6872472cc211
OS X / Cocoa version now working: https://github.com/dougbinks/glfw/commit/9c68e11f2fee44b867bf4d2291399a1915bfd08d
Note this adds a dependency to Carbon framework, so have added this to CMakelists.txt.
I've now completed this on X11 and also updated the Windows and Cocoa versions to be more consistent.