Hello Guest

[BUG] Keyboard.getEventCharacter() inconsistent behavior on OS X

  • 2 Replies
  • 6312 Views
Running LWJGL 2.9.1, OS X 10.9, and Java 1.7.0_45 64 bit.

Keyboard.getEventCharacter() returns:
The character value on key down events for typing keys, as expected
The character value on key up events for typing keys (this is questionable, at the very least inconsistent with Windows, where it returns 0)
A character value for some keys that you wouldn't expect it to - for example, for the F1 key, it returns 63236, for delete it returns 127. For other non-typing keys (shift, for example) it returns 0 as expected

Can mostly be worked around, but still wanted to let you know. The good news is so far everything else seems to be working great with the Java 7/OS X combo.

Please let me know if I can provide more info or if you want me to give something a try.

*

Offline Cornix

  • *****
  • 488
Re: [BUG] Keyboard.getEventCharacter() inconsistent behavior on OS X
« Reply #1 on: January 09, 2014, 18:51:44 »
I get key codes for shift, delete and all the other control keys too; and I am working on win 7.
But that is not a problem at all, Java's Character class provides means of filtering them out.

Re: [BUG] Keyboard.getEventCharacter() inconsistent behavior on OS X
« Reply #2 on: January 09, 2014, 19:16:50 »
I'm talking about getEventCharacter(), though, not getEventKey().
« Last Edit: January 09, 2014, 19:19:59 by avm1979 »