forked from kofal.net/zmk
feat(split): Make locality work nested behavior invocations
Co-authored-by: Tokazio <tokazio@hotmail.com>
This commit is contained in:
committed by
Pete Johanson
parent
11f600d9e5
commit
9e36ebd525
@@ -26,6 +26,7 @@ struct zmk_behavior_binding_event {
|
||||
int layer;
|
||||
uint32_t position;
|
||||
int64_t timestamp;
|
||||
uint8_t source;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -42,6 +43,19 @@ struct zmk_behavior_binding_event {
|
||||
*/
|
||||
const struct device *zmk_behavior_get_binding(const char *name);
|
||||
|
||||
/**
|
||||
* @brief Invoke a behavior given its binding and invoking event details.
|
||||
*
|
||||
* @param src_binding Behavior binding to invoke.
|
||||
* @param event The binding event struct containing details of the event that invoked it.
|
||||
* @param pressed Whether the binding is pressed or released.
|
||||
*
|
||||
* @retval 0 If successful.
|
||||
* @retval Negative errno code if failure.
|
||||
*/
|
||||
int zmk_behavior_invoke_binding(const struct zmk_behavior_binding *src_binding,
|
||||
struct zmk_behavior_binding_event event, bool pressed);
|
||||
|
||||
/**
|
||||
* @brief Get a local ID for a behavior from its @p name field.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user