The process of you pressing a key on a keyboard, and your PC knowing which one has been pressed, involves a fair amount of processing, both by your keyboard and the PC. You keyboard has an electronic membrane that sits beneath the actual keys, which behaves like lots of tiny switches. By pressing keys, you're effectively turns these switches on, and then off again when the key is released. As a switch is closed, some logic is performed on the keyboard itself to determine which key has been pressed. Once the keyboard has established this, it then knows what binary code to send down the wire to the PC (the keyboard has firmware inbuilt to allow it to know what codes to send for each key thats been pressed). Depending on the type of system, this code may or may not be based upon ASCII codes (ASCII codes are a numeric way to represent letters, numbers and symbols). Either way, the code that represents the key you've just pressed will be encoded on the keyboard itself into binary, and sent down the wire. Your PC is constantly monitoring inputs from your keyboard, and when a signal is received, it's decoded, and processed. The received code will tell your PC what key has been pressed, and your PC's software will then act upon that information. Depending on the software running, this could be just about anything, but often results in the key you just pressed being displayed onscreen.