Commit Graph
89 Commits
Author SHA1 Message Date
Josh Klar a383af2dc8 Bugfixes for Makefile, almost entirely silence it (send most output to .build.log) 2018-10-08 07:06:34 -07:00
Josh Klar c86abe20f3 Fix Makefile for keymap validation on atmel 2018-10-08 06:10:07 -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 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 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 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 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 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 ae521d1b38 Add udev rule to allow flashing STM32 devices as user 2018-09-29 16:20:43 -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
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
Josh Klar eb686f3799 Merge pull request #17 from KMKfw/topic-in-house-forks
Move to the in-org forks of Micro/Circuit Python
2018-09-17 18:21:34 -07:00
Josh Klar fecf820aef Move to the in-org forks of Micro/Circuit Python 2018-09-17 18:16:16 -07:00
Josh Klar 3de95fc330 Merge pull request #18 from KMKfw/topic-circle-builds
CircleCI: Ensure all boards can at least compile a hex on each commit
2018-09-17 16:00:56 -07:00
Josh Klar 904e7641e7 CircleCI: Ensure all boards can at least compile a hex on each commit 2018-09-17 15:30:31 -07:00
Josh Klar a69f180260 Merge pull request #16 from KMKfw/topic-update-readme-badge
Update README to reflect new org
2018-09-17 12:31:53 -07:00
Josh Klar f29a846824 Update README to reflect new org 2018-09-17 12:31:06 -07:00
Josh Klar ac67868ba0 Merge pull request #14 from klardotsh/topic-readme-is-wrong-yet-again
Update the woefully out of date (again) README
2018-09-17 00:07:07 -07:00
Josh Klar 91e6dcd5f2 Update the woefully out of date (again) README 2018-09-17 00:06:05 -07:00
Josh Klar 1ab98162ce Merge pull request #13 from klardotsh/topic-hid
Turn this semi-automatic keyboard into a full auto
2018-09-16 23:35:32 -07:00
Josh Klar fa195a3e3d Save a shit ton of perf, turns out making huge dicts every keystroke was AWFUL 2018-09-16 23:31:00 -07:00
Josh Klar 712b0e4888 Merge pull request #12 from klardotsh/topic-hid
Implement a basic HID keyboard on a PyBoard!
2018-09-16 23:25:49 -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 88807837d5 Misc. cleanup around the tree 2018-09-16 20:50:05 -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 2476a65b30 Merge pull request #11 from klardotsh/topic-pyboard
Support the PyBoard v1.1 as much as the Feather was, at least
2018-09-16 00:21:05 -07:00
Josh Klar f5fc555ac5 Support the PyBoard v1.1 as much as the Feather was, at least 2018-09-16 00:17:30 -07:00
Josh Klar c5f87fae74 Merge pull request #10 from klardotsh/topic-integrate-circle
Basic CircleCI setup: Lint the codebase on all inbound PRs
2018-09-16 00:17:15 -07:00
Josh Klar 8a33a68553 Do not lint the venv folder of disasters 2018-09-14 17:27:47 -07:00
Josh Klar de5fd701c6 Try out a linting CI config 2018-09-14 17:24:19 -07:00
Josh Klar a7fbe280d0 Update README to reflect new thinking around the project and discoveries 2018-09-14 14:04:15 -07:00
Josh Klar 30e4352935 Merge pull request #7 from klardotsh/cleanup
Readme cleanup
2018-09-03 15:34:51 -07:00
Josh Klar a2742984ee Merge pull request #6 from klardotsh/topic-event-loop
The basic "Redux" style event loop to unify all state
2018-09-03 15:34:20 -07:00
Josh Klar ffd47c478f Move all remaining state into the single store, woot! 2018-09-03 15:21:34 -07:00
Josh Klar b9dfffd2b3 More sane linter rules 2018-09-03 15:20:48 -07:00
Josh Klar ea18655a21 On unhandled exceptions, blink the feather LED repeatedly 2018-09-03 15:20:27 -07:00
Josh Klar 96368c4632 Stop complaining about changed files in the vendor folder we knowingly do terribad things to 2018-09-03 13:53:45 -07:00
Josh Klar cb923096b6 Clean up NRF builds big time 2018-09-03 13:51:04 -07:00
Josh Klar f0957227ff Niceties 2018-09-03 13:50:53 -07:00
Josh Klar 5ba6f15335 Use the new debug mode 2018-09-03 13:50:27 -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 c641903d61 Enforce that dependencies are imported in correct order at lint time 2018-09-03 03:22:31 -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 1df2012c7a Merge pull request #5 from klardotsh/topic-zoom-enhance
Make builds a bit more robust and reusable
2018-09-03 01:28:47 -07:00
Josh Klar 4ea5fcd004 Make builds a bit more robust and reusable
- Lock our vendored dependencies (also pull in some new ones I will be
needing soon)

- Ensure we have a sane way of pulling those vendored dependencies into
the DFU-flashable images (upy-freeze.txt)

- Break up the Makefile into a bunch of smaller, sometimes reusable
chunks

- Add a noop keyboard that simply exits, so we can flash a "keyboard"
that just dumps us straight to REPL

- Remove my personal ampy config since that's not portable at all
2018-09-03 01:23:15 -07:00
Josh Klar 0865a828c4 Merge pull request #4 from klardotsh/first-steps
Repo setup and a basic matrix-scan-then-do-nothing keyboard
2018-09-02 23:47:42 -07:00
Josh Klar 4295267b44 If the entrypoint is already what I want it to be, ignore error states 2018-09-02 23:43:30 -07:00
Josh Klar e4b19de009 Escape hatches: flash the user keyboard script as part of DFU rather than pushing with ampy. WAY more stable, mostly unbrickable now 2018-09-02 23:39:55 -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
Josh Klar 6de723c376 Merge pull request #2 from klardotsh/topic-readme
Actually write up some start of a README
2018-08-30 13:32:00 -07:00
Josh Klar 62b194b8a1 Actually write up some start of a README 2018-08-30 13:31:02 -07:00
Josh Klar 8facfcebd4 Add license and a very basic setup script I used to bootstrap the Feathers 2018-08-30 02:54:26 -07:00
Josh Klar f7529d19d5 Initial commit 2018-08-30 02:37:54 -07:00