Commit Graph

382 Commits

Author SHA1 Message Date
Josh Klar
392f8d7e51
Abstract away platform-dependent pin references
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)
2018-10-07 01:40:09 -07:00
Josh Klar
ec9591ad8a
Makefile: Enable keymap checker on SAMD51. Fix Unix MPY build 2018-10-07 01:39:47 -07:00
Josh Klar
004b80e4b6
Some Makefile fixes 2018-10-07 01:01:37 -07:00
Josh Klar
d61d3b7b38
Makefile fix on installing devdeps 2018-10-07 00:51:37 -07:00
Josh Klar
8e743642db
Add the SAMD51 chips to Circle config. Finally banish the Teensy to save build jobs 2018-10-07 00:49:33 -07:00
Josh Klar
a23acc6131
Update various internal key handling stuff to be CircuitPython-compatible 2018-10-07 00:45:35 -07:00
Josh Klar
d379acfc97
Support ItsyBitsy M4 Express as an effective clone of the Feather M4 Express with less pins. Because that's what it is. 2018-10-07 00:45:34 -07:00
Josh Klar
c4c28ad039
Decrease typing lag by about 80 billion percent by upping the logging threshold to WARNING on SAMD51 2018-10-07 00:45:33 -07:00
Josh Klar
472b08d77b
Support KEYBOARD and CONSUMER modes of HID on Feather M4 Express 2018-10-07 00:45:32 -07:00
Josh Klar
0b11f42cc2
Massive README update while waiting on builds to finish... 2018-10-07 00:45:31 -07:00
Josh Klar
ae3eda26b9
Make kmk_keyboard_user importable on SAMD51 by reducing recursion (read: import) depth 2018-10-07 00:45:31 -07:00
Josh Klar
e11934ab2d
Able to build a VERY basic KMK image for Feather M4 Express, flashable over UF2 only 2018-10-07 00:45:30 -07:00
Josh Klar
478e198d6d
Merge pull request #43 from KMKfw/topic-lazy-kc
Make KC object lazy but cached to avoid huge AttrDict compilation (most keycodes probably are not used anyway)
2018-10-06 17:03:17 -07:00
Josh Klar
d61f4470af
Make KC object lazy but cached to avoid huge AttrDict compilation (most keycodes probably are not used anyway) 2018-10-06 03:28:17 -07:00
Josh Klar
b6cc0276cd
Merge pull request #41 from KMKfw/topic-improve-build-process
Improve Makefile: Stop clobbering /vendor, detect submodule changes more intelligently
2018-10-05 21:41:36 -07:00
Josh Klar
8fd627e7f6
Ignore build files from linter 2018-10-05 21:18:43 -07:00
Josh Klar
04d30f1e42
Make sure unix micropython refers to correct location 2018-10-05 15:39:50 -07:00
Josh Klar
05c1b42802
Make sure Circle has rsync available 2018-10-05 15:35:13 -07:00
Josh Klar
184e4d5f98
Improve Makefile: Stop clobbering /vendor, detect submodule changes more intelligently 2018-10-05 15:31:00 -07:00
Kyle Brown
ad3da0694b Add advanced layers.
These will need more testing and some ported to tapdance. The bigest
case of this would be TT
2018-10-03 22:35:00 -07:00
Josh Klar
f5dae5f249
Merge pull request #35 from KMKfw/topic-purge-ampy
Load KMK from frozen modules on STM32 (no more ampy-flashed entrypoints)
2018-10-02 01:49:04 -07:00
Josh Klar
1ed2be66e6
Load KMK from frozen modules on STM32 (no more ampy-flashed entrypoints) 2018-10-01 22:14:55 -07:00
Josh Klar
d8adeea180
Merge pull request #34 from KMKfw/topic-super-quick-hotfix
Return state by default on Macro if not a key up or key down event
2018-10-01 22:14:46 -07:00
Josh Klar
fbefed283b
Return state by default on Macro if not a key up or key down event 2018-10-01 21:54:01 -07:00
Josh Klar
5fe54f6ca3
Merge pull request #33 from KMKfw/topic-macros-have-codes
Handle macros more consistently
2018-10-01 12:02:56 -07:00
Josh Klar
552e848a27
Handle macros more consistently: make them a proper internal keycode-style object and not a weird one-off. Fixes sanity_checker on my keymaps. 2018-10-01 11:54:43 -07:00
Josh Klar
27d1ee8755
Merge pull request #32 from KMKfw/topic-perf-grind
Grind out as much performance as possible with lower-ish hanging fruit
2018-10-01 10:34:55 -07:00
Josh Klar
f80873fdd0
Roll back the tuple indexing change (now access by dot notation), optimize GESC and fix a bug in how it interacts with the reducer 2018-10-01 01:07:57 -07:00
Josh Klar
b5457534bf
Completely overhaul the entire MatrixScanner and KEY_UP/DOWN_EVENT system for efficiency. Less delay() on HID sends. Speed is only BARELY slower than QMK now. 2018-10-01 00:33:59 -07:00
Josh Klar
784f8885bd
Remove a ton of dict lookups for minor perf gains 2018-10-01 00:33:58 -07:00
Josh Klar
a089675aa8
Merge pull request #31 from KMKfw/topic-macros-part-one
Macros: Support basic sequences of keys (either raw or specified by a string) and cross-platform Unicode sequences (ex. (ノಠ痊ಠ)ノ彡┻━┻)
2018-10-01 00:33:44 -07:00
Josh Klar
fde9b7e274
Add support for millisecond delays within a macro sequence 2018-09-30 21:34:16 -07:00
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