Closed arilebedey closed 7 months ago
The snippet you gave should be correct. Running
#define HOST_OS 1 // Linux
#include "../zmk-nodefree-config/helper.h"
#include "../zmk-nodefree-config/international_chars/greek.dtsi"
through the preprocessor, yields:
/ { macros { el_sigma_lower: el_sigma_lower { compatible = "zmk,behavior-macro"; label = "UC_MACRO_el_sigma_lower"; wait-ms = <0>; tap-ms = <0>; #binding-cells = <0>; bindings = <¯o_tap &kp LS(LC(U))>, <¯o_tap &kp N0 &kp N3 &kp C &kp N3>, <¯o_tap &kp SPACE>; }; }; }; / { macros { el_sigma_upper: el_sigma_upper { compatible = "zmk,behavior-macro"; label = "UC_MACRO_el_sigma_upper"; wait-ms = <0>; tap-ms = <0>; #binding-cells = <0>; bindings = <¯o_tap &kp LS(LC(U))>, <¯o_tap &kp N0 &kp N3 &kp A &kp N3>, <¯o_tap &kp SPACE>; }; }; }; / { behaviors { el_sigma: el_sigma { compatible = "zmk,behavior-mod-morph"; label = "UC_MORPH_el_sigma"; #binding-cells = <0>; bindings = <&el_sigma_lower>, <&el_sigma_upper>; mods = <(MOD_LSFT|MOD_RSFT)>; }; }; };
// ...
That is, each macro binding expands to something like this:
<¯o_tap &kp LS(LC(U))>, <¯o_tap &kp N0 &kp N3 &kp C &kp N3>, <¯o_tap &kp SPACE>;
Some common issues worth double-checking:
HOST_OS
is indeed defined prior to sourcing helpers.h
as in the snippet aboveBingo! Thank you for your help.
Working from this repo (https://github.com/urob/zmk-config) and trying to use unicode pair functions through my Glove80, I followed the instructions and set the correct OS in
base.keymap
as such:But upon pressing one of the keys with the greek letters, this is what gets inputted by my keyboard (as recorded by xev):
This looks like the correct way to input unicode using Alt-codes, so perhaps the OS setting isn't being read?