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/behaviors/behavior_none.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/behaviors/behavior_none.c')
-rw-r--r-- | app/src/behaviors/behavior_none.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/behaviors/behavior_none.c b/app/src/behaviors/behavior_none.c index b548e6f..96ea9d5 100644 --- a/app/src/behaviors/behavior_none.c +++ b/app/src/behaviors/behavior_none.c @@ -11,6 +11,8 @@ #include <drivers/behavior.h> #include <logging/log.h> +#include <zmk/behavior.h> + LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); struct behavior_none_config {}; @@ -18,13 +20,13 @@ struct behavior_none_data {}; static int behavior_none_init(struct device *dev) { return 0; }; -static int on_keymap_binding_pressed(struct device *dev, u32_t position, u32_t _param1, - u32_t _param2) { +static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { return 0; } -static int on_keymap_binding_released(struct device *dev, u32_t position, u32_t _param1, - u32_t _param2) { +static int on_keymap_binding_released(struct zmk_behavior_binding *binding, + struct zmk_behavior_binding_event event) { return 0; } |