From 5eeb310b2f0ccf1adf91b448573001559696a1d7 Mon Sep 17 00:00:00 2001 From: Okke Formsma Date: Sat, 26 Dec 2020 14:46:56 +0100 Subject: feat(grave-escape): implement grave-escape closes #85 --- app/dts/behaviors.dtsi | 1 + app/dts/behaviors/gresc.dtsi | 19 +++++++++++++++++++ .../bindings/behaviors/zmk,behavior-mod-morph.yaml | 16 ++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 app/dts/behaviors/gresc.dtsi create mode 100644 app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml (limited to 'app/dts') diff --git a/app/dts/behaviors.dtsi b/app/dts/behaviors.dtsi index daa073f..4333cee 100644 --- a/app/dts/behaviors.dtsi +++ b/app/dts/behaviors.dtsi @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/app/dts/behaviors/gresc.dtsi b/app/dts/behaviors/gresc.dtsi new file mode 100644 index 0000000..2959388 --- /dev/null +++ b/app/dts/behaviors/gresc.dtsi @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + behaviors { + /omit-if-no-ref/ gresc: grave_escape { + compatible = "zmk,behavior-mod-morph"; + label = "GRAVE_ESCAPE"; + #binding-cells = <0>; + bindings = <&kp ESC>, <&kp GRAVE>; + mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>; + }; + }; +}; diff --git a/app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml b/app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml new file mode 100644 index 0000000..66b452a --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-mod-morph.yaml @@ -0,0 +1,16 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +description: Keyboard Reset Behavior + +compatible: "zmk,behavior-mod-morph" + +include: zero_param.yaml + +properties: + bindings: + type: phandle-array + required: true + mods: + type: int + required: true -- cgit v1.2.3