But the most important part is to map each key code to some useful output characters. While the whole translation part happening in the drivers described above was necessary to map each key to a well defined key code the approach disregarded a very important fact: not every keyboard layout is the same and in fact the ordering (or labeling) of keys are adapted to the language of the users.
So each key code now needs to be translated into the correct language. At this point we need a key map that describes the labels on the specific keyboard in use.
It would be nice if this would be the only problem at this point but in fact there are different requirements depending on the program receiving the key strokes. There exist two major modes which handle the key input in different ways. One is the kernel console (text mode) and the other one is the X server (graphical mode).
沒有留言:
張貼留言