Use input_event struct to encapsulate mouse events