Ignore:
Timestamp:
2011-02-04T16:40:10Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
92574f4
Parents:
8c3c756
Message:

Modifiers handling + fixes.

  • Handle modifiers from flags. However, modifiers may be sent also as regular keys, would need to look into that.
  • Changed modifier constants in hidparser.h
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/classes/hidparser.h

    r8c3c756 r4837092  
    7070} usb_hid_report_in_callbacks_t;
    7171
    72 #define USB_HID_BOOT_KEYBOARD_NUM_LOCK          0x01
    73 #define USB_HID_BOOT_KEYBOARD_CAPS_LOCK         0x02
    74 #define USB_HID_BOOT_KEYBOARD_SCROLL_LOCK       0x04
    75 #define USB_HID_BOOT_KEYBOARD_COMPOSE           0x08
    76 #define USB_HID_BOOT_KEYBOARD_KANA                      0x10
     72
     73typedef enum {
     74        USB_HID_MOD_BOOT_NUM_LOCK = 0x01,
     75        USB_HID_MOD_BOOT_CAPS_LOCK = 0x02,
     76        USB_HID_MOD_BOOT_SCROLL_LOCK = 0x04,
     77        USB_HID_MOD_BOOT_COMPOSE = 0x08,
     78        USB_HID_MOD_BOOT_KANA = 0x10,
     79        USB_HID_MOD_BOOT_COUNT = 5
     80} usb_hid_modifiers_boot_t;
     81
     82static const usb_hid_modifiers_boot_t usb_hid_modifiers_boot_consts[5] = {
     83        USB_HID_MOD_BOOT_NUM_LOCK,
     84        USB_HID_MOD_BOOT_CAPS_LOCK,
     85        USB_HID_MOD_BOOT_SCROLL_LOCK,
     86        USB_HID_MOD_BOOT_COMPOSE,
     87        USB_HID_MOD_BOOT_KANA
     88};
     89
     90//#define USB_HID_BOOT_KEYBOARD_NUM_LOCK                0x01
     91//#define USB_HID_BOOT_KEYBOARD_CAPS_LOCK               0x02
     92//#define USB_HID_BOOT_KEYBOARD_SCROLL_LOCK     0x04
     93//#define USB_HID_BOOT_KEYBOARD_COMPOSE         0x08
     94//#define USB_HID_BOOT_KEYBOARD_KANA                    0x10
    7795
    7896/*
Note: See TracChangeset for help on using the changeset viewer.