summaryrefslogtreecommitdiff
path: root/users/klackygears/klackygears.c
blob: 2e7533eb160c13e4118ca05255c56714145e6884 (plain)
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
#include "klackygears.h"

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    /*
     if (!process_record_dynamic_macro(keycode, record)) {
            return false;
        }
    */
    switch (keycode) {
        case KC_MACBASE:
            if (record->event.pressed) {
                set_single_persistent_default_layer(_MACBASE);
            }
            break;

        case KC_QWERTY:
            if (record->event.pressed) {
                set_single_persistent_default_layer(_QWERTY);
            }
            break;

        case KC_WINBASE:
            if (record->event.pressed) {
                set_single_persistent_default_layer(_WINBASE);
            }
            break;

        case KC_GAMER:
            if (record->event.pressed) {
                set_single_persistent_default_layer(_GAMER);
            }
            break;

        case KC_GAMR1:
            if (record->event.pressed) {
                set_single_persistent_default_layer(_GAMR1);
            }
            break;

        case KC_GAMR2:
            if (record->event.pressed) {
                set_single_persistent_default_layer(_GAMR2);
            }
            break;
        case RGBRST:
#ifdef RGBLIGHT_ENABLE
            if (record->event.pressed) {
                eeconfig_update_rgblight_default();
                rgblight_enable();
            }
#endif
            break;

        case MAKEK:
            if (record->event.pressed) {
                SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
            }
            break;

        case MAKEKF:
            if (!record->event.pressed) {
                SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":flash");
            }

            break;

        case SHRUG:
            if (record->event.pressed) {
                SEND_STRING(":Shrug:");
            }
            break;
    }

    return true;
}