Commit Graph

1250 Commits

Author SHA1 Message Date
Josh Klar
2c05efa805
Support a massively-enhanced SEND_STRING equivalent 2018-09-30 21:14:30 -07:00
Josh Klar
96b5c4ee03
Ensure we always send at least four characters when sending Unicode sequences to better support MacOS/Windows 2018-09-30 20:49:40 -07:00
Josh Klar
0ccd27703d
Support Unicode sequences on Windows through WinCompose ONLY 2018-09-30 20:35:41 -07:00
Josh Klar
137de41743
Fix the sanity checker to use RawKeycodes where needed 2018-09-30 20:24:32 -07:00
Josh Klar
692d95018f
Enable switching Unicode modes at runtime; lots of Keycode cleanup again 2018-09-30 20:21:42 -07:00
Josh Klar
ffa81bcf43
Massive refactor largely to support Unicode on Mac
This does a bunch of crazy stuff:

- The ability to set a unicode mode (right now only Linux+ibus or
MacOS-RALT) in the keymap. This will be changeable at runtime soon, to
allow a single keyboard to be able to send table flips and whatever
other crazy stuff on any OS the board is plugged into (something that's
not currently doable on QMK, so yay us?)

- As part of the above, there is now just one user-facing macro for
unicode codepoint submission,
`kmk.common.macros.unicode.unicode_sequence`. Users should never use the
platform-specific macros, partly because they just outright won't work.
There's all sorts of fun stuff in these methods now, thank goodness
MicroPython supports the `yield from` construct.

- Keycode (these should really be renamed Keysym or something) objects
that are intended to not be pressed, or not be released. Right now these
properties are completely ignored if not part of a macro, and it's
probably sane to keep it that way. This was necessary to support MacOS's
"hold RALT while typing the codepoint characters" flow.

- Other refactor-y bits, like moving macro support to `kmk/common`
rather than sitting at the top level of the tree. One day `kmk/common`
may make sense to surface at top level `kmk/`, but that's a discussion
for another day.
2018-09-30 19:33:23 -07:00
Josh Klar
2024eb959f
Support the real reason we're all here: unicode key sequences (Linux only). Basically takes the same output style as klardotsh/qmk_emote_macro_generator outputs 2018-09-30 18:20:18 -07:00
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
85cdf03572
Merge pull request #30 from KMKfw/topic-consumer-device
HID: Support Consumer (media) keys
2018-09-30 16:37:58 -07:00
Josh Klar
1fcff6cb8c
Stub pyb.hid_keyboard for tests 2018-09-30 16:33:03 -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
Josh Klar
a1bfaac691
Merge pull request #28 from KMKfw/topic-grave-escape
Topic grave escape
2018-09-29 16:29:48 -07:00
Josh Klar
ae521d1b38
Add udev rule to allow flashing STM32 devices as user 2018-09-29 16:20:43 -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
14233b77d3 Added circuitpython support to utils 2018-09-28 20:20:10 -07:00
Kyle Brown
97f70d7a13 Clean up pyboard and add 2 utilities 2018-09-28 20:20:10 -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
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
dd69ca5422
Merge pull request #24 from KMKfw/topic-shifted-keycodes
Support ShiftedKeys, though the CODE_ stuff is odd
2018-09-23 05:40:30 -07:00
Josh Klar
ef921a5b99
Support ShiftedKeys, though the CODE_ stuff is odd 2018-09-23 05:19:57 -07:00
Josh Klar
84b7b42b0f
Merge pull request #23 from KMKfw/topic-fix-makefile
Remove useless crap from Makefile
2018-09-23 04:55:15 -07:00
Josh Klar
c39c91af12
Remove useless crap from Makefile 2018-09-23 04:51:27 -07:00
Josh Klar
d377f26bca
Merge pull request #22 from KMKfw/topic-declarative-keymaps
Make user keymaps fully declarative
2018-09-23 03:32:39 -07:00
Josh Klar
7aaaad5eef
Remove unused keymap, unbreak Kyle layout I think 2018-09-23 03:23:42 -07:00
Josh Klar
c90d75321a
Finish renaming targets in circle 2018-09-23 03:16:53 -07:00
Josh Klar
32dd2cecc4
Run the keymap tester on board builds usually 2018-09-23 03:12:31 -07:00
Josh Klar
94130740c4
Write a basic keymap sanity checker utility 2018-09-23 03:03:49 -07:00
Josh Klar
3f83e6a85b
Remove the auto-build 2018-09-23 03:03:48 -07:00
Josh Klar
91c6a2128e
Build the Unix port of MicroPython so we can sanity-check layouts using the actual target Python, rather than CPython with all its niceties 2018-09-23 03:03:48 -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
Josh Klar
5f9f3be966
Merge pull request #21 from KMKfw/topic-internal-keycodes
Internal Keycodes and partial layer support (MO, DF, TO, TG)
2018-09-23 03:03:26 -07:00
Josh Klar
6977ae94b4
Finish unbreaking my own layout... 2018-09-23 01:06:04 -07:00
Josh Klar
666f36d41a
Unbreak my own layout 2018-09-23 01:04:10 -07:00
Josh Klar
5cdd678073
We do not support the NRF52832 anyway, stop building it in Circle 2018-09-23 00:22:59 -07:00
Josh Klar
634e6f14e6
Support TO and TG layer switching 2018-09-23 00:14:30 -07:00
Josh Klar
579c32f703
Disable line-length checks on user-defined keymaps 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
Josh Klar
8a55dcca04
Helper makefile task to autofix some linter noise 2018-09-23 00:13:31 -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
Kyle Brown
39c95d7e57 Renamed board because, duh 2018-09-20 13:10:16 -07:00