This was my very first take with no research on what happens when you press in Chrome with Google.com in the address bar:
- press enter on keyboard
- some switch gets connected
- hardware encodes signal for key to go over USB
- sends signal over USB
- computer gets enter signal
- driver gets signal from keyboard
- signal translated into an OS-level event probably was pressed
- OS knows what program has focus, dispatches event to that program