Each key has an associated code number so the computer can check the number to see which key is being pressed. The Scan Code for the Left Shift key is (on a typical USB keyboard) 44 and for the Right Shift is 57.
The shift key is used for you to capitalize your letters. It is also used to access and use the symbols that are located above your number keys, along with other keys that contain 2 signs on them,...