Commit Graph

82 Commits

Author SHA1 Message Date
xs5871
3c4e064201 Implement a heap based task scheduler 2023-04-01 00:12:49 +00:00
xs5871
5448cb4479 Denoise core debugging and improve improve performance.
* Declutter and denoise the debug output in general.
* Avoid f-strings. They're nice to look at, but use a lot of ROM, RAM,
  and time during formatting.
* Remove all "debug" information from `KMKKeyboard.__repr__`. It's
  printed out once at init and the info it gave was useless at that
  point. Even more free memory.
* Add a memory footprint debug info after initialization.
2023-03-24 21:48:44 +00:00
xs5871
ba06d3c8a5 Fix some old holdtap inconsistencies 2023-03-16 21:50:58 +00:00
xs5871
26bf630608 Fix layer tap interrupted 2023-03-16 21:50:42 +00:00
xs5871
adff02e88a Add deinit method to modules and extensions 2023-03-10 19:17:09 +00:00
xs5871
b9c85c02e2 Remove modules and extension that fail during_bootup 2023-03-09 21:18:54 +00:00
xs5871
94c042fec5 Clear HID reports on crash 2023-03-03 07:53:46 +00:00
xs5871
9e5d2c24e1 Refactor for nicer pointing device axes handling 2023-02-14 20:42:08 +00:00
xs5871
69d47343e8 implement global pointing device axis handling 2023-02-14 20:42:08 +00:00
xs5871
17f2961c0b fix pystack exhaust during resume_process_key.
Instead of handling resumed key events in a deep stack, buffer them
until the next main loop iteration. New resume events that may be emitted
during handling of old resumes are prepended to that buffer, i.e. take
precedence over events that happen deeper into the buffer/event stack.
Logical replay order is thus preserved.
2022-10-08 13:36:00 -07:00
xs5871
a97e655d08 fix typo 2022-09-26 00:17:23 -07:00
xs5871
f2fb4eecf4 add type hinting for kmk_keyboard 2022-09-22 15:35:14 -07:00
Ian Pearce
ea3f59340d Set sandbox.matrix_update
Previously only secondary_matrix_update was set on sandbox.
2022-09-19 07:51:45 +00:00
xs5871
aee793a300 missed some pre_process to resume_process conversions 2022-08-31 18:22:52 -07:00
xs5871
57c61ced85 add type hints to KMKKeyboard.resume_process_key 2022-08-31 18:22:52 -07:00
xs5871
c95efbe8ea refactor handling of key processing resume to KMKKeyboard 2022-08-31 18:22:52 -07:00
xs5871
9d555209b8 add continue-with-module-nr-idx to key processing 2022-08-31 18:22:52 -07:00
xs5871
f0544465c7 remove reference to disfunct KMK_RELEASE. 2022-08-03 20:11:00 +00:00
xs5871
2a7654f852 cleanup unused KMKKeyboard attributes
squash cleanup KMKKeyboard
2022-07-24 15:19:20 -07:00
xs5871
3f3bd93109 implement global debug interface. 2022-07-22 09:21:30 -07:00
crazyiop
ffcfc9835d update format to fstring 2022-06-12 09:31:15 +00:00
crazyiop
6068b60cac tweak the debug output to make them more readable 2022-06-12 09:31:15 +00:00
xs5871
b6146365b3 fix crash on releasing dropped key presses 2022-05-23 15:59:52 -07:00
John Morrison
73e95bfdde Change to be an extension 2022-05-08 20:10:41 +00:00
John Morrison
9f964aba36 Allow strings in keymap. Replace with keys in keyboard _init cycle. 2022-05-08 20:10:41 +00:00
Steven Wilde
f2b8c7106e Move the changes to keypad.py 2022-05-04 16:40:48 +00:00
Steven Wilde
30252099cd Fix crash when typing quickly on a split board 2022-05-04 16:40:48 +00:00
John Morrison
6c2d64843b Align debug messages with method called 2022-05-02 16:50:54 -07:00
xs5871
fb5ecf7e38 refactor debug output 2022-04-23 14:25:21 -07:00
xs5871
642790b2e7 remove keyboard.current_key (never actually used) 2022-04-23 14:25:21 -07:00
xs5871
e04a01c25e factor out module pre-processing 2022-04-23 14:25:21 -07:00
xs5871
7ff77b97bb implement support for multiple scanners at once
fixup
2022-04-17 18:33:14 -07:00
xs5871
b3ec37e274 expose keypad options through scanner init 2022-04-11 18:26:43 -07:00
xs5871
175f0c6a97 introduce consistent naming scheme 2022-04-11 17:07:12 -07:00
xs5871
e395e89864 provide default coord_mapping from scanners 2022-04-11 17:07:12 -07:00
xs5871
8ac497d99b Make CPs keypad.KeyMatrix scanner the default. 2022-04-11 17:07:12 -07:00
xs5871
7431192e95 move old matrix to kmk.scanners.digitalio_matrix 2022-04-09 14:40:40 -07:00
xs5871
cc70c8f4a8 fix failing unit test.
During timeout processing, cancelations have to take immediate effect,
but new 0-delay timeouts have to be moved to the next cycle.
2022-04-02 10:06:27 -07:00
xs5871
07a485b04d implement stricter and more consistent timeouts.
- stricter timeouts: Instead of adding an entire millisecond, use a list
  of timeouts that are supposed to be handled on the same tick. This
  reduces the delay between target tick and actual tick, especially for
  many timeouts issued to the same tick, i.e. combos.
- consistent timeouts: Timeouts are now guaranteed to be handled in the
  order they were issued. Timer rollover is handled properly.

caveat / change to the interface: the returned `timeout_key` is a tuple
of the target timeout tick and the index of the timeout at that tick.
2022-03-31 16:13:32 -07:00
xs5871
5c33fd3a9f implement combo/chord/sequence module 2022-03-14 19:27:12 -07:00
zyxwars
c46d18ecb7 fix wrong commit 2022-03-12 08:37:05 -08:00
zyxwars
2d005048cc Temp fix del coord crash 2022-03-12 08:37:05 -08:00
xs5871
54ae022846 fix keypad matrix init and unguarded debug print. 2022-02-27 09:58:57 -08:00
Ellie T
2fce09986e Adding Pimoroni Keybow and Keybow 2040 2022-02-20 18:42:38 -08:00
Ellie
57ba0fe8b2 Custom matrix scanners
- Introduce Scanner base class for MatrixScanner
- Create new Scanner using built-in keypad module
- Allow overriding the scanner used by KMKKeyboard
2022-02-20 12:00:15 -08:00
xs5871
da3e87ee2d convert matrix report from row/col byte array to linear key_number. 2022-02-19 18:01:33 -08:00
xs5871
1c6b25517a implement hold-tap interrupt for Layers 2022-02-13 14:47:02 -08:00
Patrick McQuay
1c82f7d387 apply vylders fix and also figure out how to set _is_target correctly, as well as make it work nicely with ble. 2022-02-05 18:00:03 -08:00
xs5871
2874d49d20 disable hid_send on secondary split 2022-02-05 16:38:41 -08:00
patrickmcquay
7fbda871c2 real fix for swallowing keys, use a buffer and only process one key at a time. 2022-02-04 08:37:19 -08:00