forked from kofal.net/zmk
Initial behavior for key presses on encoder rotate
This commit is contained in:
@@ -2,4 +2,5 @@
|
||||
#include <behaviors/transparent.dtsi>
|
||||
#include <behaviors/mod_tap.dtsi>
|
||||
#include <behaviors/momentary_layer.dtsi>
|
||||
#include <behaviors/reset.dtsi>
|
||||
#include <behaviors/reset.dtsi>
|
||||
#include <behaviors/sensor_rotate_key_press.dtsi>
|
||||
19
app/dts/behaviors/sensor_rotate_key_press.dtsi
Normal file
19
app/dts/behaviors/sensor_rotate_key_press.dtsi
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
/ {
|
||||
behaviors {
|
||||
enckp: behavior_sensor_rotate_key_press {
|
||||
compatible = "zmk,behavior-sensor-rotate-key-press";
|
||||
label = "ENC_KEY_PRESS";
|
||||
usage_page = <USAGE_KEYPAD>;
|
||||
#sensor-binding-cells = <2>;
|
||||
};
|
||||
|
||||
enccp: behavior_sensor_rotate_consumer_press {
|
||||
compatible = "zmk,behavior-sensor-rotate-key-press";
|
||||
label = "ENC_CONSUMER_PRESS";
|
||||
usage_page = <USAGE_CONSUMER>;
|
||||
#sensor-binding-cells = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2020, Pete Johanson
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Sensor rotate key press/release behavior
|
||||
|
||||
compatible: "zmk,behavior-sensor-rotate-key-press"
|
||||
|
||||
properties:
|
||||
label:
|
||||
type: string
|
||||
required: true
|
||||
"#sensor-binding-cells":
|
||||
type: int
|
||||
required: true
|
||||
const: 2
|
||||
usage_page:
|
||||
type: int
|
||||
default: 0
|
||||
|
||||
sensor-binding-cells:
|
||||
- param1
|
||||
- param2
|
||||
Reference in New Issue
Block a user