* Always import mouse keys behavior and their associated listeners. * Tweak listener code to only add listener nodes when listener and the associated input device are enabled.
24 lines
470 B
Text
24 lines
470 B
Text
/*
|
|
* Copyright (c) 2023 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <dt-bindings/zmk/behaviors.h>
|
|
|
|
/ {
|
|
behaviors {
|
|
#if ZMK_BEHAVIOR_OMIT(MKP)
|
|
/omit-if-no-ref/
|
|
#endif
|
|
mkp: mouse_key_press {
|
|
compatible = "zmk,behavior-mouse-key-press";
|
|
#binding-cells = <1>;
|
|
};
|
|
};
|
|
|
|
mkp_input_listener: mkp_input_listener {
|
|
compatible = "zmk,input-listener";
|
|
device = <&mkp>;
|
|
};
|
|
};
|