zmk_mf68/app/tests
Pete Johanson fc511e40cc
fix(behaviors): Fixing erroneous combo triggering, hold-taps sticking
* This is a very simple fix to a rather complicated issue. Essentially,
hold-taps will "release" (raise) their captured keys before actually
telling the event manager they have captured a key. This means the event
manager ends up assigning the `last_listener_index` to the hold-tap
subscription rather than the combo. So when the combo calls
`ZMK_EVENT_RELEASE` it raises after the hold-tap instead of after the
combo as the combo code expects.
* The corresponding test (which fails without this change) has also been added.
* An event can be captured and released in the same event handler, before
the last_listener_index would have been updated. This causes some handlers
to be triggered multiple times.
* The solution is to update the last_listener_index before calling the next
event handler, so capturing and releasing within an event handler is harmless.
* Also see discussion at https://github.com/zmkfirmware/zmk/pull/1401
* If our handler dedides our undedided hold-tap,
  return early before continuing.
* Fix incorrect pointer logic, resulting in combo
  candidate filtering leaving incorrect timeout details.

Co-authored-by: Andrew Rae <ajrae.nv@gmail.com>
Co-authored-by: okke <okke@formsma.nl>
2022-08-03 20:09:50 -04:00
..
backlight refactor(kscan): Auto enable kscan drivers 2022-04-25 22:28:53 -04:00
caps-word feat(behaviors): Continue on mods in caps word. 2022-06-04 01:38:42 -04:00
combo fix(behaviors): Fixing erroneous combo triggering, hold-taps sticking 2022-08-03 20:09:50 -04:00
conditional-layer fix(keymaps): Handle matching then-layers. 2022-06-07 23:41:52 -04:00
gresc refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
hold-tap fix(tests): Fix hex formatting. 2022-05-19 10:55:23 -04:00
key-repeat refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
keypress refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
keytoggle test(behavior): Add alt-tab test and modded alpha test for toggle key 2022-06-03 00:04:41 -04:00
macros refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
modifiers refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
momentary-layer refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
none refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
sticky-keys refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
tap-dance refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
to-layer refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
toggle-layer refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
transparent refactor(tests): Move to native_posix_64 target. 2022-04-03 00:10:29 -04:00
wpm refactor(kscan): Auto enable kscan drivers 2022-04-25 22:28:53 -04:00