Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 40b965d in mainline for uspace/lib/usb/hidutkbd.h


Ignore:
Timestamp:
2010-10-14T09:05:03Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
master
Children:
cbc00a4d
Parents:
1880c65
Message:

Add USB keycodes for base keys

Now, all keys of the typewriter part of keyboard are added together
with cursor movement keys. Still missing is keypad and special keys
(multimedia etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/hidutkbd.h

    r1880c65 r40b965d  
    6868#endif
    6969
     70#define __NONPRINT(name, usage_id) \
     71        USB_HIDUT_KBD_KEY(name, usage_id, 0, 0, 0, 0)
     72
    7073/* US alphabet letters */
    7174USB_HIDUT_KBD_KEY(A, 0x04, 'a', 'A', 0, 0)
     
    115118USB_HIDUT_KBD_KEY(SPACE, 0x2C, ' ', 0, 0, 0)
    116119
     120/* Special (printable) characters */
     121USB_HIDUT_KBD_KEY(DASH, 0x2D, '-', '_', 0, 0)
     122USB_HIDUT_KBD_KEY(EQUALS, 0x2E, '=', '+', 0, 0)
     123USB_HIDUT_KBD_KEY(LEFT_BRACKET, 0x2F, '[', '{', 0, 0)
     124USB_HIDUT_KBD_KEY(RIGHT_BRACKET, 0x30, ']', '}', 0, 0)
     125USB_HIDUT_KBD_KEY(BACKSLASH, 0x31, '\\', '|', 0, 0)
     126USB_HIDUT_KBD_KEY(HASH, 0x, '#', '~', 0, 0)
     127USB_HIDUT_KBD_KEY(SEMICOLON, 0x33, ';', ':', 0, 0)
     128USB_HIDUT_KBD_KEY(APOSTROPHE, 0x34, '\'', '"', 0, 0)
     129USB_HIDUT_KBD_KEY(GRAVE_ACCENT, 0x35, '`', '~', 0, 0)
     130USB_HIDUT_KBD_KEY(COMMA, 0x36, ',', '<', 0, 0)
     131USB_HIDUT_KBD_KEY(PERIOD, 0x37, '.', '>', 0, 0)
     132USB_HIDUT_KBD_KEY(SLASH, 0x38, '/', '?', 0, 0)
     133
     134USB_HIDUT_KBD_KEY(CAPS_LOCK, 0x39, 0, 0, 0, 0)
     135
    117136/* Function keys */
    118 USB_HIDUT_KBD_KEY( F1, 0x3A, 0, 0, 0, 0)
    119 USB_HIDUT_KBD_KEY( F2, 0x3B, 0, 0, 0, 0)
    120 USB_HIDUT_KBD_KEY( F3, 0x3C, 0, 0, 0, 0)
    121 USB_HIDUT_KBD_KEY( F4, 0x3D, 0, 0, 0, 0)
    122 USB_HIDUT_KBD_KEY( F5, 0x3E, 0, 0, 0, 0)
    123 USB_HIDUT_KBD_KEY( F6, 0x3F, 0, 0, 0, 0)
    124 USB_HIDUT_KBD_KEY( F7, 0x40, 0, 0, 0, 0)
    125 USB_HIDUT_KBD_KEY( F8, 0x41, 0, 0, 0, 0)
    126 USB_HIDUT_KBD_KEY( F9, 0x42, 0, 0, 0, 0)
    127 USB_HIDUT_KBD_KEY(F10, 0x43, 0, 0, 0, 0)
    128 USB_HIDUT_KBD_KEY(F11, 0x44, 0, 0, 0, 0)
    129 USB_HIDUT_KBD_KEY(F12, 0x45, 0, 0, 0, 0)
     137__NONPRINT( F1, 0x3A)
     138__NONPRINT( F2, 0x3B)
     139__NONPRINT( F3, 0x3C)
     140__NONPRINT( F4, 0x3D)
     141__NONPRINT( F5, 0x3E)
     142__NONPRINT( F6, 0x3F)
     143__NONPRINT( F7, 0x40)
     144__NONPRINT( F8, 0x41)
     145__NONPRINT( F9, 0x42)
     146__NONPRINT(F10, 0x43)
     147__NONPRINT(F11, 0x44)
     148__NONPRINT(F12, 0x45)
     149
     150/* Cursor movement keys & co. */
     151__NONPRINT(PRINT_SCREEN, 0x46)
     152__NONPRINT(SCROLL_LOCK, 0x47)
     153__NONPRINT(PAUSE, 0x48)
     154__NONPRINT(INSERT, 0x49)
     155__NONPRINT(HOME, 0x4A)
     156__NONPRINT(PAGE_UP, 0x4B)
     157__NONPRINT(DELETE, 0x4C)
     158__NONPRINT(END, 0x4D)
     159__NONPRINT(PAGE_DOWN, 0x4E)
     160__NONPRINT(RIGHT_ARROW, 0x4F)
     161__NONPRINT(LEFT_ARROW, 0x50)
     162__NONPRINT(DOWN_ARROW, 0x51)
     163__NONPRINT(UP_ARROW, 0x52)
     164
    130165
    131166
     
    133168/* USB_HIDUT_KBD_KEY(, 0x, '', '', 0, 0) */
    134169
     170#undef __NONPRINT
     171
    135172/**
    136173 * @}
Note: See TracChangeset for help on using the changeset viewer.