Based on PR#1140 with several changes as described in this comment: https://github.com/zmkfirmware/zmk/pull/1140#issuecomment-1237655563 * Minimize the api changes for bluetooth by keeping zmk_hid_get_keyboard_report() and returning the .body like before. * Keeping the logic about "full" vs "body" entirely within the usb code path. * The endpoint now calls either zmk_usb_hid_send_keyboard_report() and zmk_usb_hid_send_consumer_report() instead of zmk_usb_hid_send_report(...). - These functions now internally dispatch on protocol to either zmk_hid_get_keyboard_report() or a new function for boot reports zmk_hid_get_boot_report(). - There's a change here from the PR version in the behavior of get_report(): when in boot protocol, don't include the report id. I believe this is correct, in that implicit boot protocol report descriptor does not use multiple reports, so any boot protocol report should not include the report id field. * Use a single definition of a boot report, used for regular reports in non-6KRO, and for rollover in all branches. * Handle gaps in the zmk report when producing a boot report in HKRO mode. For .example, if it was 8KRO, it would be possible to have the state 0 0 0 0 0 0 0 17 (by pressing 8 keys, and letting go of the first 7). Copying the first 6 bytes would not show up the single pressed key. |
||
---|---|---|
.. | ||
drivers | ||
dt-bindings/zmk | ||
linker | ||
zmk |