In general, virtual-key codes do not correspond to ASCII codes or any other character-encoding standard. Pressing the A key on any keyboard generates the same virtual-key code. Virtual-key codes are device-independent. The keyboard driver translates scan codes into virtual-key codes. You will almost never care about scan codes. Scan codes vary from one keyboard to the next, and there are separate scan codes for key-up and key-down events. When you press a key, the hardware generates a scan code. á (if the keyboard supports combining diacritics)įurther, if the ALT key is held down, pressing the A key produces ALT+A, which the system does not treat as a character at all, but rather as a system command.For example, pressing the A key could result in any of the following characters. When thinking about keyboard input, it is important to remember that a key stroke is not the same as a character. Key strokes that invoke system functions for example, ALT + TAB to switch windows. Key strokes that invoke application functions for example, CTRL + O to open a file. Text that the user types into a document or edit box. The keyboard is used for several distinct types of input, including:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |