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.

Close

Translating Key Tokens to text

Using GLFW
Doug Binks
2013-08-07
2013-08-15
  • Doug Binks
    Doug Binks
    2013-08-07

    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.

     
  • Camilla Löwy
    Camilla Löwy
    2013-08-07

    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);
    
     
  • Doug Binks
    Doug Binks
    2013-08-07

    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.

     
  • Camilla Löwy
    Camilla Löwy
    2013-08-07

    XKB for X.

     
  • Doug Binks
    Doug Binks
    2013-08-15

    I've now completed this on X11 and also updated the Windows and Cocoa versions to be more consistent.

     
    Last edit: Doug Binks 2013-08-15