I'm looking for an efficient keyboard input system for a game in Java. At present I'm using some code I found here:
it seems a little inefficient however (please comment as to your thoughts on the code). The full code is available here:
I've only just started looking into a new solution and pulling the code apart, but does anybody have any suggestions for an efficient way of doing this in a main game loop (including an explanation)? Any help would be appreciated.