2 #include "action_layer.h"
5 extern keymap_config_t keymap_config;
12 enum custom_keycodes {
20 #define _______ KC_TRNS
22 #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
23 #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
24 #define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
25 #define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
26 #define KC_ESCC MT(MOD_LCTL, KC_ESC)
30 #define KC_BL_S BL_STEP
31 #define KC_ENTS MT(MOD_LSFT, KC_ENT)
33 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35 [_QWERTY] = KC_KEYMAP(
36 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
37 GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
38 //|----+----+----+----+----+----| |----+----+----+----+----+----|
39 TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT,
40 //|----+----+----+----+----+----| |----+----+----+----+----+----|
41 ESCC, A , S , D , F , G , H , J , K , L ,SCLN,ENTS,
42 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
43 LSFT, Z , X , C , V , B ,SPC , LCTL, N , M ,COMM,DOT ,SLSH,ENTS,
44 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
45 LGUI,LOWR,SPC , BSPC,RASE,LALT
46 // `----+----+----' `----+----+----'
50 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
51 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
52 //|----+----+----+----+----+----| |----+----+----+----+----+----|
53 RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
54 //|----+----+----+----+----+----| |----+----+----+----+----+----|
55 DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
56 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
57 BL_S,CPYP, , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
58 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
60 // `----+----+----' `----+----+----'
64 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
65 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
66 //|----+----+----+----+----+----| |----+----+----+----+----+----|
67 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
68 //|----+----+----+----+----+----| |----+----+----+----+----+----|
69 DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
70 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
71 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
72 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
74 // `----+----+----' `----+----+----'
78 //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
79 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
80 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
81 RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
82 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
83 RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
84 //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
85 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
86 //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
87 _______, _______, _______, _______, _______, _______
88 // `--------+--------+--------' `--------+--------+--------'
94 float tone_qwerty[][2] = SONG(QWERTY_SOUND);
97 void persistent_default_layer_set(uint16_t default_layer) {
98 eeconfig_update_default_layer(default_layer);
99 default_layer_set(default_layer);
102 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
105 if (record->event.pressed) {
107 PLAY_SONG(tone_qwerty);
109 persistent_default_layer_set(1UL<<_QWERTY);
114 if (record->event.pressed) {
116 update_tri_layer(_LOWER, _RAISE, _ADJUST);
119 update_tri_layer(_LOWER, _RAISE, _ADJUST);
124 if (record->event.pressed) {
126 update_tri_layer(_LOWER, _RAISE, _ADJUST);
129 update_tri_layer(_LOWER, _RAISE, _ADJUST);
134 if (record->event.pressed) {