Event-driven programming
In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by external events. User interface (UI) events from keyboards and mice, touchpads and touchscreens, and external sensor inputs are common cases.