Implement keyboard service#510
Conversation
Cargo Vet Audit Passed
|
49711dd to
8e4276b
Compare
Unfortunately |
8e4276b to
e63da32
Compare
5213714 to
01c74c0
Compare
a6b23db to
db7d51f
Compare
Thanks! Yeah I'm thinking of doing something along the lines of what Felipe suggested above, where the scan function returns only an array/slice of keys pressed (though still represented by the HID usage code for each key), then the hid backend can convert it into an input report for HID over i2c. This would also in turn make it decoupled from a future hid over espi backend (in case we decide the input report format for espi should be different than the i2c spec). |
3a687f0 to
a2d0456
Compare
|
Currently have a PR in for keyberon to not pull in the |
@kurtjd finished cargo vet audit and pushed commit to repo |
Thank you! Was hoping my keyberon PR could get in so there'd be one less crate for you to audit, but you're too quick. Really appreciate it! |
|
@felipebalbi When you get a chance could you take another look? |
bc96cd0 to
bbb2998
Compare
* add audits for proc-macro-error and usb-device * set audit-as-crates-io as false for keyberon * prune the imports.lock
tullom
left a comment
There was a problem hiding this comment.
And Kurtis said "Let there be keyboard support", and there was keyboard support.
Provides a HID over i2c keyboard service as well as a configurable GPIO HID-aware keyboard.
The provided GPIO keyboard uses
keyberonfor scanning and special key handling. It uses a basic report descriptor supporting 6 keys per report. Next is to support output reports for things like LEDs, Fn key handling, and consumer reports. In the time being users can use theHidKeyboardtrait for more custom behavior if the provided implementation doesn't suit their needs.The hid backend takes a generic
HidKeyboardtype and handles listening for i2c commands from the host and processing commands. It also handles asserting interrupts whenever a new key report is available instructing the host to perform a read to retrieve the report.There is still more work to be done to make this all more flexible and configurable. This serves as a
v0.1.0so developers at least have keyboard support in the meantime.Also plan to look more into ways to make buffer sizes more configurable and see if there are ways to prevent copying input reports multiple times as they move through the queue.