public void keyPressed(int key) {
        if(key == Input.KEY_LEFT || 
                key == Input.KEY_RIGHT) {
            inMoveStack.add(key);
            if(key == Input.KEY_LEFT) dir = "left";
            else dir = "right";
        }
        inputStack.add(key);
    }