Event Handling

Handles user interactions like clicks and key events.