1 #include "clueboard2.h"
8 #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
10 // Each layer gets a name for readability, which is then used in the keymap matrix below.
11 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
12 // Layer names don't all need to be of the same length, obviously, and you can also skip them
13 // entirely and just use numbers.
18 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 /* Keymap _BL: (Base Layer) Default Layer
20 * ,--------------------------------------------------------------------------. ,----.
21 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP|
22 * |--------------------------------------------------------------------------| |----|
23 * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN|
24 * |--------------------------------------------------------------------------| `----'
25 * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent|
26 * |-----------------------------------------------------------------------------.
27 * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP|
28 * |------------------------------------------------------------------------|----|----.
29 * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
30 * `----------------------------------------------------------------------------------'
33 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
34 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
35 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
36 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
37 KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
39 /* Keymap _FL: Function Layer
40 * ,--------------------------------------------------------------------------. ,----.
41 * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
42 * |--------------------------------------------------------------------------| |----|
43 * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
44 * |--------------------------------------------------------------------------| `----'
45 * | | | _RS| | | | | | | | | | | |
46 * |-----------------------------------------------------------------------------.
47 * | | | | | | | | | | | | | | |PGUP|
48 * |------------------------------------------------------------------------|----|----.
49 * | | | | | | | | | | _FL|HOME|PGDN| END|
50 * `----------------------------------------------------------------------------------'
53 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, BL_STEP, \
54 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
55 KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
56 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \
57 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END),
59 /* Keymap _RS: Reset layer
60 * ,--------------------------------------------------------------------------. ,----.
61 * | | | | | | | | | | | | | | | | | |
62 * |--------------------------------------------------------------------------| |----|
63 * | | | | |RESET| | | | | | | | | | | |
64 * |--------------------------------------------------------------------------| `----'
65 * | | | _RS| | | | | | | | | | | |
66 * |-----------------------------------------------------------------------------.
67 * | | | | | | | | | | | | | | | |
68 * |------------------------------------------------------------------------|----|----.
69 * | | | | | | | | | | _FL| | | |
70 * `----------------------------------------------------------------------------------'
73 #ifdef RGBLIGHT_ENABLE
74 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(1), F(7), \
75 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(8), \
76 KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
77 MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(5), \
78 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(2), F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(4), F(6), F(3)),
80 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
81 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
82 KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
83 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
84 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS),
90 #ifdef RGBLIGHT_ENABLE
102 const uint16_t PROGMEM fn_actions[] = {
103 [0] = ACTION_FUNCTION(SHIFT_ESC),
104 #ifdef RGBLIGHT_ENABLE
105 [1] = ACTION_FUNCTION(RGBLED_TOGGLE),
106 [2] = ACTION_FUNCTION(RGBLED_STEP_MODE),
107 [3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
108 [4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
109 [5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
110 [6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
111 [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
112 [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
116 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
117 static uint8_t shift_esc_shift_mask;
120 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
121 if (record->event.pressed) {
122 if (shift_esc_shift_mask) {
124 send_keyboard_report();
127 send_keyboard_report();
130 if (shift_esc_shift_mask) {
132 send_keyboard_report();
135 send_keyboard_report();
140 #ifdef RGBLIGHT_ENABLE
142 if (record->event.pressed) {
146 case RGBLED_INCREASE_HUE:
147 if (record->event.pressed) {
148 rgblight_increase_hue();
151 case RGBLED_DECREASE_HUE:
152 if (record->event.pressed) {
153 rgblight_decrease_hue();
156 case RGBLED_INCREASE_SAT:
157 if (record->event.pressed) {
158 rgblight_increase_sat();
161 case RGBLED_DECREASE_SAT:
162 if (record->event.pressed) {
163 rgblight_decrease_sat();
166 case RGBLED_INCREASE_VAL:
167 if (record->event.pressed) {
168 rgblight_increase_val();
171 case RGBLED_DECREASE_VAL:
172 if (record->event.pressed) {
173 rgblight_decrease_val();
176 case RGBLED_STEP_MODE:
177 if (record->event.pressed) {