Menu

#108 Numpad

closed-later
moderate (59)
5
2009-08-23
2008-09-30
No

I can't seem to grab numpad keys with glutKeyboardFunc or glutSpecialFunc ..

Note, if I have numlock enabled or shift is held down before doing so, then they trigger glutKeyboardFunc with the ascii value for the number being pressed..

Also note, keys 1,3,7, and 9 are triggered because they are respectively correspond to End,PgDn,Home,PgUp.

Is there any way to grab 2,4,5,6,8,./Del,and the numlock key itself?

If not .. could you possibly patch freeglut to do so? :)

And as a temporary alternative .. is it somehow possible to force numlock?

And as a related note ... how about keyboard layout compatibilities? I think this is especially important as I use Dvorak and freeglut behaves as if i've entered the qwerty values. :|

Thanks!

Take care.

Discussion

  • Зхэтадйк

    • assigned_to: nobody --> sjbaker
    • priority: 5 --> 9
    • status: open --> open-accepted
     
  • John F. Fay

    John F. Fay - 2009-02-03

    In running Windows the numeric keypad keys trigger callbacks to the special key function:

    * Releasing NumLock gives a key code of 144; pressing it is not captured.

    * 0 gives a key code of 108 (GLUT_KEY_INSERT)

    * 1 gives a key code of 107 (GLUT_KEY_END)

    * 2 gives a key code of 103 (GLUT_KEY_DOWN)

    * 3 gives a key code of 105 (GLUT_KEY_PAGE_DOWN)

    and so on.

    What system are you using?

     
  • Зхэтадйк

    hm.. i'm currently testing on a laptop with Debian 4.0

    I will test on some other systems and hopefully Debian 5.0 will be released as stable soon.

    Thanks for the feedback .. I will follow up in due time.

     
  • John F. Fay

    John F. Fay - 2009-02-03

    OK, I've managed to duplicate the problem under Red Hat 4. I have just put a fix into the SVN head version. Let me know if it works for you and I will close this ticket.

     
  • Зхэтадйк

    Hm, well .. thank you very much.

    Frankly, I can't exactly follow through just at the moment for a couple of reasons..

    First off, I'm accessing freeglut via the PyOpenGL wrapper (via the Python programming language) and so I would have to wait for a subsequent release of PyOpenGL with an updated freeglut version.

    Also, at the moment the only other non-Debian 4.0 system I have set up is a Windows 2000 machine without OpenGL so I can't even really test that.

    Either way, thank you again for your attention feel free to peek at the long term project I'm working on at HTTP://Libre.K1T.NET/ (revision 471 due out soon with *numerous* modifications)

    Thank you again!

     
  • Зхэтадйк

    • labels: 544421 --> moderate
    • priority: 9 --> 5
    • assigned_to: sjbaker --> fayjf
    • status: open-accepted --> pending-later
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-later --> closed-later
     

Log in to post a comment.