MatthiasM wrote:
Well - the only thing I can say is that LWJGLInput class works correctly in all the demos and you can type a space without issues.
How did you check if space doesn't work - just by looking at the rendered text on screen or also by looking at the getText() return value of the EditField?
It might be that your font does not include a space character (very unlikely).
Thanks for the help. My font does include a space character and spaces work throughout the UI. After digging through the TWL source code, I could not find the bug. However, I was able to work around the bug by calling handleKey with a fake keyCode! Example:
gui.handleKey(Keyboard.KEY_SPACE, ' ', true / false); does not work....
gui.handleKey(Keyboard.KEY_A, ' ', true / false); DOES work and in fact space is correctly placed into the editfield.
I am using this workaround for now as the only use of keys is for EditFields. If you have any idea why space keycode seems to be filtered please let me know! Thanks for the help.