2022-09-09 22:09:53 +02:00
|
|
|
#include <behaviors.dtsi>
|
|
|
|
#include <dt-bindings/zmk/keys.h>
|
2022-09-11 00:03:06 +02:00
|
|
|
#include <dt-bindings/zmk/bt.h>
|
2022-09-09 22:09:53 +02:00
|
|
|
|
2022-09-18 20:05:19 +02:00
|
|
|
#define HOST_OS 1
|
2022-09-17 16:34:46 +02:00
|
|
|
#include "../../../../zmk-nodefree-config/helper.h"
|
2022-09-17 16:29:38 +02:00
|
|
|
|
2022-09-12 20:08:41 +02:00
|
|
|
|
2022-10-15 13:17:11 +02:00
|
|
|
ZMK_UNICODE_PAIR(lin_ae, N0, N0, E, N4, N0, N0, C, N4)
|
|
|
|
ZMK_UNICODE_PAIR(lin_ao, N0, N0, E, N5, N0, N0, C, N5)
|
|
|
|
ZMK_UNICODE_PAIR(lin_oe, N0, N0, F, N6, N0, N0, D, N6)
|
2022-10-19 11:45:15 +02:00
|
|
|
ZMK_UNICODE_PAIR(lin_euro, N2, N0, A, C, N0, N0, B, N0) // euro sign and degree symbol
|
2022-10-21 17:54:44 +02:00
|
|
|
ZMK_UNICODE_PAIR(lin_multi_o, A, N6, N6, E, F, F, F, D) // multiocular o
|
2022-09-19 22:03:42 +02:00
|
|
|
|
2022-10-21 17:54:44 +02:00
|
|
|
// switch to Windows-mode (using WinCompose)
|
2022-10-15 13:17:11 +02:00
|
|
|
#undef OS_UNICODE_LEAD
|
|
|
|
#undef OS_UNICODE_TRAIL
|
2022-10-21 17:54:44 +02:00
|
|
|
#define OS_UNICODE_LEAD ¯o_tap &kp RALT &kp U // WinCompose sequence
|
|
|
|
#define OS_UNICODE_TRAIL ¯o_tap &kp RET
|
2022-10-15 13:17:11 +02:00
|
|
|
|
|
|
|
ZMK_UNICODE_PAIR(win_ae, N0, N0, E, N4, N0, N0, C, N4)
|
|
|
|
ZMK_UNICODE_PAIR(win_ao, N0, N0, E, N5, N0, N0, C, N5)
|
|
|
|
ZMK_UNICODE_PAIR(win_oe, N0, N0, F, N6, N0, N0, D, N6)
|
2022-10-19 11:45:15 +02:00
|
|
|
ZMK_UNICODE_PAIR(win_euro, N2, N0, A, C, N0, N0, B, N0) // euro sign and degree symbol
|
2022-10-21 17:54:44 +02:00
|
|
|
ZMK_UNICODE_PAIR(win_multi_o, A, N6, N6, E, F, F, F, D) // multiocular o
|
2022-10-15 13:17:11 +02:00
|
|
|
|
2022-10-15 13:50:07 +02:00
|
|
|
|
2022-10-15 13:17:11 +02:00
|
|
|
#define BASE 0
|
|
|
|
#define SYM 1
|
|
|
|
#define NAV 2
|
|
|
|
#define META 3
|
|
|
|
#define TOKI 4
|
|
|
|
#define GAME 5
|
|
|
|
#define WINDOWS 6
|
|
|
|
#define WIN_UNI 7
|
|
|
|
|
2022-09-09 22:09:53 +02:00
|
|
|
/ {
|
2022-10-15 13:17:11 +02:00
|
|
|
conditional_layers {
|
|
|
|
compatible = "zmk,conditional-layers";
|
|
|
|
windows_unicode {
|
|
|
|
if-layers = <SYM WINDOWS>;
|
|
|
|
then-layer = <WIN_UNI>;
|
|
|
|
};
|
2022-10-20 10:33:23 +02:00
|
|
|
meta_layer {
|
|
|
|
if-layers = <SYM NAV>;
|
|
|
|
then-layer = <META>;
|
|
|
|
};
|
2022-10-15 13:17:11 +02:00
|
|
|
};
|
|
|
|
|
2022-12-27 16:35:03 +01:00
|
|
|
macros {
|
2022-12-28 00:01:24 +01:00
|
|
|
word_test1: word_test1 {
|
|
|
|
label = "Test1";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
wait-ms = <5>;
|
|
|
|
tap-ms = <5>;
|
|
|
|
bindings = <¯o_tap &kp T &kp O &kp K &kp I>;
|
|
|
|
};
|
|
|
|
word_test2: word_test2 {
|
|
|
|
label = "Test2";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
wait-ms = <5>;
|
|
|
|
tap-ms = <5>;
|
|
|
|
bindings = <¯o_tap &kp P &kp O &kp N &kp A>;
|
2022-12-27 16:35:03 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-12-27 22:47:39 +01:00
|
|
|
// home row key positions are 10 11 12 13 -- 16 17 18 19
|
2022-12-27 15:53:08 +01:00
|
|
|
combos {
|
|
|
|
compatible = "zmk,combos";
|
|
|
|
combo_toki_a {
|
2022-12-27 22:47:39 +01:00
|
|
|
key-positions = <10 11>;
|
2022-12-28 00:01:24 +01:00
|
|
|
bindings = <&word_test1>;
|
|
|
|
layers = <TOKI>;
|
|
|
|
};
|
|
|
|
combo_toki_b {
|
|
|
|
key-positions = <10 11 12>;
|
|
|
|
bindings = <&word_test2>;
|
2022-12-27 15:53:08 +01:00
|
|
|
layers = <TOKI>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-12-03 20:00:00 +01:00
|
|
|
behaviors {
|
2022-12-03 20:30:28 +01:00
|
|
|
esctab: shift_esc_tab {
|
|
|
|
compatible = "zmk,behavior-mod-morph";
|
2022-12-03 20:47:48 +01:00
|
|
|
label = "esc_tab";
|
2022-12-03 20:30:28 +01:00
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings = <&kp ESC>, <&kp TAB>;
|
|
|
|
mods = <(MOD_LSFT)>;
|
|
|
|
};
|
2022-12-03 20:09:14 +01:00
|
|
|
escape: fancy_esc_key {
|
|
|
|
// activate esc-tab macro if not holding ctrl, this allows ctrl-shift-esc but turns shift-esc into tab
|
|
|
|
compatible = "zmk,behavior-mod-morph";
|
|
|
|
label = "esc";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings = <&esctab>, <&kp ESC>;
|
2022-12-03 20:38:29 +01:00
|
|
|
mods = <(MOD_LCTL)>;
|
|
|
|
keep-mods = <(MOD_LCTL)>;
|
2022-12-03 20:09:14 +01:00
|
|
|
};
|
2022-12-08 20:33:13 +01:00
|
|
|
gqt: global-quick-tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
label = "GLOBAL_QUICK_TAP";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
2022-12-27 15:53:08 +01:00
|
|
|
tapping-term-ms = <400>;
|
|
|
|
quick-tap-ms = <250>;
|
2022-12-08 20:33:13 +01:00
|
|
|
global-quick-tap;
|
|
|
|
bindings = <&kp>, <&kp>;
|
|
|
|
};
|
2022-12-03 20:00:00 +01:00
|
|
|
};
|
|
|
|
|
2022-09-16 20:43:24 +02:00
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
2022-10-15 13:17:11 +02:00
|
|
|
l_base {
|
2022-09-16 20:43:24 +02:00
|
|
|
bindings = <
|
2022-12-08 19:51:46 +01:00
|
|
|
&escape &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp BACKSPACE
|
|
|
|
&kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O
|
|
|
|
&kp LCTRL &kp X &kp C &kp D &kp V &kp K &kp H &kp Z &kp Q &kp LALT
|
2022-12-08 20:33:13 +01:00
|
|
|
&gqt LALT SPACE &kp LSHIFT &kp LWIN &mo NAV &mo SYM &kp RET
|
2022-09-16 20:43:24 +02:00
|
|
|
>;
|
|
|
|
};
|
2022-09-16 22:36:29 +02:00
|
|
|
// numbers + symbols + non english letters
|
2022-10-15 13:17:11 +02:00
|
|
|
l_sym {
|
2022-09-16 20:43:24 +02:00
|
|
|
bindings = <
|
2022-10-21 17:54:44 +02:00
|
|
|
&kp TAB &kp GRAVE &kp LBKT &kp RBKT &lin_euro &lin_multi_o &lin_ao &lin_ae &lin_oe &kp DEL
|
|
|
|
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
|
|
|
|
&trans &kp SQT &kp SLASH &kp BSLH &kp EQUAL &kp MINUS &kp SEMI &kp COMMA &kp DOT &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
2022-09-16 22:36:29 +02:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
// F keys + navigation
|
2022-10-15 13:17:11 +02:00
|
|
|
l_nav {
|
2022-09-16 22:36:29 +02:00
|
|
|
bindings = <
|
2022-12-27 15:53:08 +01:00
|
|
|
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp PG_UP &kp HOME &kp UP &kp END &kp PSCRN
|
|
|
|
&kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp K_CMENU
|
|
|
|
&trans &kp F11 &kp F12 &kp F13 &kp F14 &kp F15 &kp F16 &kp F17 &kp F18 &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
2022-09-16 22:36:29 +02:00
|
|
|
>;
|
|
|
|
};
|
2022-11-05 13:33:15 +01:00
|
|
|
// media + bluetooth + layer toggles + numpad
|
2022-10-15 13:17:11 +02:00
|
|
|
l_meta {
|
2022-09-16 22:36:29 +02:00
|
|
|
bindings = <
|
2022-11-07 14:19:39 +01:00
|
|
|
&kp C_VOL_DN &kp C_VOL_UP &tog WINDOWS &tog GAME &tog TOKI &kp KP_MULTIPLY &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS
|
2022-11-05 13:33:15 +01:00
|
|
|
&kp C_PREV &kp C_NEXT &none &kp C_PLAY &none &kp KP_DIVIDE &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_N0
|
|
|
|
&trans &none &bt BT_SEL 0 &bt BT_NXT &bt BT_CLR &kp KP_DOT &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_MINUS
|
2022-12-08 19:51:46 +01:00
|
|
|
&trans &trans &trans &trans &trans &kp KP_ENTER
|
2022-09-16 20:43:24 +02:00
|
|
|
>;
|
|
|
|
};
|
2022-12-27 15:53:08 +01:00
|
|
|
// toki pona steno
|
2022-09-17 21:22:52 +02:00
|
|
|
l_toki {
|
|
|
|
bindings = <
|
2022-12-27 15:53:08 +01:00
|
|
|
&trans &none &none &none &none &tog TOKI &none &none &none &none
|
|
|
|
&kp A &kp A &kp A &kp A &none &none &kp A &kp A &kp A &kp A
|
|
|
|
&trans &none &none &none &none &none &none &none &none &trans
|
|
|
|
&kp SPACE &trans &trans &none &none &trans
|
2022-09-17 21:22:52 +02:00
|
|
|
>;
|
|
|
|
};
|
2022-09-25 17:12:25 +02:00
|
|
|
// game compatibility / half qwerty
|
|
|
|
l_game {
|
|
|
|
bindings = <
|
2022-10-15 13:17:11 +02:00
|
|
|
&kp ESC &kp Q &kp W &kp E &kp R &none &none &kp UP &none &kp BSPC
|
|
|
|
&kp LSHFT &kp A &kp S &kp D &kp F &none &kp LEFT &kp DOWN &kp RIGHT &none
|
|
|
|
&kp LCTRL &kp Z &kp X &kp C &kp V &none &none &none &none &none
|
2022-11-05 13:33:15 +01:00
|
|
|
&kp LALT &kp SPACE &tog GAME &tog GAME &none &kp RET
|
2022-10-15 13:17:11 +02:00
|
|
|
>;
|
|
|
|
};
|
2022-11-20 13:17:37 +01:00
|
|
|
// dummy layer for enabling windows unicode macros
|
2022-10-15 13:17:11 +02:00
|
|
|
l_windows {
|
|
|
|
bindings = <
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
|
|
|
>;
|
|
|
|
};
|
2022-12-27 15:53:08 +01:00
|
|
|
// unicode macros for symbol layer in windows mode
|
2022-10-15 13:17:11 +02:00
|
|
|
l_win_unicode {
|
|
|
|
bindings = <
|
2022-10-21 17:54:44 +02:00
|
|
|
&trans &trans &trans &trans &win_euro &win_multi_o &win_ao &win_ae &win_oe &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
2022-09-25 17:12:25 +02:00
|
|
|
>;
|
|
|
|
};
|
2022-09-16 20:43:24 +02:00
|
|
|
};
|
2022-09-16 22:36:29 +02:00
|
|
|
};
|