public void processInput() {
        // Handle mouse events
        while(Mouse.next()) {
            for (Listener listener : listeners)
                if(listener.handleMouseEvent())
                    break;
        }
        
        // Handle keyboard events
        while(Keyboard.next()) {
            for (Listener listener : listeners)
                if(listener.handleKeyboardEvent())
                    break;
        }
    }