d38740cebf
* 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
19 lines
No EOL
323 B
C
19 lines
No EOL
323 B
C
/*
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <zephyr.h>
|
|
#include <zmk/event-manager.h>
|
|
|
|
struct position_state_changed {
|
|
struct zmk_event_header header;
|
|
u32_t position;
|
|
bool state;
|
|
s64_t timestamp;
|
|
};
|
|
|
|
ZMK_EVENT_DECLARE(position_state_changed); |