The way a computer actually reacts to an input is very simple. There are 3 main steps, input, processing and then the output. The input stage represents the flow of data into outside the system, for example pressing a key. The processing stage represents all tasks required to effect a transformation of the inputs, and turning the input into the output. Then the outputs stage, which represents where the data flow out of the transformation process and where the outcome of the input and the processing happens. For example, when you are playing a game, there would be the input of pressing the key W, then there is the processing, which would be planning the effect, which would be forward movement, so it would process all of the data needed to move forward, such as movement of the camera and generating the terrain, then the output, which is the actual movement being triggered.