def METHOD_NAME(data, circular_queue):
    """
    3 | LeftButtonPressEvent
    4 | LeftButtonReleaseEvent
    5 | MiddleButtonPressEvent
    6 | MiddleButtonReleaseEvent
    7 | RightButtonPressEvent
    8 | RightButtonReleaseEvent
    """
    on = 0 if data['on'] == 1 else 1
    ctrl = int(data['ctrlKey'])
    shift = int(data['shiftKey'])
    user_envent_ms = float(data['timestampInMs'])
    x = float(data['x'])
    y = float(data['y'])
    mouse_button = int(data['mouseButton'])
    if mouse_button not in [0, 1, 2]:
        return False
    if ctrl not in [0, 1] or shift not in [0, 1]:
        return False
    event_id = (mouse_button + 1) * 2 + on + 1
    ok = circular_queue.enqueue(
        np.array([event_id, 0, x, y, ctrl, shift, user_envent_ms, 0], dtype='float64')
    )
    return ok