Commit Graph

610 Commits

Author SHA1 Message Date
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
James Fitzgerald
654127bac7 Minor doc addition 2022-06-30 06:37:57 +00:00
James Fitzgerald
05d1a622dd Remove redundant timer code 2022-06-30 06:37:57 +00:00
James Fitzgerald
17a8e39bfe Fix wrong quotes 2022-06-30 06:37:57 +00:00
James Fitzgerald
e448e09e73 Run make fix-isort fix-formatting on RapidFire module 2022-06-30 06:37:57 +00:00
James Fitzgerald
d5dfbf456f Add RapidFire module 2022-06-30 06:37:57 +00:00
nogg3r5
aa327e4557 Typo in variable name 2022-06-28 08:14:27 -07:00
nogg3r5
37e67c7c44 Update led.py
This line also ends changing, otherwise the variable brightness is never used
2022-06-28 08:14:27 -07:00
nogg3r5
1f8d66ce8c Updating correct line 2022-06-28 08:14:27 -07:00
nogg3r5
333913a924 Update led.py
Reducingdefault brightness to 50%
2022-06-28 08:14:27 -07:00
nogg3r5
15c5e4415e Set brightness to 100 when the board powers on
There didn't seem to be a way to do this, unless I missed something somewhere?
2022-06-28 08:14:27 -07:00
Gleb Sabirzyanov
d70de71c5f Fix encoder direction inversion being ignored 2022-06-21 08:16:54 -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
614961521d fix inconsistencies with chained holdtap keys 2022-06-11 12:42:49 -07:00
Kyle Brown
91f494846a Revert "[rgb] fix set_rgb_fill method"
This reverts commit 90c4ce99f3.
2022-06-09 11:26:53 +00:00
crazyiop
8d7ae8b284 add info to exception to help debug layers 2022-06-09 11:04:00 +00:00
Björn Bösel
561896769c fix code style and import order 2022-06-09 01:58:07 -07:00
Björn Bösel
5bf33056bf removed handling of old scroll/pointing toggle 2022-06-09 01:58:07 -07:00
Björn Bösel
9a1fc95f54 separated trackball handlers from keyboard layers. added key definitions for separated handler selectaion 2022-06-09 01:58:07 -07:00
Björn Bösel
80660e4336 code style 2022-06-09 01:58:07 -07:00
Björn Bösel
4b0e459d62 Add layers to pimoroni trackball 2022-06-09 01:58:07 -07:00
jonathan nifenecker
90c4ce99f3 [rgb] fix set_rgb_fill method
The code was wrongly iterating the neopixel, running `fill()` on every
individual pixels.
2022-06-08 08:47:02 -07:00
xs5871
400042f799 implement fast and late reset for combos 2022-06-05 16:32:25 -07:00
xs5871
229b7afcb0 implement faster combo activation 2022-06-05 16:32:25 -07:00
xs5871
d6659cd1a3 fix dangling reference issue 2022-06-03 08:46:43 -07:00
Cole Smith
ff3f7234d4 formatting 2022-05-28 12:05:36 -07:00
Cole Smith
b91974bce2 rgb matrix now can work out what side its on using the drive name 2022-05-28 12:05:36 -07:00
xs5871
08d3386643 fix KC.LM 2022-05-26 08:09:15 -07:00
xs5871
b6146365b3 fix crash on releasing dropped key presses 2022-05-23 15:59:52 -07:00
Cole Smith
42221f4a28 removed gc calls 2022-05-21 19:36:26 -07:00
Cole Smith
eb23ed0020 added peg rgb_
matrix code and docs
2022-05-21 19:36:26 -07:00
Steven Wilde
8d0b835c9c Improved readability and finished renaming 2022-05-19 15:10:32 +00:00
Steven Wilde
a6e5ee1c08 Renamed to Dynamic Sequences 2022-05-19 15:10:32 +00:00
Steven Wilde
9a211f091a Fix imports and quotes 2022-05-19 15:10:32 +00:00
Steven Wilde
55b06bba79 Added dynamic macros module 2022-05-19 15:10:32 +00:00
Cole Smith
2de044469f missed text render call in boot up after refactor 2022-05-12 21:56:01 +00:00
Cole Smith
9b34fcd7ef formatting 2022-05-12 21:56:01 +00:00
Cole Smith
6970a6c786 oled data is now a class 2022-05-12 21:56:01 +00:00
Cole Smith
7e760a2917 made changes from klardotsh's review 2022-05-12 21:56:01 +00:00
Cole Smith
ad43377a5e why does it fix other things but not quotes 2022-05-12 21:56:01 +00:00
Cole Smith
44d27ef09a black my bad 2022-05-12 21:56:01 +00:00
Cole Smith
caab7a4a15 added oleds and docs 2022-05-12 21:56:01 +00:00
John Morrison
c183bebb58 Conform class name case conventions 2022-05-08 20:10:41 +00:00
John Morrison
bea0f6d75b Requested rename 2022-05-08 20:10:41 +00:00
John Morrison
12e7a1b42c Class should be capital, use get rather than exception 2022-05-08 20:10:41 +00: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
BigTuna94
a4d6a44a04 pythonify Potentiometer state 2022-05-06 20:29:39 -07:00
Zach Richard
b97fca7c76 remove unnecessary intermediate GPIOPotentiometer class 2022-05-06 20:29:39 -07:00
BigTuna94
9898a1ed73 fix formatting/sorting 2022-05-06 20:29:39 -07:00
Zach Richard
f119678ec7 simplify ADC readings 2022-05-06 20:29:39 -07:00
Zach Richard
003bb7d96a switch back to averaging multiple ADC readings. More reliable. 2022-05-06 20:29:39 -07:00
Zach Richard
52b0ff5ca1 cleanup and fixes 2022-05-06 20:29:39 -07:00
BigTuna94
9b1976ec3e add support for potentiometers 2022-05-06 20:29:39 -07:00
xs5871
51f07d8558 refactor tapdance on top of holdtap 2022-05-06 20:29:26 -07:00
xs5871
7af0e11f75 prepare layers for tapdance refactor 2022-05-06 20:29:26 -07:00
xs5871
385263e0e6 prepare oneshot for tapdance refactor 2022-05-06 20:29:26 -07:00
xs5871
00a484fa61 prepare modtap for tapdance refactor 2022-05-06 20:29:26 -07:00
xs5871
0751f6ca5f prepare holdtap for tapdance refactor 2022-05-06 20:29:26 -07:00
Steven Wilde
29abba63e7 Removed curr_event and simplified scan_for_changes 2022-05-04 16:40:48 +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
Syed Hussaini
609e275c03 doc updates based on the comments and refactoring 2022-05-02 21:02:40 +00:00
Syed Hussaini
660b751c87 review updates and renamed to Sticky Mod 2022-05-02 21:02:40 +00:00
Syed Hussaini
1b902b907c updates based on review comments 2022-05-02 21:02:40 +00:00
Syed Hussaini
bce7959f66 modholdandtap implementation 2022-05-02 21:02:40 +00:00
xs5871
62ff7c838d fix combo buffer replay /w layer-switch 2022-04-25 13:26:02 -07:00
John Morrison
bb8dec907a Clear cache rather than reassign, correct ALPHA case check and creation 2022-04-25 17:50:26 +00:00
John Morrison
6a7f5e285e Remove unused import 2022-04-25 17:50:26 +00:00
John Morrison
5eeb88e2b7 Minimum necessary to add index and get capability and tests 2022-04-25 17:50:26 +00:00
xs5871
c7eaeaf90c implement multiple pixelbuffer in rgb extension 2022-04-24 10:20:22 -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
Ryan Rotter
27a0bc1977 refactor Key and ModifierKey __call__ methods
- Add tests for ModifierKey chaining
- Rewrite ModifierKey.__call__ for correctness and readability
- __call__ now maintains handlers and meta, like clone()
2022-04-22 09:10:40 -07:00
xs5871
7a51ce576f fixes scanner init and bi-directional communication in split module 2022-04-20 15:59:51 -07:00
John Morrison
4d297e6ab2 Typos 2022-04-18 13:28:26 +00:00
xs5871
1700aff408 implements scanner with rotaryio 2022-04-17 18:33:34 -07:00
xs5871
63973e4a6e fix late release of oneshot keys 2022-04-17 18:33:24 -07:00
xs5871
7ff77b97bb implement support for multiple scanners at once
fixup
2022-04-17 18:33:14 -07:00
Ryan Rotter
c7490087b6 Add ROPT and LOPT as alias for alt keys
Additional aliases for macOS key names to match QMK behavior
2022-04-16 17:09:47 -07:00
xs5871
d2e87b3e70 add keypad scanner for shift registers 2022-04-12 08:29:23 -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
levpopov
c880c02ad5 use keypad.Event instead of Matrix.KeyEvent 2022-04-10 14:30:45 -07:00
levpopov
89351fc203 Fix direct GPIO scanner for split keyboards
https://github.com/KMKfw/kmk_firmware/issues/372
2022-04-10 14:30:45 -07:00
Syed Hussaini
4b03ba846a formatted module with black 2022-04-09 15:19:02 -07:00
Syed Hussaini
be308d516f added docs 2022-04-09 15:19:02 -07:00
Syed Hussaini
c950785385 caps word implementation 2022-04-09 15:19:02 -07:00
xs5871
7431192e95 move old matrix to kmk.scanners.digitalio_matrix 2022-04-09 14:40:40 -07:00
Syed Hussaini
6002ad33e1 rename to cg_swap and added docs 2022-04-08 20:22:43 -07:00
Syed Hussaini
3f0283422d swapping control with cmd 2022-04-08 20:22:43 -07:00
sparksThefire
7b92596937 Fix WinCompose usage
WinCompose requires the `enter` key to be typed at the end of a special unicode character. In order to help print emojis and emoticons in a windows environment, I have added the enter key to the Windows compose unicode sequence method. I have tested this with my local keyboard.
2022-04-05 18:01:53 -07:00
xs5871
e5f89963cf fix pystack exhaustion caused by make_shifted_key.
This removes multiple layers of indirection, effectively making
`make_shifted_key` only as heavy on the stack as the reguler `make_key`.
2022-04-03 13:47:27 -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
d4e72b98c9 remove dependency on neopixel lib for custom pixelbuffers 2022-03-24 17:56:59 -07:00