What is the scancode?
very few people recognize how many calculations, codes and processes are used only to get a character from the computer keyboard to the screen. One part of this feature is Scancode or Hexadecimal Code, which is the equivalent of the key to the keyboard. Scancode is available for each keyboard key and there is another separate Scancode when the key is released. Keyboards for different character structures, such as Asian languages, will have a different number of scancods because the number of keys is different. When you press the button, the code is located in the buffer area so that the computer can process and then add a character or recognize the key.
The entire keyboard process can be divided into several different steps. When the key is pressed, Scancode enters the keyboard buffer. While in the buffer the interruption is used to talk to the computer that something has been pushed on the keyboard. After understanding that the key was pushed, the computer looks in the buffer, checks the hexadecimal code, and then adds a character or its ATribut on the screen. Text keys are commonly used - containing letters, numbers and symbols - but control characters are also used. Control characters are those that do no symbol but affect the processing of a document or characters such as the keys "Shift" or "Enter".
Every key on the keyboard has two different scancods, one for pressing and one to release. When the key is pushed, it gives one scancode and the other code adds 128 to the hex value. This might seem useless because it seems that it is rare for someone to hold the key for a few seconds, but it is often done with some control characters such as "Shift" or "delete" keys.
Hexadecimal value for each key varies depending on the keyboard. Each company has its own keyboard, and although configuration can be similar or even the same as others, Scancodes may be different. This is usually supposed to allowManufacturers create a keyboard with different keys configurations or add new features on the keyboard, such as the "Print" key.
Another factor in determining the hexadecimal value of each key is the tongue for which it is made. For example, Japanese and English keyboards have a different number of keys because the number of characters used varies. Different English -speaking countries such as the United States and England also have different keyboards; Most English keyboards have 102 keys and most American keyboards have 101.