-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.c
98 lines (70 loc) · 2.07 KB
/
macros.c
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//
// Macros
//
// Change language and switch to a layer with letters
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case LTR_EN:
if (record->event.pressed) {
register_code16(LOPT(LSFT(LCTL(KC_KP_8))));
}
else {
unregister_code16(LOPT(LSFT(LCTL(KC_KP_8))));
layer_move(_LTR);
}
break;
case LTR_UA:
if (record->event.pressed) {
register_code16(LOPT(LSFT(LCTL(KC_KP_9))));
}
else {
unregister_code16(LOPT(LSFT(LCTL(KC_KP_9))));
layer_move(_LTR);
}
break;
// case LTR_CMD:
// if (record->event.pressed) {
// // Key pressed
// layer_move(_LTR);
// set_oneshot_mods(MOD_BIT(KC_LCMD));
// dprintf("tap count 0 \n");
// }
// else { }
// }
// else if {
// // Key released
// clear_oneshot_mods();
// clear_mods();
// layer_move(_CTR);
// }
// break;
// case LTR_OPT:
// if (record->event.pressed) {
// // register_code16(LOPT(LSFT(LCTL(KC_KP_9))));
// }
// else {
// // unregister_code16(LOPT(LSFT(LCTL(KC_KP_9))));
// layer_move(_LTR);
// }
// break;
// case LTR_SFT:
// if (record->event.pressed) {
// // register_code16(LOPT(LSFT(LCTL(KC_KP_9))));
// }
// else {
// // unregister_code16(LOPT(LSFT(LCTL(KC_KP_9))));
// layer_move(_LTR);
// }
// break;
// case LTR_CTL:
// if (record->event.pressed) {
// // register_code16(LOPT(LSFT(LCTL(KC_KP_9))));
// }
// else {
// // unregister_code16(LOPT(LSFT(LCTL(KC_KP_9))));
// layer_move(_LTR);
// }
// break;
}
return true;
};