Refactor into general and planck-specific config

This commit is contained in:
urob 2022-06-10 15:35:24 -04:00 committed by urob
parent 6ffa1a817d
commit 672f78c3f8
3 changed files with 254 additions and 227 deletions

View file

@ -1,14 +1,18 @@
/* KEY POSITIONS
╭────────────────────╮ ╭────────╮ ╭────────────────────╮
0 1 2 3 4 │ │ 5 6 │ │ 7 8 9 10 11
12 13 14 15 16 │ │ 17 18 │ │ 19 20 21 22 23
24 25 26 27 28 │ │ 29 30 │ │ 31 32 33 34 35
│ 36 37 38 39 40 │ │ 41 42 │ │ 43 44 45 46 47 │
╰────────────────────╯ ╰────────╯ ╰────────────────────╯ */
╭────────────────────╮ ╭─────────────────────╮
LT0 LT1 LT2 LT3 LT4 │ │ RT0 RT1 RT2 RT3 RT4
LM0 LM1 LM2 LM3 LM4 │ │ RM0 RM1 RM2 RM3 RM4
LB0 LB1 LB2 LB3 LB4 │ │ RB0 RB1 RB2 RB3 RB4
╰───────╮ LH0 LH1 LH2 │ │ RH0 RH1 RH2 ╭───────╯
─────────────╯ ╰─────────────╯ */
compatible = "zmk,combos";
// must be same to avoid #986, possibly related to #905
#define COMBO_TERM_H 30
#define COMBO_TERM_V 30
#define COMBO(NAME, BINDINGS, KEYPOS, LAYERS, TERM) \
combo_##NAME { \
timeout-ms = <TERM>; \
@ -17,42 +21,6 @@ compatible = "zmk,combos";
layers = <LAYERS>; \
};
#define COMBO_TERM_H 30
#define COMBO_TERM_V 30
#define LT0 0
#define LT1 1
#define LT2 2
#define LT3 3
#define LT4 4
#define RT0 7
#define RT1 8
#define RT2 9
#define RT3 10
#define RT4 11
#define LM0 12
#define LM1 13
#define LM2 14
#define LM3 15
#define LM4 16
#define RM0 19
#define RM1 20
#define RM2 21
#define RM3 22
#define RM4 23
#define LB0 24
#define LB1 25
#define LB2 26
#define LB3 27
#define LB4 28
#define RB0 31
#define RB1 32
#define RB2 33
#define RB3 34
#define RB4 35
/* Capsword */
COMBO(cpwrd, &caps_word, LM3 RM1, DEF NUM, COMBO_TERM_H)