The thumb cluster maps a little goofy and I'd like to clean up the
keymap here - it's ENTIRELY NOT OBVIOUS how this works right now. Using
this keymap as an example, the physical layout of my thumb cluster is
actually:
Far left: Left
Next to the right: Right
Bottom right: Shift
Top right: MO(2)
You can see what this maps to in code, and it's not at all intuitive.
`swap_indicies`, which we already support, is useless here because,
unlike the Planck/Klaranck, these aren't 1:1 key swaps, but an entirely
custom mapping of columns. This will require something like QMK's
solution to fully custom (or at least partially custom) keymaps at a
core level, and isn't something I feel like tackling tonight
necessarily.
This brings this naming into consistency with both fellow consts in the
same file (ex. LeaderMode is singular) as well as the variables in which
the consts are usually used (usually a `Firmware.unicode_mode` attribute
in a keymap).
This took a bit of brain surgery to firmware.py that deserves its own
commit message beyond the default merge commit message - tl;dr though,
it appears to work fine.
This allows leader sequences to "time out" rather than requiring an
Enter keypress to end.
This also rolls back some unnecessary changes from #72 to the matrix
scanner for performance reasons.
In theory we can use this in the future for Tap Dance support (#40)
Resolves#1Resolves#37
Resolves#70, Resolves#67
Still needs some regression testing in general, and a definite
regression is that rotary encoders are no longer (for the immediate time
being) supported.
Moves to a much simpler internal state tracking system, and FAR lighter
matrix scan.
Removes MicroPython support entirely.
This also cleans up some weird potentially-buggy logic paths within the
ModifierKeycode creation and handling. I can now press a free-floating
HYPER in my keymap and see the appropriate codes in `xev` for press and
release events.
Quote taken straight from the docstring of get_pin:
>Cross-platform method to find a pin by string.
>
>The pin definitions are platform-dependent, but this provides
>a way to say "I'm using pin D20" without rolling a D20 and
>having to actually learn MicroPython/CircuitPython and the
>differences in how they handle pinouts.
>
>This also makes the keymap sanity checker actually work for
>CircuitPython boards, since it's not possible in CPY to
>define a module stub for `board` that uses Passthrough
>natively (which is how the MicroPython stub worked originally)
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.
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.
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).