For historical reasons, there are at least three different and partially compatible scan code sets. Fortunately, by default, all keyboards support the scan code set #2, which is the one we will focus on in the following. Each time a key is pressed (any key, including a shift or control...