forked from kofal.net/zmk
feat(behaviors): &key_repeat behavior + tests.
* Add new `&key_repeat` behavior that captures and re-sends the most recently triggered keycode. Closes: #853
This commit is contained in:
committed by
Pete Johanson
parent
ac3c3170bd
commit
70bb7c9334
@@ -15,3 +15,4 @@
|
||||
#include <behaviors/ext_power.dtsi>
|
||||
#include <behaviors/outputs.dtsi>
|
||||
#include <behaviors/caps_word.dtsi>
|
||||
#include <behaviors/key_repeat.dtsi>
|
||||
|
||||
19
app/dts/behaviors/key_repeat.dtsi
Normal file
19
app/dts/behaviors/key_repeat.dtsi
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
/ {
|
||||
behaviors {
|
||||
/omit-if-no-ref/ key_repeat: behavior_key_repeat {
|
||||
compatible = "zmk,behavior-key-repeat";
|
||||
label = "KEY_REPEAT";
|
||||
#binding-cells = <0>;
|
||||
usage-pages = <HID_USAGE_KEY>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
13
app/dts/bindings/behaviors/zmk,behavior-key-repeat.yaml
Normal file
13
app/dts/bindings/behaviors/zmk,behavior-key-repeat.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Key repeat behavior
|
||||
|
||||
compatible: "zmk,behavior-key-repeat"
|
||||
|
||||
include: zero_param.yaml
|
||||
|
||||
properties:
|
||||
usage-pages:
|
||||
type: array
|
||||
required: true
|
||||
Reference in New Issue
Block a user