Skip to content

Commit

Permalink
feat(core): Support adding subs to other listeners.
Browse files Browse the repository at this point in the history
* Used for ZMK Studio event remappers to be sure the one
  RPC event listener subscribes to their mapped events.
  • Loading branch information
petejohanson committed Jun 28, 2024
1 parent 49f7275 commit b576d52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/include/zmk/event_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct zmk_event_subscription {
#define ZMK_LISTENER(mod, cb) const struct zmk_listener zmk_listener_##mod = {.callback = cb};

#define ZMK_SUBSCRIPTION(mod, ev_type) \
extern const struct zmk_listener zmk_listener_##mod; \
const Z_DECL_ALIGN(struct zmk_event_subscription) \
_CONCAT(_CONCAT(zmk_event_sub_, mod), ev_type) __used \
__attribute__((__section__(".event_subscription"))) = { \
Expand Down

0 comments on commit b576d52

Please sign in to comment.