zmk/app/include/zmk/events/position_state_changed.h
Okke Formsma 25fd5b2402 feat(events): Add trace_id to position, behavior and key events
With the trace_id it's possible for behaviors to keep track of which events were caused by which trigger.
2021-02-16 21:58:34 +01:00

22 lines
No EOL
413 B
C

/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <zephyr.h>
#include <zmk/event_manager.h>
#include <zmk/matrix.h>
struct zmk_position_state_changed {
uint32_t position;
bool state;
int64_t timestamp;
int32_t trace_id;
};
ZMK_EVENT_DECLARE(zmk_position_state_changed);
uint32_t zmk_get_event_trace_id(uint32_t position, bool pressed);