Web blocks with listeners to catch key press and mouse clocks in the entire screen.
Place the required event web block in your screen and just define the handler.
Those events are listeners for the entire screen, so, in:
On Click: every time you click in any point of the application window, it will react;
OnKeyPress: every time you click in a key from your keyboard with the application window on focus, it will react.