Commit Graph

610 Commits

Author SHA1 Message Date
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
0fbba96026 add type hinting for kmk.keys 2022-10-08 13:28:29 -07:00
Kyle Brown
9431ce5ec1 Quickpin initial support 2022-10-08 19:48:30 +00:00
xs5871
218c15e322 even more typehints 2022-10-03 18:12:48 -07:00
xs5871
565ec8353b continue/finish holdtap-repeat 2022-10-02 09:54:52 -07:00
Aldoo
5efd2688d7 Support for tap behavior autorepeat for modtap and layertap keys.
Faulty logic corrected

Possibly a bug could happen whenever entering ht_press with a non-empty key_state outside of repeat context (but can it really happen?)

Some formatting to make github tests happy

Documentation for repeat behavior.

Make the tests happy again!

same...
2022-10-02 09:54:52 -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
xs5871
63fd4d9574 add debug info for pixelbuffer to RGB extension 2022-09-22 08:22:22 -07:00
Anton K. (ai Doge)
891cd1a67f Add key coord combos
Added an option to use key coord in the matrix to make combos.
this allows to press / release combos regardless of layer and Key.
2022-09-20 08:04:57 +00: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
85b5aba679 make rgb.val_limit apply globally 2022-09-16 17:59:38 -07:00
Kyle Brown
a21bf761ba Update peg_rgb_matrix.py
Actually fix formatting
2022-09-15 20:24:45 -07:00
Kyle Brown
01cd9d4a7c Apply suggestions from code review
Fix formatting
2022-09-15 20:24:45 -07:00
Jan Lindblom
352bf25c0d Decrease RGB brightness when in powersave. Also add more colours. 2022-09-15 20:24:45 -07:00
Jan Lindblom
9c85ea9b6b Performance improvements. 2022-09-15 20:24:45 -07:00
Jan Lindblom
5f09ba7c0a Add support for changing LED brightness. 2022-09-15 20:24:45 -07:00
xs5871
0b4b98f5fb add debug info for holdtap key resolution 2022-09-15 08:57:14 -07:00
xs5871
1cb4bddce4 refactor combos: states instead of lists 2022-09-13 22:23:06 -07:00
xs5871
dafc969bf5 speed improvement in combo matching code 2022-09-13 22:23:06 -07:00
xs5871
f9203dbb85 fix stack exhaustion for certain hold-tap actions 2022-09-11 21:48:52 -07:00
xs5871
46cf7030a1 update and add docs to serialace 2022-08-31 18:25:07 -07:00
xs5871
737973c334 implement arbitrary code execution (ACE) over data serial. 2022-08-31 18:25:07 -07:00
xs5871
aee793a300 missed some pre_process to resume_process conversions 2022-08-31 18:22:52 -07:00
xs5871
ea94e9ba19 fix dependence on optional int_coord 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
e71d1fcb6e fix crash on failing look-up 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
Hendrix
34f4264362 Add code review suggestions 2022-08-10 17:12:12 +00:00
Matthew Hendrix
9c7b14e865 Update code to be less fragile 2022-08-10 17:12:12 +00:00
Matthew Hendrix
7f1e7a2708 Remove callback, update docs 2022-08-10 17:12:12 +00:00
Hendrix
ad3c261c1a fix formatting issue 2022-08-10 17:12:12 +00:00
Hendrix
0b23da551a Add callback to lock status 2022-08-10 17:12:12 +00:00
xs5871
ad6f4e5f05 fix mouse_keys not working at all 2022-08-05 14:39:57 -07:00
crazyiop
23fd3a9bed [usb] Allow kb to lost usb connection without getting lost
When the usb connection is lost (for example when plugged into a pc that
keep the usb powered when shut down) the kb is lost and need to be
unpluged to be rebooted.

My guess is that the failling `hid_report.send()` change some internal
state that could not recover by itself.

This prevent even trying to send the report when the usb is not
connected. This fix has been tested working on me and another discord
user so far. The result seems consistent even if the test period has not
been very long yet.
2022-08-05 18:35:16 +00:00
xs5871
f0544465c7 remove reference to disfunct KMK_RELEASE. 2022-08-03 20:11:00 +00:00
xs5871
5d2a42d9a9 fix trackball module forcing reports to zero 2022-08-01 16:46:53 -07:00
Salvatore La Bua
3d80e4aba8 Consistent variable naming
Signed-off-by: Salvatore La Bua <slabua@gmail.com>
2022-07-31 07:44:22 +00:00
Salvatore La Bua
4c93720a2f Lintfix (hopefully)
Signed-off-by: Salvatore La Bua <slabua@gmail.com>
2022-07-31 07:44:22 +00:00
Salvatore La Bua
cb83df25f0 Lintfix
Signed-off-by: Salvatore La Bua <slabua@gmail.com>
2022-07-31 07:44:22 +00:00
Salvatore La Bua
5ba865e4c6 Add ScrollDirection class for the Pimoroni Trackball
Signed-off-by: Salvatore La Bua <slabua@gmail.com>
2022-07-31 07:44:22 +00:00
Salvatore La Bua
f674ac6b13 Add reverse scrolling mode to the Pimoroni Trackball module
Signed-off-by: Salvatore La Bua <slabua@gmail.com>
2022-07-31 07:44:22 +00:00
kbjunky
a1d8a990f1 Update mouse_keys.py
Added check for USB enabled half in case of a split keyboard.
Cleaning of hid_pending state after sending.
2022-07-24 15:19:35 -07:00
xs5871
5a85c6cfb3 move validators and metas to their respective modules 2022-07-24 15:19:20 -07:00
xs5871
e0ca1124fb cleanup unused coord_raw 2022-07-24 15:19:20 -07:00
xs5871
2a7654f852 cleanup unused KMKKeyboard attributes
squash cleanup KMKKeyboard
2022-07-24 15:19:20 -07:00
James Fitzgerald
637991cedc Make suggested changes 2022-07-24 21:15:20 +00:00
James Fitzgerald
606780ee1c Remove unnecessary list check 2022-07-24 21:15:20 +00:00
James Fitzgerald
fe6510baec "not key in" -> "key not in" 2022-07-24 21:15:20 +00:00
James Fitzgerald
74563368c5 Fix key pressed before combo making combo wait for timeout 2022-07-24 21:15:20 +00:00
xs5871
3f3bd93109 implement global debug interface. 2022-07-22 09:21:30 -07:00
xs5871
3f826267b4 remove adafruit_pioasm dependency 2022-07-21 18:26:08 -07:00
xs5871
914f449699 factor out firmware and unicode mode keys 2022-07-21 18:25:43 -07:00
xs5871
84f1b2ae06 cleanup 2022-07-21 18:25:43 -07:00
xs5871
f086a78864 remove another stack frame level 2022-07-21 18:25:43 -07:00
xs5871
47ccd56c30 refactor initial key lookup
based on:
639c38d5aa
2022-07-21 18:25:43 -07:00
Steven Karrmann
4d6983da11 Add 'BSPACE' keycode for documentation consistency 2022-07-20 15:36:24 -07:00
James Fitzgerald
d830ff7293 fix typo and formatting again 2022-07-19 16:16:47 -07:00
James Fitzgerald
fd73292da0 Add shorthand 2022-07-19 16:16:47 -07:00
James Fitzgerald
bff8d3d7c5 fix formatting 2022-07-19 16:16:47 -07:00
James Fitzgerald
d584b1f506 Add keycode for software reload 2022-07-19 16:16:47 -07:00
xs5871
ed94ad06da de-duplicate consumer keys 2022-07-14 16:46:21 -07:00
xs5871
f46e3d59e6 add brightness consumer keys 2022-07-14 16:46:21 -07:00
James Fitzgerald
25a86df5c1 Minor code cleanup
* Changed from multiple calls of `keyboard.remove_key` to a for loop when releasing modifiers on match
2022-07-14 10:29:25 +00:00
James Fitzgerald
8ab67052cf Rename to String Substitution 2022-07-14 10:29:25 +00:00
James Fitzgerald
521f991f2d Improve guarding against non-shift modifiers 2022-07-14 10:29:25 +00:00
James Fitzgerald
664a557483 Apply suggestions from code review
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
2022-07-14 10:29:25 +00:00
James Fitzgerald
50279f88fb Add keyboard event tests 2022-07-14 10:29:25 +00:00
James Fitzgerald
3db84528f2 Add informative error when illegal character is in user dictionary 2022-07-14 10:29:25 +00:00
James Fitzgerald
ab75b2bca3 Fix wrong quotes 2022-07-14 10:29:25 +00:00
James Fitzgerald
81f4f7ccf0 Bugfix for text replacement optimization 2022-07-14 10:29:25 +00:00
James Fitzgerald
103e51eb7f Improve comment clarity 2022-07-14 10:29:25 +00:00
James Fitzgerald
a5dc665ddc Optimize backspacing to only backspace characters that need to be backspaced rather than the entire word 2022-07-14 10:29:25 +00:00
James Fitzgerald
d8ca20c73c Code cleanup
* Refactor for improved readability
* Add docstrings and comments
* Add type annotations
2022-07-14 10:29:25 +00:00
James Fitzgerald
b17c73bac0 Replace double quotes with single quotes 2022-07-14 10:29:25 +00:00
James Fitzgerald
0392aa74e2 Fix for underscore in user dictionary causing KeyError 2022-07-14 10:29:25 +00:00
James Fitzgerald
9a3524d363 Implement Text Replacement module 2022-07-14 10:29:25 +00:00
xs5871
20705e2150 unit test fail may be caused by a stuck combo 2022-07-12 19:20:22 -07:00
Josh Klar
db395a81e4 fix(lint): kmk/modules/combos.py 2022-07-11 08:16:11 -07:00
Luke D Russell
9e29f4c442 Adds an alias for the LEADER keycode 2022-07-11 08:16:11 -07:00
Gleb Sabirzyanov
6fe2457d8e Rename encoder resolution to divisor 2022-07-08 11:03:01 +00:00
Gleb Sabirzyanov
ed41f4cda5 Fix formatting and comments 2022-07-08 11:03:01 +00:00
Gleb Sabirzyanov
6e8aaff050 Cancel action on encoder return 2022-07-08 11:03:01 +00:00
Gleb Sabirzyanov
58248a9631 Prefer integer division in encoder.py
Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
2022-07-08 11:03:01 +00:00
Gleb Sabirzyanov
e72ab5a958 Fix formatting 2022-07-08 11:03:01 +00:00
Gleb Sabirzyanov
aafa0d9c6a Add encoder resolution setting 2022-07-08 11:03:01 +00:00
xs5871
178acc0702 pacify the linter 2022-07-05 08:48:18 -07:00
xs5871
ac8a696acb fix combos to match new unittest 2022-07-05 08:48:18 -07:00
xs5871
258e622bb4 fix and refactor keyboard unittest 2022-07-05 08:48:18 -07:00
xs5871
357165c14b fix KC["_"] resolving to BLE_REFRESH 2022-07-02 08:03:05 -07:00
crazyiop
d2eba7b4ef [split] cleanup: remove target_left (unused)
only split_target_left is used
2022-06-30 00:38:20 -07:00
xs5871
bb2ddc1e33 fix tapdance reporting key in wrong order 2022-06-30 00:37:04 -07:00
xs5871
e829bc83de fix tapdance crash and add unit-tests 2022-06-30 00:37:04 -07:00
James Fitzgerald
b25f325871 Rename randomize to enable_interval_randomization 2022-06-30 06:37:57 +00:00
James Fitzgerald
7886b374b6 Implement suggestions and improve documentation clarity 2022-06-30 06:37:57 +00:00
James Fitzgerald
4707b92fd4 Skip the waiting entirely if wait is set to 0 or lower rather than creating a timer of 0 2022-06-30 06:37:57 +00:00
James Fitzgerald
c6bbd49d05 Minor bugfix for toggle functionality when during wait period 2022-06-30 06:37:57 +00:00
James Fitzgerald
6033dc91d0 Make toggle functionality start after wait period 2022-06-30 06:37:57 +00:00
James Fitzgerald
b55942731d Add toggle functionality 2022-06-30 06:37:57 +00:00