Hi, Mr Rehabman, I'm learning how to use your new ACPIKeyboard.kext.
I almost can understand whole README, but "ADB keystroke" and "delegated keydown" or "non-delegated keydown".
I try to google "ADB keystroke", but I just get the result that "Android Debug Bridge", so I would like to confirm to you what is the meaning of the word and "delegated keydown" or "non-delegated keydown".
Sorry for my poor english.
Note, slightly off-topic, but in regards to:
https://github.com/RehabMan/OS-X-ACPI-Keyboard
ADB codes are what IOHIKeyboard uses for keycodes (codes that represent keys being pressed/released on a keyboard).
The actual codes correspond to a keymap that describes the purpose of the key. You will find the keymap in ACPIKeyboard.cpp, function ACPIKeyboard::defaultKeymapOfLength. You can see each ADB code in the comment at the end of the ADB keycode definition.
For example, in that keymap, 0x00 is the 'A' key, 0x28 is the 'K' key. And 0x90 is brightness up, 0x91 is brightness down.
The difference between delegated and non-delegated ADB codes is that non-delegated keycodes are sent from the ACPIKeyboard itself, and delegated keycodes are sent through the installed PS2 driver. Because the PS2 driver in use may return a different keymap in its implementation of defaultKeymapOfLength, the ADB codes for the PS2 driver may not be the same as the ADB codes used by ACPIKeyboard. For example, the keymap for the ELAN driver is decidedly different from ACPIKeyboard and my version of VoodooPS2Keyboard. You can see the keymap bits in the HIDKeyMapping property in ioreg. That was how I determined the codes for brightness up/down that are used by the ELAN driver.
The ADB codes used by ACPIKeyboard.kext are the same as the ADB codes used by my version of VoodooPS2Keyboard.kext. That is, they each return the same data from defaultKeymapOfLength.
The advantage of sending delegated keycodes is that the keys appear to come from the real PS2 keyboard instead of a separate keyboard. This makes modifier keys (such as Ctrl, Shift, Option, Command) work with the events generated via ACPIKeyboard. Non-delegated codes appear to the system as coming from a separate keyboard (because ACPIKeyboard is a separate [virtual] keyboard), and therefore are not affected by modifier keys on the real PS2 keyboard.
Think of it this way... If you had two USB keyboards connected to the system, you would not expect modifier keys held down on one keyboard to affect keystrokes on the other. But in this case, since the keys actually do originate from the same physical device (although handled by two separate software components), that's exactly what is desired.