diff options
author | Okke Formsma <okke@formsma.nl> | 2020-10-10 23:32:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 17:32:53 -0400 |
commit | d38740cebf3be17a7d55fc51f5f06752182f96d8 (patch) | |
tree | 9598a6488632d2288aa10f954acde954861015a2 /app/src/kscan.c | |
parent | fc6c01fd6941ec795710d66ead9e17d5dfbaa19d (diff) |
Add timestamps to position and behavior events (#147)
* Add timestamps to position events and behaviors.
- Take original event timestamps into consideration so nested tap-holds have proper timing.
- Add position and timestamp to keycode state changed event so the one-shot behavior can properly identify other keypresses and timings.
- Add timestamp to position events received from peripheral
* reduce number of arguments to behaviors
Diffstat (limited to 'app/src/kscan.c')
-rw-r--r-- | app/src/kscan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/kscan.c b/app/src/kscan.c index 0046f5c..8575e70 100644 --- a/app/src/kscan.c +++ b/app/src/kscan.c @@ -52,6 +52,7 @@ void zmk_kscan_process_msgq(struct k_work *item) { pos_ev = new_position_state_changed(); pos_ev->state = pressed; pos_ev->position = position; + pos_ev->timestamp = k_uptime_get(); ZMK_EVENT_RAISE(pos_ev); } } |