Commit Graph

158 Commits

Author SHA1 Message Date
Josh Klar
b7b1866ac9
HID: Support Consumer (media) keys
What a short title for such a massive diff.

This (heavily squashed) commit adds support for Consumer keys such as
volume keys, media play/pause/stop, etc. by exposing four HID devices
over a single USB lane (as opposed to just exposing a keyboard). This
heavily refactors how HIDHelper works due to the new reporting
structure.

Many of the media keys were changed (mostly Keycodes.Media section), but
many (especially anything regarding Application keys) haven't been
touched yet - thus many keycodes may still be wrong. Probably worth
updating those soon, but I didn't get around to it yet. The definitive
list I refered to was
http://www.freebsddiary.org/APC/usb_hid_usages.php, which is basically
copy-pasta from the official USB HID spec at
https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
(warning: massive PDF, not light reading).

The only known regression this introduces is that instead of 6KRO as the
USB spec usually supports, we can now only have 5KRO (maybe even 4KRO),
for reasons I have yet to fully debug - this seems to be related to the
report having to include the device descriptor _and_ not supporting a
full 8 bytes as it used to. For now I'm willing to accept this, but it
definitely will be great to squash that bug.

This adds descriptor support for MOUSE and SYSCONTROL devices, as of yet
unimplemented.
2018-09-30 16:08:08 -07:00
Kyle Brown
5de46e33bc
KC_GESC: Escape key that can also work as Grave/Tilde 2018-09-29 16:20:21 -07:00
Kyle Brown
ed5d542ab4 Update keymap 2018-09-25 12:40:49 -07:00
Kyle Brown
09096abe35 Mostly working. Can even game on it 2018-09-25 12:40:49 -07:00
Josh Klar
ef921a5b99
Support ShiftedKeys, though the CODE_ stuff is odd 2018-09-23 05:19:57 -07:00
Josh Klar
7aaaad5eef
Remove unused keymap, unbreak Kyle layout I think 2018-09-23 03:23:42 -07:00
Josh Klar
94130740c4
Write a basic keymap sanity checker utility 2018-09-23 03:03:49 -07:00
Josh Klar
97091ff4fd
Make user keymaps fully declarative
This removes the need for the user to define... most things, honestly.
Notably, `main()` is no longer the end user's responsibility. This also
allows us to do fun stuff going forward like validating keymaps for
sanity (ex: the key assigned to `KC_MO(x)` should be assigned to
`KC_TRNS` on the target layer or the user will never be able to escape
that layer).

This also disambiguates `BOARD` to always refer to an actual slab of
silicon, renaming to `USER_KEYMAP`.

Entrypoints are now a bit more wild, and mostly-unsupported boards no
longer have working entrypoints. It's probably just time to scrap those
boards for now (until we have BLE HID and/or bitbang USB HID, at least).
2018-09-23 03:03:47 -07:00