This seems kind of dumb but I'm using an InputAction class to handle my player movement and controls, trying to keep it all centralized, all is well until I try to use an arrow key.
InputHandler() {
keyboard.set("forward", KeyInput.KEY_W);
keyboard.set("backward", KeyInput.KEY_S);
...
keyboard.set("camLeft", KeyInput.KEY_LEFT);
}
public void performAction(InputActionEvent iae) {
char c = iae.getTriggerCharacter();
if (c == 'a') {...
How do I know based purely on the inputactionevent what action is occuring here? I can't use the char because for the arrow keys that wouldn't work and really it seems like I should be using the "backward" and "camLeft" and not looking at the key. I know the old way of handling keys pressed is still available, is it just not practical to use the input system like this? Should I just move the code to the game loop and use the older check all commands to see if they are active setup? It seems like I'm missing something obvious here.