Answer:
Machine works on binary code,for this we first have to convert the scancodes(keyboard) to acsii codes and for understanding the keyboard converts ascii values into scane codes.
For converting ascii values into scan codes
0x5B, 0x5C, 0x5D-Default ascii codes
these three characters are translated with the scancodes.
First,we have to make ascii code table which should resemble the operating system keyboard driver
If characters matches with ascii code table, it automatically converts.The left characters are matched with help of table.
Example
ASCII 0x5C
which then has to be translated into scan codes keyboard driver setting:
Shift key Down 3A
Æ key Down 32
Æ key Up A8
Shift key Up AA
Convert table:
ASCII 0x5C = 3A 38 A8 AA
3A 38 A8 AA these are keys made by ascii table,then these keys are matched using scancode table.