From ac09c03f16df9676e0f1c70faf08623ff376869a Mon Sep 17 00:00:00 2001 From: Kurtis Lew <27038994+kurtis-lew@users.noreply.github.com> Date: Wed, 30 Aug 2023 20:48:05 -0700 Subject: [PATCH] feat(zmk_uno): Implement keymap --- config/zmk_uno.conf | 3 +++ config/zmk_uno.keymap | 62 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 config/zmk_uno.conf create mode 100644 config/zmk_uno.keymap diff --git a/config/zmk_uno.conf b/config/zmk_uno.conf new file mode 100644 index 0000000..3c5a229 --- /dev/null +++ b/config/zmk_uno.conf @@ -0,0 +1,3 @@ +# Enable encoder support +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file diff --git a/config/zmk_uno.keymap b/config/zmk_uno.keymap new file mode 100644 index 0000000..c827573 --- /dev/null +++ b/config/zmk_uno.keymap @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include +#include + +// Uncomment the following block if using the "Direct Wire" jumper to switch the matrix to a direct wire. + +/* :REMOVE ME + +&kscan_direct_comp { status = "okay"; }; +&kscan_direct { status = "okay"; }; +&kscan_matrix_comp { status = "disabled"; }; +&kscan_matrix { status = "disabled"; }; + +/ { + chosen { + zmk,matrix-transform = &direct_matrix_transform; + zmk,kscan = &kscan_direct_comp; + }; +}; + +REMOVE ME: */ + + +/ { + macros { + ZMK_MACRO(ble_zero, + wait-ms = <1>; + tap-ms = <1>; + bindings = <&out OUT_BLE &bt BT_SEL 0>; + ) + ZMK_MACRO(ble_one, + wait-ms = <1>; + tap-ms = <1>; + bindings = <&out OUT_BLE &bt BT_SEL 1>; + ) + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp A &bl BL_TOG + &rgb_ug RGB_EFF &bt BT_CLR + + &out OUT_USB &ble_zero &ble_one + >; + + sensor-bindings = <&inc_dec_kp A B>; + }; + }; +};