What happens when you press a key on the keyboard? So if I'm sitting at Word or something and I type in something like "hello computerphile"
What actually happens between me hitting the 'h' of the keyboard and the computer displaying the 'h' on screen?
So we're looking at: How does the actual key press go from me physically pressing the key to the computer painting the letter on the screen,
and the same applies whether we are typing into a word processor or whether we are playing a game or anything that's requiring user input.
There's a chain which starts off with the hardware, where we have a key that we're pressing
that's my finger there
and then we're gonna end up in the software
with the computer displaying the 'h' on screen.
How does that actually happen? What's going on between these two things? Well, I mean...
The first place to start is "How does the system actually work?", and in many ways it's no different from your light switch.
I mean, what the switch is there is, you effectively got an electrical circuit and you've got a switch
and when we press the button on the thing, we close that circuit, and then the current can pass through and we can get an electrical signal.
Typically, in a computer system of the mid-80s for example, that'd be +5V, these days it's 4V, +3.3...
It doesn't matter; there's a certain voltage which signals that key as being pressed.
How many different possibilities are there from a keyboard?
Obviously you got all the keys, and then you've got Shift and all the keys, you got Alt and all the keys... you know, there are all sorts of possibilites
Do you know how many there are in total?
Err, probably... Well, I mean... what was it?
I think it's a [PCY3?] keyboard, is the standard, so... Let's say there's 100 keys on a keyboard, roughly, if we think about... you got 26 letters of the alphabet
Ten numbers, numeric keypad, that's got another
One, tw...
Sixteen or so on it
All the other keys... I think you're looking roughly, when you count more function keys, Help, Home, Clear, PgUp, PgDown, Shift, Left shift, Right shift...
Control, Alt, Delete...
Theoretically, there's probably 2¹⁰⁰ different possible combinations of keys you could press
from none of them being pressed to all of them being pressed, and all the combinations inbetween.