From 253cf01029564dddb69edf3043d8af04792494ae Mon Sep 17 00:00:00 2001 From: urob Date: Sat, 11 Jun 2022 16:33:38 -0400 Subject: [PATCH] Proof of concept for userspace utf implementation --- config/base.keymap | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/config/base.keymap b/config/base.keymap index 28de5f5..181b8cf 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -63,7 +63,27 @@ TODO and ISSUES }; macros { - // + // testing unicode + #define OS_LEAD &kp RALT &kp U // OS specific sequence to initialize UTF code + #define OS_TRAIL &kp RET // OS specific sequence to terminate UTF code + + ae: ae { + wait-ms = <5>; + tap-ms = <5>; + compatible = "zmk,behavior-macro"; + label = "UTF_AE"; + #binding-cells = <0>; + bindings = ; + }; + + ae_cap: ae_cap { + wait-ms = <5>; + tap-ms = <5>; + compatible = "zmk,behavior-macro"; + label = "UTF_AE_CAP"; + #binding-cells = <0>; + bindings = ; + }; }; @@ -117,6 +137,15 @@ TODO and ISSUES bindings = <&sk LSHFT>, <&caps_word>, <&none>; }; + // utf ae + utf_ae: utf_ae { + compatible = "zmk,behavior-mod-morph"; + label = "UTF_AE"; + #binding-cells = <0>; + bindings = <&ae>, <&ae_cap>; + mods = <(MOD_LSFT|MOD_RSFT)>; + }; + }; keymap { @@ -125,7 +154,7 @@ TODO and ISSUES default_layer { bindings = < // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ - &kp Q &kp W &kp F &kp P &kp B EXTRA_MID &kp J &kp L &kp U &kp Y &kp SQT + &kp Q &kp W &kp F &kp P &kp B &kp RALT &utf_ae &kp J &kp L &kp U &kp Y &kp SQT // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ &hml LGUI A &hml LALT R &hml LCTRL S &hml LSHFT T &kp G EXTRA_MID &kp M &hmr LSHFT N &hmr LCTRL E &hmr LALT I &hmr LGUI O // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤