Keyinput callbacks

Using GLFW
Anonymous
2012-06-19
2012-11-08

  • Anonymous
    2012-06-19

    Why doesn't GLFW call callback function when key gets released? It should.

     
  • Camilla Löwy
    Camilla Löwy
    2012-06-19

    Many characters require more than one key to generate. Which of them should
    generate the release event?

     

  • Anonymous
    2012-06-19

    Well maybe it should have one level of indirection… so the callback notifies
    for the 'highlevel' keys as shift + a = A and sends the release for the A
    then. And for the lower level either only shift or shift and a. The missing
    release callback just makes those callbacks a bit trickier to use. I got my
    ways to fix that, but it still would be nice to have it as default

     
  • Camilla Löwy
    Camilla Löwy
    2012-06-19

    If you want notifications about key presses, use the key callback. The char
    callback is for text input.

     
  • Camilla Löwy
    Camilla Löwy
    2012-06-19

    What would you use release notifications for characters for?

     

  • Anonymous
    2012-06-19

    yeah.. but im talking about key releases. those 2 callbacks should also notify
    when key gets released, based on their notifying mechanism on key presses.

     

  • Anonymous
    2012-06-19

    sry didnt notice your last reply. id use release notifications to set the
    state of my internal keys to release, not pressed.

     
  • Camilla Löwy
    Camilla Löwy
    2012-06-19

    The key callback does report key releases. If it doesn't then that's a bug.
    The char callback doesn't report release events because I consider that to be
    a broken concept. In that spirit, GLFW 3 does not have an action parameter for
    the char callback.

     

  • Anonymous
    2012-06-19

    oh i see now. Indeed that is better way to deal with char callback. I remember
    key event having some problems with key releases, dont know if it was due to
    something else in my project. Gotta change the key input to keyevent then :p