zmk/app/include/dt-bindings/zmk/behaviors.h
Peter Johanson fd28eab179 feat: Add the ability to keep/omit behaviors for a given build.
* Use defines to keep either all behaviors with omits, or selective behaviors with
  explicit kept behavior, before including `behavior.dtsi` in keymaps.
* Default ZMK_BEHAVIORS_KEEP_ALL when building with the studio RPC
  endpoint snippet.
2024-09-05 12:22:08 -06:00

9 lines
No EOL
368 B
C

/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#define ZMK_BEHAVIOR_OMIT(_name) \
!(defined(ZMK_BEHAVIORS_KEEP_##_name) || \
(defined(ZMK_BEHAVIORS_KEEP_ALL) && !defined(ZMK_BEHAVIORS_OMIT_##_name)))