In computer programming, event-driven programming also known as event-based programming is a programming method in which the flow of the program is determined by sensor outputs or user actions (such as mouse clicks, key presses) or by messages from other programs or threads running on the computer. 