zmk_mf68/app/src
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
..
behaviors fix(behaviors): Fixing erroneous combo triggering, hold-taps sticking 2022-08-03 20:09:50 -04:00
display feat(display): Blank on idle optionally. 2022-07-26 14:12:38 -04:00
events feat(display): Add new peripheral status/display 2022-05-17 13:09:21 -04:00
split fix(split): Raise release events on disconnect. 2022-06-12 22:53:02 -04:00
activity.c fix(sleep): use pm_power_state_force for proper device power management 2022-05-17 00:30:47 -04:00
backlight.c fix(backlight): Improve initial power on behaviour 2022-06-25 00:37:00 -04:00
battery.c feat(battery): Add Kconfig setting for battery level report interval 2022-05-17 12:03:57 -04:00
behavior_queue.c refactor: Move to k_work_delayable API. 2022-04-03 00:10:29 -04:00
ble.c refactor(split): Clean up Kconfig organization. 2022-05-29 19:18:09 -04:00
combo.c fix(behaviors): Fixing erroneous combo triggering, hold-taps sticking 2022-08-03 20:09:50 -04:00
conditional_layer.c fix(keymaps): Handle matching then-layers. 2022-06-07 23:41:52 -04:00
endpoints.c fix(usb): Split HID from core USB, logging fix. 2022-04-13 13:07:59 -04:00
event_manager.c fix(behaviors): Fixing erroneous combo triggering, hold-taps sticking 2022-08-03 20:09:50 -04:00
ext_power_generic.c fix(sleep): use pm_power_state_force for proper device power management 2022-05-17 00:30:47 -04:00
hid.c feat(behavior): Add key toggle 2022-06-03 00:04:41 -04:00
hid_listener.c refactor(hid): Move hid logic into hid.c 2022-06-03 00:04:41 -04:00
hog.c refactor: k_work_queue API updates. 2022-04-03 00:10:29 -04:00
keymap.c fix(split): Add define for local source. 2022-01-31 23:03:34 -05:00
kscan.c fix(split): Add define for local source. 2022-01-31 23:03:34 -05:00
main.c fix(display): All display updates in work thread. 2020-12-06 22:47:21 -05:00
matrix_transform.c refactor: replace filename hyphens with underscores 2020-12-28 01:15:35 -05:00
rgb_underglow.c feat(underglow): Add RGB auto off timeout on idle and on usb disconnect 2022-06-25 10:56:36 -04:00
sensors.c refactor(core): Extra event payloads to own types, refactor API. 2021-01-20 07:06:11 -05:00
stdlib.c refactor(splits): Minor cleanups to periph invocation 2022-01-31 23:03:34 -05:00
usb.c fix(usb): Correctly detect USB connection status. 2022-06-16 00:50:04 -04:00
usb_hid.c fix(usb): Split HID from core USB, logging fix. 2022-04-13 13:07:59 -04:00
wpm.c feat: Add WPM calculator and display widget 2021-01-23 18:38:31 -05:00