Apple USB Keyboard Configuration

HID Reports

From looking at the HID Report Descriptors for the keyboard built into my (MacBookPro6,2) laptop, the basic report builds on the Boot report format by using a Report ID (1) and adding another byte that contains a bit for the Eject key (Usage 0xB8 on the Consumer page) and seven bits for Usage page 255 (kHIDPage_AppleVendorTopCase from AppleHIDUsageTables.h) Usage 3 (kHIDUsage_AV_TopCase_KeyboardFn).

I’m a bit confused about the seven bits allocated to that one usage (Fn key), especially since the other usages defined for that page include (presumably screen) brightness up and down as well as (presumably keyboard) illumination toggle, up, and down. Perhaps the report format doesn’t accurately describe what the keyboard actually sends. Hmmm.

Even more odd, why doesn’t it just use Vendor-Defined Usage Page 1 (0xff01, kHIDPage_AppleVendorKeyboard) Usage 3 (kHIDUsage_AppleVendorKeyboard_Function), instead? That usage page also defines the Dashboard and Expose keys, as well as a Spotlight key and the keyboard brightness controls.

Also, what does “Top Case” mean?

It also adds several more, small reports. Report ID 82 is a single byte containing one bit each for the Play/Pause, Fast Forward, Rewind, Scan Next Track, and Scan Previous Track keys. It’s interesting that Fast Forward and Rewind are On-Off Controls (OOC), while Scan Next Track and Scan Previous Track (as well as play/Pause) are One-Shot Controls (OSC). Does the keyboard send different codes for the initial key press of the prev/next keys and when the keys are held?

Report ID 9 is a three-byte Feature report that only seems to contain a single bit of information, for Vendor-Defined Usage Page 1 (kHIDPage_AppleVendorKeyboard) Usage 11 (kHIDUsage_AppleVendorKeyboard_CapsLockDelayEnable). Feature reports are used to control features of the device. I’m not sure what controlling the caps lock delay does, exactly.

Again, I’m confused by just the one bit from Usage Page kHIDPage_AppleVendorKeyboard being described, with no Input reports from that page, since that page contains such usages as the Spotlight, Dashboard, Expose, and brightness up and down keys.

References