LWJGL: No Keyboard events in Ubuntu / Linux

Running the jbullet demo just now, I noticed mouse events were handled but none of the keyboard events were handled. Stepping through the code it seemed no events were captured by LWJGL’s Keyboard class. Spotted this “Keyboard does not respond on Linux” discussion on LWJGL’s forum which has the answer (ibus isn’t handled correctly) but doesn’t provide a copy-paste solution for “do you haz teh codez” visitors (as I was just now) who just want to overcome the immediate hurdle of the non-functioning LWJGL Keyboard.

This works for me:

XMODIFIERS="@im=none"; java -Djava.library.path=../lib/lwjgl/linux/ -jar jbullet.jar

Leave a Reply

Your email address will not be published. Required fields are marked *