forked from kofal.net/zmk
feat(behaviors): Add caps word (&caps_word).
* Add new `&caps_word` behavior that acts like caps lock, but releases automatically when any "break" keycode is pressed.
This commit is contained in:
committed by
Pete Johanson
parent
30ed237533
commit
54dabffd0d
@@ -14,3 +14,4 @@
|
||||
#include <behaviors/bluetooth.dtsi>
|
||||
#include <behaviors/ext_power.dtsi>
|
||||
#include <behaviors/outputs.dtsi>
|
||||
#include <behaviors/caps_word.dtsi>
|
||||
|
||||
19
app/dts/behaviors/caps_word.dtsi
Normal file
19
app/dts/behaviors/caps_word.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/ caps_word: behavior_caps_word {
|
||||
compatible = "zmk,behavior-caps-word";
|
||||
label = "CAPS_WORD";
|
||||
#binding-cells = <0>;
|
||||
continue-list = <UNDERSCORE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
15
app/dts/bindings/behaviors/zmk,behavior-caps-word.yaml
Normal file
15
app/dts/bindings/behaviors/zmk,behavior-caps-word.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Caps word behavior
|
||||
|
||||
compatible: "zmk,behavior-caps-word"
|
||||
|
||||
include: zero_param.yaml
|
||||
|
||||
properties:
|
||||
continue-list:
|
||||
type: array
|
||||
required: true
|
||||
mods:
|
||||
type: int
|
||||
Reference in New Issue
Block a user