summaryrefslogtreecommitdiff
path: root/config/utils
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2024-03-13 18:19:28 +0100
committerjakobst1n <jakob.stendahl@outlook.com>2024-03-13 18:19:28 +0100
commit6bf324125af9010ccd81a50738cf8dcb20f40365 (patch)
treed01c74767ad05814857e86b2fbd7eeb2816b88da /config/utils
parent05ae4f4cd561108e7fd8db405806a1bf1abb45da (diff)
downloadzmk-config-6bf324125af9010ccd81a50738cf8dcb20f40365.tar.gz
zmk-config-6bf324125af9010ccd81a50738cf8dcb20f40365.zip
Tweak
Diffstat (limited to 'config/utils')
-rw-r--r--config/utils/common.h57
-rw-r--r--config/utils/homerow.h22
-rw-r--r--config/utils/keypos_42keys.h62
-rw-r--r--config/utils/unicode.h85
4 files changed, 0 insertions, 226 deletions
diff --git a/config/utils/common.h b/config/utils/common.h
deleted file mode 100644
index 57ee0d0..0000000
--- a/config/utils/common.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#define ___ &trans
-#define XXX &none
-
-#ifndef QUICK_TAP_MS
- #define QUICK_TAP_MS 172
-#endif
-
-#define ZMK_HELPER_STRINGIFY(x) #x
-
-#define MO_TOG(layer) &mo_tog layer layer // Macro to apply momentary-layer-on-hold/toggle-layer-on-tap to a specific layer
-
-&sk { // sticky-key config
- release-after-ms = <900>; // release after 0.6s
- quick-release; // no double capitalization when rolling keys
-};
-
-&sl { // sticky-layer config
- ignore-modifiers; // allow chording sticky mods & layers
-};
-
-&lt { // layer-tap config
- flavor = "balanced";
- tapping-term-ms = <200>;
- quick-tap-ms = <QUICK_TAP_MS>;
-};
-
-
-// Some general behaviours that are slightly tweaked from the core
-/ {
- behaviours {
- kp_mo: behavior_kp_mo {
- compatible = "zmk,behavior-hold-tap";
- label = "kp_mo";
- #binding-cells = <2>;
- flavor = "tap-preferred";
- tapping-term-ms = <200>;
- quick-tap-ms = <200>;
- require-prior-idle-ms = <140>;
- bindings = <&mo>, <&kp>;
- };
- kp_mt: behavior_kp_mt {
- compatible = "zmk,behavior-hold-tap";
- label = "kp_mt";
- #binding-cells = <2>;
- flavor = "tap-preferred";
- tapping-term-ms = <QUICK_TAP_MS>;
- quick-tap-ms = <QUICK_TAP_MS>;
- //require-prior-idle-ms = <100>;
- bindings = <&kp>, <&kp>;
- };
- };
-};
-
-
-#include "homerow.h"
-#include "unicode.h"
-
diff --git a/config/utils/homerow.h b/config/utils/homerow.h
deleted file mode 100644
index c8fe06f..0000000
--- a/config/utils/homerow.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#pragma once
-
-#define MAKE_HRM(NAME, HOLD, TAP) \
- / { \
- behaviours { \
- NAME: NAME { \
- label = ZMK_HELPER_STRINGIFY(ZB_ ## NAME); \
- compatible = "zmk,behavior-hold-tap"; \
- #binding-cells = <2>; \
- flavor = "balanced"; \
- tapping-term-ms = <280>; \
- quick-tap-ms = <QUICK_TAP_MS>; \
- require-prior-idle-ms = <150>; \
- bindings = <HOLD>, <TAP>; \
- hold-trigger-on-release; \
- }; \
- }; \
- };
-
-MAKE_HRM(hml, &kp, &kp)
-MAKE_HRM(hmr, &kp, &kp)
-
diff --git a/config/utils/keypos_42keys.h b/config/utils/keypos_42keys.h
deleted file mode 100644
index 21f7052..0000000
--- a/config/utils/keypos_42keys.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// https://raw.githubusercontent.com/urob/zmk-nodefree-config/8506dbaaee9b46d200aa553a94b6dbca8560a5e1/keypos_def/keypos_42keys.h
-/* 42 KEY MATRIX / LAYOUT MAPPING
-
- ╭────────────────────────┬────────────────────────╮ ╭─────────────────────────┬─────────────────────────╮
- │ 0 1 2 3 4 5 │ 6 7 8 9 10 11 │ │ LT5 LT4 LT3 LT2 LT1 LT0 │ RT0 RT1 RT2 RT3 RT4 RT5 │
- │ 12 13 14 15 16 17 │ 18 19 20 21 22 23 │ │ LM5 LM4 LM3 LM2 LM1 LM0 │ RM0 RM1 RM2 RM3 RM4 RM5 │
- │ 24 25 26 27 28 29 │ 30 31 32 33 34 35 │ │ LB5 LB4 LB3 LB2 LB1 LB0 │ RB0 RB1 RB2 RB3 RB4 RB5 │
- ╰───────────╮ 36 37 38 │ 39 40 41 ╭───────────╯ ╰───────────╮ LH2 LH1 LH0 │ RH0 RH1 RH2 ╭───────────╯
- ╰────────────┴────────────╯ ╰─────────────┴─────────────╯ */
-
-#pragma once
-
-#define LT0 5 // left-top row
-#define LT1 4
-#define LT2 3
-#define LT3 2
-#define LT4 1
-#define LT5 0
-
-#define RT0 6 // right-top row
-#define RT1 7
-#define RT2 8
-#define RT3 9
-#define RT4 10
-#define RT5 11
-
-#define LM0 17 // left-middle row
-#define LM1 16
-#define LM2 15
-#define LM3 14
-#define LM4 13
-#define LM5 12
-
-#define RM0 18 // right-middle row
-#define RM1 19
-#define RM2 20
-#define RM3 21
-#define RM4 22
-#define RM5 23
-
-#define LB0 29 // left-bottom row
-#define LB1 28
-#define LB2 27
-#define LB3 26
-#define LB4 25
-#define LB5 24
-
-#define RB0 30 // right-bottom row
-#define RB1 31
-#define RB2 32
-#define RB3 33
-#define RB4 34
-#define RB5 35
-
-#define LH0 38 // left thumb keys
-#define LH1 37
-#define LH2 36
-
-#define RH0 39 // right thumb keys
-#define RH1 40
-#define RH2 41
-
diff --git a/config/utils/unicode.h b/config/utils/unicode.h
deleted file mode 100644
index df2b298..0000000
--- a/config/utils/unicode.h
+++ /dev/null
@@ -1,85 +0,0 @@
-#pragma once
-
-#define COMBO(name, POS, LAYERS, BINDINGS) \
- / { \
- combos { \
- compatible = "zmk,combos"; \
- name { \
- timeout-ms = <50>; \
- key-positions = <POS>; \
- layers = <LAYERS>; \
- bindings = <BINDINGS>; \
- }; \
- }; \
- };
-
-/* ZMK_UNICODE */
-#define UC_LEAD_MACWIN &macro_press &kp LALT // macOS/Windows-Alt-Codes
-#define UC_LEAD_LINUX &macro_tap &kp LS(LC(U)) // Linux
-#define UC_LEAD_WINDOWS &macro_tap &kp RALT &kp U // Windows + WinCompose (default)
-
-#define UC_TRAIL_MACWIN &macro_release &kp LALT // macOS/Windows-Alt-Codes
-#define UC_TRAIL_LINUX &macro_tap &kp SPACE // Linux
-#define UC_TRAIL_WINDOWS &macro_tap &kp RET // Windows + WinCompose (default)
-
-#define UC_MACRO_LINUX(name, unicode_bindings) \
- / { \
- macros { \
- name: name { \
- compatible = "zmk,behavior-macro"; \
- label = ZMK_HELPER_STRINGIFY(UC_MACRO_ ## name); \
- wait-ms = <0>; \
- tap-ms = <0>; \
- #binding-cells = <0>; \
- bindings = <UC_LEAD_LINUX>, <&macro_tap unicode_bindings>, <UC_TRAIL_LINUX>; \
- }; \
- }; \
- };
-#define UC_MACRO_MACWIN(name, unicode_bindings) \
- / { \
- macros { \
- name: name { \
- compatible = "zmk,behavior-macro"; \
- label = ZMK_HELPER_STRINGIFY(UC_MACRO_ ## name); \
- wait-ms = <0>; \
- tap-ms = <0>; \
- #binding-cells = <0>; \
- bindings = <UC_LEAD_MACWIN>, <&macro_tap unicode_bindings>, <UC_TRAIL_MACWIN>; \
- }; \
- }; \
- };
-
-#define UC_MODMORPH(name, uc_binding, shifted_uc_binding) \
- / { \
- behaviors { \
- name: name { \
- compatible = "zmk,behavior-mod-morph"; \
- label = ZMK_HELPER_STRINGIFY(UC_MORPH_ ## name); \
- #binding-cells = <0>; \
- bindings = <uc_binding>, <shifted_uc_binding>; \
- mods = <(MOD_LSFT|MOD_RSFT)>; \
- }; \
- }; \
- };
-
-#define ZMK_UNICODE_SINGLE(name, L0, L1, L2, L3) \
- UC_MACRO(name ## _lower, &kp L0 &kp L1 &kp L2 &kp L3) \
- UC_MODMORPH(name, &name ## _lower, &none)
-
-#define ZMK_UNICODE_PAIR_LINUX(name, L0, L1, L2, L3, U0, U1, U2, U3) \
- UC_MACRO_LINUX(name ## _lower, &kp L0 &kp L1 &kp L2 &kp L3) \
- UC_MACRO_LINUX(name ## _upper, &kp U0 &kp U1 &kp U2 &kp U3) \
- UC_MODMORPH(name, &name ## _lower, &name ## _upper)
-
-#define ZMK_UNICODE_PAIR_MACWIN(name, L0, L1, L2, L3, U0, U1, U2, U3) \
- UC_MACRO_MACWIN(name ## _lower, &kp L0 &kp L1 &kp L2 &kp L3) \
- UC_MACRO_MACWIN(name ## _upper, &kp U0 &kp U1 &kp U2 &kp U3) \
- UC_MODMORPH(name, &name ## _lower, &name ## _upper)
-
-ZMK_UNICODE_PAIR_MACWIN(mwn_no_ae, N0, N0, E, N6, N0, N0, C, N6)
-ZMK_UNICODE_PAIR_MACWIN(mwn_no_ao, N0, N0, E, N5, N0, N0, C, N5)
-ZMK_UNICODE_PAIR_MACWIN(mwn_no_oe, N0, N0, F, N8, N0, N0, D, N8)
-ZMK_UNICODE_PAIR_LINUX(lnx_no_ae, N0, N0, E, N6, N0, N0, C, N6)
-ZMK_UNICODE_PAIR_LINUX(lnx_no_ao, N0, N0, E, N5, N0, N0, C, N5)
-ZMK_UNICODE_PAIR_LINUX(lnx_no_oe, N0, N0, F, N8, N0, N0, D, N8)
-