Jiri Kosina schrieb:
Could you please provide any further information about what names do these keyboards have, so that I could name the macros appropriately? Thanks,The first one, with ID 0x022a is a 3rd generation MacBook. It has no numpad and lsusb =v reports
Bus 007 Device 003: ID 05ac:022a Apple Computer, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x05ac Apple Computer, Inc. idProduct 0x022a bcdDevice 0.04 iManufacturer 1 Apple Computer iProduct 2 Apple Internal Keyboard / Trackpad iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 84 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 40mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 3 Apple Internal Keyboard HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 13 International (ISO) bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 73 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 2 Mouse iInterface 4 Touchpad HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 89 Report Descriptor: (length is 89) Item(Global): Usage Page, data= [ 0x01 ] 1 Generic Desktop Controls Item(Local ): Usage, data= [ 0x02 ] 2 Mouse Item(Main ): Collection, data= [ 0x01 ] 1 Application Item(Local ): Usage, data= [ 0x01 ] 1 Pointer Item(Main ): Collection, data= [ 0x00 ] 0 Physical Item(Global): Usage Page, data= [ 0x09 ] 9 Buttons Item(Local ): Usage Minimum, data= [ 0x01 ] 1 Button 1 (Primary) Item(Local ): Usage Maximum, data= [ 0x03 ] 3 Button 3 (Tertiary) Item(Global): Logical Minimum, data= [ 0x00 ] 0 Item(Global): Logical Maximum, data= [ 0x01 ] 1 Item(Global): Report ID, data= [ 0x02 ] 2 Item(Global): Report Count, data= [ 0x03 ] 3 Item(Global): Report Size, data= [ 0x01 ] 1 Item(Main ): Input, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap LinearPreferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Report Count, data= [ 0x01 ] 1 Item(Global): Report Size, data= [ 0x05 ] 5 Item(Main ): Input, data= [ 0x01 ] 1 Constant Array Absolute No_Wrap LinearPreferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Usage Page, data= [ 0x01 ] 1 Generic Desktop Controls Item(Local ): Usage, data= [ 0x30 ] 48 Direction-X Item(Local ): Usage, data= [ 0x31 ] 49 Direction-Y Item(Global): Logical Minimum, data= [ 0x81 ] 129 Item(Global): Logical Maximum, data= [ 0x7f ] 127 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Report Count, data= [ 0x02 ] 2 Item(Main ): Input, data= [ 0x06 ] 6 Data Variable Relative No_Wrap LinearPreferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none Item(Main ): End Collection, data=none Item(Global): Usage Page, data= [ 0xff ] 255 Vendor Specific Item(Local ): Usage, data= [ 0x01 ] 1 (null) Item(Main ): Collection, data= [ 0x00 ] 0 Physical Item(Local ): Usage, data= [ 0x02 ] 2 (null) Item(Global): Logical Minimum, data= [ 0x01 ] 1 Item(Global): Logical Maximum, data= [ 0x41 ] 65 Item(Global): Physical Minimum, data= [ 0x00 ] 0 Item(Global): Physical Maximum, data= [ 0xff ] 255 Item(Global): Report ID, data= [ 0x05 ] 5 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Report Count, data= [ 0x3f ] 63 Item(Main ): Input, data= [ 0x00 ] 0 Data Array Absolute No_Wrap LinearPreferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x04 ] 4 (null) Item(Global): Logical Minimum, data= [ 0x80 ] 128 Item(Global): Logical Maximum, data= [ 0x7f ] 127 Item(Global): Report Size, data= [ 0x08 ] 8 Item(Global): Report Count, data= [ 0x10 ] 16 Item(Main ): Feature, data= [ 0x02 ] 2 Data Variable Absolute No_Wrap LinearPreferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 3 Apple Internal Keyboard HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 20 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0001 1x 1 bytes bInterval 8 Device Status: 0x0000 (Bus Powered) The second one with id 0x0221 is the new apple keyboard, you'' find onhttp://www.apple.com/keyboard. It looks like http://images.apple.com/keyboard/images/gallery/wired_1_20070813.jpg, has a numpad and some special printings on F1-F12. They're the same as on the macbook. lsusb -v reports
Bus 002 Device 004: ID 05ac:0221 Apple Computer, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x05ac Apple Computer, Inc. idProduct 0x0221 bcdDevice 0.67 iManufacturer 1 Apple, Inc iProduct 2 Apple Keyboard iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 59 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 20mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 13 International (ISO) bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 75 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 47 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0001 1x 1 bytes bInterval 10 Device Status: 0x0000 (Bus Powered)In order to get the correct keycodes of the printed symbols on Fn+FX combinations, i edited hid-input.c and changed
static struct hidinput_key_translation powerbook_fn_keys[] = { { KEY_BACKSPACE, KEY_DELETE }, { KEY_F1, KEY_BRIGHTNESSDOWN, POWERBOOK_FLAG_FKEY }, { KEY_F2, KEY_BRIGHTNESSUP, POWERBOOK_FLAG_FKEY }, { KEY_F3, KEY_PROG1, POWERBOOK_FLAG_FKEY }, { KEY_F4, KEY_PROG2, POWERBOOK_FLAG_FKEY }, { KEY_F5, KEY_FN_F5, POWERBOOK_FLAG_FKEY }, { KEY_F6, KEY_FN_F6, POWERBOOK_FLAG_FKEY }, { KEY_F7, KEY_BACK, POWERBOOK_FLAG_FKEY }, { KEY_F8, KEY_PLAY, POWERBOOK_FLAG_FKEY }, { KEY_F9, KEY_FASTFORWARD, POWERBOOK_FLAG_FKEY }, { KEY_F10, KEY_MUTE, POWERBOOK_FLAG_FKEY }, { KEY_F11, KEY_VOLUMEDOWN, POWERBOOK_FLAG_FKEY }, { KEY_F12, KEY_VOLUMEUP, POWERBOOK_FLAG_FKEY }, { KEY_UP, KEY_PAGEUP }, { KEY_DOWN, KEY_PAGEDOWN }, { KEY_LEFT, KEY_HOME }, { KEY_RIGHT, KEY_END }, { } }; Maybe this should be included, too. If I can submit any further information, please let me know! Regards Tobias
smime.p7s
Description: S/MIME Cryptographic Signature