Commit Graph

26 Commits

Author SHA1 Message Date
Josh Klar
bdd4f86472
Support a simple macro of a sequence of keycodes (basis for SEND_STRING) 2018-09-30 18:03:43 -07:00
Josh Klar
99573de217
Epic keycode cleanup; make modifiers callable and chainable 2018-09-30 17:58:36 -07:00
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
b3469d9fb2 Most changes requested were done, and other general improvements. 2018-09-28 20:20:10 -07:00
Kyle Brown
b8a27b9605 Set better keycode values for KC_NO and KC_TRANSPARENT which is an alias to KC_TRNS 2018-09-24 18:01:03 -07:00
Josh Klar
ef921a5b99
Support ShiftedKeys, though the CODE_ stuff is odd 2018-09-23 05:19:57 -07:00
Josh Klar
634e6f14e6
Support TO and TG layer switching 2018-09-23 00:14:30 -07:00
Josh Klar
8c7c9958f9
Unbreak the reset key by removing dead code path (for now) 2018-09-23 00:14:29 -07:00
Josh Klar
9bec905fce
Holy refactor, Batman: full layer support (MO/DF)
Wow, what a trip this was. Layer support is now fully implemented. Other
changes here mostly revolve around the event dispatching model: more
floating state (hidden in clases wherever) has been purged, with the
reducer (now mutable, comments inline) serving, as it should, as the
sole source of truth. Thunk support has been added to our fake Redux
clone, allowing Action Creators to handle sequences of events (which is
arguably a cleaner way of handling matrix changes when not all matrix
changes should result in a new HID report - in the case of internal
keys). A whole class has been deprecated (Keymap) which only served as
another arbitor of state: instead, the MatrixScanner has been made
smarter and handles diffing internally, dispatching an Action when
needed (and allowing the reducer to parse the keymap and figure out what
key is pressed - this is the infinitely cleaner solution when layers
come into play).
2018-09-23 00:14:28 -07:00
Kyle Brown
0ae3adcc84
Added more work to shifted keycodes. 2018-09-23 00:14:28 -07:00
Kyle Brown
fb053b7de4
Fix keycodes, and update keymap in prep for working layers 2018-09-23 00:14:24 -07:00
Josh Klar
5787731890
Add support for changing to N layers as needed 2018-09-23 00:13:32 -07:00
Josh Klar
392917082a
Unbreak the general idea of KC_DF and KC_MO, though still needs heavy refactors 2018-09-23 00:13:32 -07:00
Kyle Brown
7ae2d18e45
Very broken, but some work done probably 2018-09-23 00:13:30 -07:00
Kyle Brown
d0f35100b3
Start of internal keycodes 2018-09-23 00:13:28 -07:00
Kyle Brown
f84c58a03e Added more keycodes 2018-09-20 14:50:59 -07:00
Josh Klar
3e99f0c8e3 Listen to KEY_DOWN_EVENT and KEY_UP_EVENT in the HIDHelper and actually send. Working keyboard! ⌨ 2018-09-16 23:20:16 -07:00
Josh Klar
6933d9c484 Allow super simple keymap keycode definitions (very QMK-ish) 2018-09-16 22:17:30 -07:00
Josh Klar
7f88f4f415 Implement basic HID keyboard support (send_string works great!) 2018-09-16 20:49:47 -07:00
Josh Klar
27f1e971b0 Add HID keycodes in a semi-structured manner 2018-09-16 18:30:44 -07:00
Josh Klar
ffd47c478f Move all remaining state into the single store, woot! 2018-09-03 15:21:34 -07:00
Josh Klar
ef639f5292 Add debug hooks to the event dispatcher, remove explicit prints 2018-09-03 13:50:12 -07:00
Josh Klar
d9b909d841 Event dispatching, super simply 2018-09-03 04:22:52 -07:00
Josh Klar
d5de2601d9 Prepare things for the event loop, also abstract gross stuff from end users 2018-09-03 03:22:11 -07:00
Josh Klar
e9d448af44 A basic 2x2 matrix that can auto-flash to a Feather with a compatible bootloader 2018-09-02 20:07:07 -07:00