Skip to content

Commit

Permalink
Remove method usage and usage of german aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlui committed May 1, 2024
1 parent b42e408 commit 1226770
Showing 1 changed file with 57 additions and 31 deletions.
88 changes: 57 additions & 31 deletions config/cradio.keymap
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2022 The ZMK Contributors
// SPDX-License-Identifier: MIT
#include "./german_aliases.h"
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
Expand All @@ -10,14 +9,6 @@
#define MOV 2
#define EXT 3

#define HO(key) &ht LALT key
#define HS(key) &ht LSHFT key
#define HG(key) &ht LGUI key
#define HC(key) &ht LCTL key
#define KP(key) &kp key
#define LAY(layername) &mo layername
#define ST(key) &sk key

#define COMBO(NAME, BINDINGS, KEYPOS) \
combo_##NAME { \
timeout-ms = <50>; \
Expand All @@ -29,12 +20,47 @@
/ {
combos {
compatible = "zmk,combos";
COMBO(at, &kp LA(DE_L), 15 0)
COMBO(ae, &kp DE_AE, 15 10)
COMBO(sz, &kp DE_SS, 15 12)
COMBO(ue, &kp DE_UE, 14 7)
COMBO(oe, &kp DE_OE, 14 19)
COMBO(eur, &kp DE_EURO, 14 17)
combo_at { \
timeout-ms = <50>; \
bindings = &kp LA(L); \
key-positions = 15 0; \
layers = <0>; \
};

combo_ae { \
timeout-ms = <50>; \
bindings = &kp SINGLE_QUOTE; \
key-positions = 15 10; \
layers = <0>; \
};

combo_sz { \
timeout-ms = <50>; \
bindings = &kp MINUS; \
key-positions = 15 12; \
layers = <0>; \
};

combo_ue { \
timeout-ms = <50>; \
bindings = &kp LEFT_BRACKET; \
key-positions = 14 7; \
layers = <0>; \
};

combo_oe { \
timeout-ms = <50>; \
bindings = &kp SEMICOLON; \
key-positions = 14 19; \
layers = <0>; \
};

combo_eur { \
timeout-ms = <50>; \
bindings = &kp RA(E); \
key-positions = 14 17; \
layers = <0>; \
};
};

behaviors {
Expand Down Expand Up @@ -63,37 +89,37 @@
compatible = "zmk,keymap";
default_layer {
bindings = <
KP(DE_Q) KP(DE_W) KP(DE_F) KP(DE_P) KP(DE_G) KP(DE_J) KP(DE_L) KP(DE_U) KP(DE_Y) KP(DE_QUES)
HC(DE_A) HO(DE_R) HS(DE_S) HG(DE_T) KP(DE_D) KP(DE_H) HG(DE_N) HS(DE_E) HO(DE_I) HC(DE_O)
KP(DE_Z) KP(DE_X) KP(DE_C) KP(DE_V) KP(DE_B) KP(DE_K) KP(DE_M) KP(DE_COMM) KP(DE_DOT) KP(DE_MINS)
KP(LSHFT) LAY(MOV) LAY(SYM) KP(SPACE)
&kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Z &kp LS(MINUS)
&ht LCTL A &ht LALT R &ht LSHFT S &ht LGUI T &kp D &kp H &ht LGUI N &ht LSHFT E &ht LALT I &ht LCTL O
&kp Y &kp X &kp C &kp V &kp B &kp K &kp M &kp COMMA &kp PERIOD &kp SLASH
&kp LSHFT &mo MOV &mo SYM &kp SPACE
>;
};

symbols {
bindings = <
KP(DE_ASTR) KP(DE_HASH) KP(DE_QUOT) KP(DE_DQUO) KP(DE_AMPR) KP(LA(N7)) KP(DE_EXLM) KP(DE_EQL) KP(DE_DLR) KP(DE_PLUS)
KP(N1) KP(N2) KP(N3) KP(N4) KP(N5) KP(N6) KP(N7) KP(N8) KP(N9) KP(N0)
KP(DE_LABK) KP(LA(N5)) KP(DE_LPRN) KP(DE_LBRC) KP(DE_SLSH) KP(LA(LS(N7))) KP(LA(N9)) KP(DE_RPRN) KP(LA(N6)) KP(DE_RABK)
KP(LSHFT) LAY(EXT) &trans &trans
&kp LS(RIGHT_BRACKET) &kp NON_US_HASH &kp LS(NON_US_HASH) &kp LS(NUMBER_2) &kp LS(NUMBER_6) &kp LA(N7) &kp LS(NUMBER_1) &kp LS(NUMBER_0) &kp LS(NUMBER_4) &kp RIGHT_BRACKET
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp NON_US_BACKSLASH &kp LA(N5) &kp LS(NUMBER_8) &kp RA(NUMBER_8) &kp LS(NUMBER_7) &kp LA(LS(N7)) &kp LA(N9) &kp LS(NUMBER_9) &kp LA(N6) &kp LS(NON_US_BACKSLASH)
&kp LSHFT &mo EXT &trans &trans
>;
};

movement {
bindings = <
KP(ESC) KP(LC(DE_W)) KP(LC(DE_F)) KP(LC(DE_P)) KP(LC(DE_T)) KP(DEL) KP(LC(LEFT)) KP(UP) KP(LC(RIGHT)) KP(PG_UP)
&sk LCTL &sk LALT &sk LSHFT &sk LGUI KP(LG(SPACE)) KP(BSPC) KP(LEFT) KP(DOWN) KP(RIGHT) KP(PG_DN)
KP(LG(DE_Z)) KP(LG(DE_X)) KP(LG(DE_C)) KP(LG(DE_V)) KP(LA(DE_V)) KP(LC(LA(DE_T))) KP(LC(LS(DE_T))) KP(LS(TAB)) KP(TAB) &trans
&trans &trans LAY(EXT) KP(RET)
&kp ESC &kp LC(W) &kp LC(F) &kp LC(P) &kp LC(T) &kp DEL &kp LC(LEFT) &kp UP &kp LC(RIGHT) &kp PG_UP
&sk LCTL &sk LALT &sk LSHFT &sk LGUI &kp LG(SPACE) &kp BSPC &kp LEFT &kp DOWN &kp RIGHT &kp PG_DN
&kp LG(Y) &kp LG(X) &kp LG(C) &kp LG(V) &kp LA(V) &kp LC(LA(T)) &kp LC(LS(T)) &kp LS(TAB) &kp TAB &trans
&trans &trans &mo EXT &kp RET
>;
};

extra {
bindings = <
KP(DE_CIRC) KP(DE_PERC) KP(DE_GRV) KP(LA(DE_N)) &trans &trans KP(F7) KP(F8) KP(F9) KP(F10)
KP(LCTL) KP(LALT) KP(LSHFT) KP(LGUI) KP(LGUI) &trans KP(F4) KP(F5) KP(F6) KP(F11)
&bt BT_CLR_ALL &trans &trans &trans &trans &trans KP(F1) KP(F2) KP(F3) KP(F12)
&trans &trans &trans &trans
&kp GRAVE &kp LS(NUMBER_5) &kp LS(EQUAL) &kp LA(N) &trans &trans &kp F7 &kp F8 &kp F9 &kp F10
&kp LCTL &kp LALT &kp LSHFT &kp LGUI &kp LGUI &trans &kp F4 &kp F5 &kp F6 &kp F11
&bt BT_CLR_ALL &trans &trans &trans &trans &trans &kp F1 &kp F2 &kp F3 &kp F12
&trans &trans &trans &trans
>;
};
};
Expand Down

0 comments on commit 1226770

Please sign in to comment.