|
1 | | -// clang-format off |
2 | 1 | #include "keycodes.h" |
3 | 2 | #include QMK_KEYBOARD_H |
4 | 3 | #include "raw_hid.h" |
5 | 4 | #include "keymap.h" |
| 5 | +#ifdef OLED_ENABLE |
| 6 | +# include "oled.c" |
| 7 | +#endif |
6 | 8 |
|
7 | 9 | // https://github.com/getreuer/qmk-modules/tree/main/custom_shift_keys |
8 | 10 | const custom_shift_key_t custom_shift_keys[] = { |
9 | | - {KC_2, KC_COMMA}, |
10 | | - {KC_3, KC_DOT}, |
11 | | - {KC_5, KC_LABK}, |
12 | | - {KC_6, KC_RABK}, |
13 | | - {KC_7, KC_LPRN}, |
14 | | - {KC_9, KC_RPRN}, |
| 11 | + {KC_2, KC_COMMA}, {KC_3, KC_DOT}, {KC_5, KC_LABK}, {KC_6, KC_RABK}, {KC_7, KC_LPRN}, {KC_9, KC_RPRN}, |
15 | 12 | }; |
16 | 13 |
|
17 | 14 | // Notifies the host of the layer change using raw HID |
18 | 15 | // https://docs.qmk.fm/features/rawhid#usage |
19 | 16 | // |
20 | 17 | #ifdef RAW_ENABLE |
21 | | - layer_state_t layer_state_set_user(layer_state_t state) { |
22 | | - uint8_t hi_layer = get_highest_layer(state); |
23 | | - #ifdef CONSOLE_ENABLE |
24 | | - #include "print.h" |
25 | | - uprintf("LAYER: Selected Layer: %d\n", hi_layer); |
26 | | - #endif |
27 | | - uint8_t response[RAW_EPSIZE]; |
28 | | - memset(response, 0x00, RAW_EPSIZE); |
29 | | - response[PAYLOAD_BEGIN] = PAYLOAD_MARK; |
30 | | - response[PAYLOAD_BEGIN + 1] = hi_layer; |
31 | | - raw_hid_send(response, RAW_EPSIZE); |
32 | | - return state; |
33 | | - } |
| 18 | +layer_state_t layer_state_set_user(layer_state_t state) { |
| 19 | + uint8_t hi_layer = get_highest_layer(state); |
| 20 | +# ifdef CONSOLE_ENABLE |
| 21 | +# include "print.h" |
| 22 | + uprintf("LAYER: Selected Layer: %d\n", hi_layer); |
| 23 | +# endif |
| 24 | + uint8_t response[RAW_EPSIZE]; |
| 25 | + memset(response, 0x00, RAW_EPSIZE); |
| 26 | + response[PAYLOAD_BEGIN] = PAYLOAD_MARK; |
| 27 | + response[PAYLOAD_BEGIN + 1] = hi_layer; |
| 28 | + raw_hid_send(response, RAW_EPSIZE); |
| 29 | + return state; |
| 30 | +} |
34 | 31 | #endif /* ifdef RAW_ENABLE */ |
35 | 32 |
|
36 | 33 | // Predictive tap hold: https://github.com/jgandert/qmk_modules/tree/main/predictive_tap_hold |
| 34 | +// clang-format off |
37 | 35 | const uint8_t pth_side_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = LAYOUT_split_3x6_3( |
38 | 36 | PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, |
39 | 37 | PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, |
40 | 38 | PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, |
41 | 39 | PTH_L, PTH_L, PTH_L, PTH_R, PTH_R, PTH_R |
42 | 40 | ); |
| 41 | +// clang-format on |
43 | 42 |
|
44 | 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
45 | | -[L_BASE]=LAYER(LAYER_BASE), |
46 | | -[L_MEDIA]=LAYER(LAYER_MEDIA), |
47 | | -[L_NAV]=LAYER(LAYER_NAV), |
48 | | -[L_NUM]=LAYER(LAYER_NUM), |
49 | | -[L_SYM]=LAYER(LAYER_SYM), |
50 | | -[L_FUN]=LAYER(LAYER_FUN), |
| 44 | + [L_BASE] = LAYER(LAYER_BASE), [L_MEDIA] = LAYER(LAYER_MEDIA), [L_NAV] = LAYER(LAYER_NAV), [L_NUM] = LAYER(LAYER_NUM), [L_SYM] = LAYER(LAYER_SYM), [L_FUN] = LAYER(LAYER_FUN), |
51 | 45 | }; |
52 | | - |
53 | | -#ifdef OLED_ENABLE |
54 | | - #include "oled.c" |
55 | | -#endif |
0 commit comments