diff options
Diffstat (limited to 'keyboards/clueboard1/keymaps/default/keymap.c')
| -rw-r--r-- | keyboards/clueboard1/keymaps/default/keymap.c | 184 |
1 files changed, 0 insertions, 184 deletions
diff --git a/keyboards/clueboard1/keymaps/default/keymap.c b/keyboards/clueboard1/keymaps/default/keymap.c deleted file mode 100644 index 3f4f3c414..000000000 --- a/keyboards/clueboard1/keymaps/default/keymap.c +++ /dev/null | |||
| @@ -1,184 +0,0 @@ | |||
| 1 | #include "clueboard1.h" | ||
| 2 | |||
| 3 | #ifdef RGBLIGHT_ENABLE | ||
| 4 | #include "rgblight.h" | ||
| 5 | #endif | ||
| 6 | |||
| 7 | // Used for SHIFT_ESC | ||
| 8 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | ||
| 9 | |||
| 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. | ||
| 14 | #define _BL 0 | ||
| 15 | #define _FL 1 | ||
| 16 | #define _RS 2 | ||
| 17 | |||
| 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 | * `----------------------------------------------------------------------------------' | ||
| 31 | */ | ||
| 32 | [_BL] = KEYMAP( | ||
| 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), | ||
| 38 | |||
| 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 | * `----------------------------------------------------------------------------------' | ||
| 51 | */ | ||
| 52 | [_FL] = KEYMAP( | ||
| 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), | ||
| 58 | |||
| 59 | /* Keymap _RS: Reset layer | ||
| 60 | * ,--------------------------------------------------------------------------. ,----. | ||
| 61 | * | | | | | | | | | | | | | | | | | | | ||
| 62 | * |--------------------------------------------------------------------------| |----| | ||
| 63 | * | | | | |RESET| | | | | | | | | | | | | ||
| 64 | * |--------------------------------------------------------------------------| `----' | ||
| 65 | * | | | _RS| | | | | | | | | | | | | ||
| 66 | * |-----------------------------------------------------------------------------. | ||
| 67 | * | | | | | | | | | | | | | | | | | ||
| 68 | * |------------------------------------------------------------------------|----|----. | ||
| 69 | * | | | | | | | | | | _FL| | | | | ||
| 70 | * `----------------------------------------------------------------------------------' | ||
| 71 | */ | ||
| 72 | [_RS] = KEYMAP( | ||
| 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)), | ||
| 79 | #else | ||
| 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), | ||
| 85 | #endif | ||
| 86 | }; | ||
| 87 | |||
| 88 | enum function_id { | ||
| 89 | SHIFT_ESC, | ||
| 90 | #ifdef RGBLIGHT_ENABLE | ||
| 91 | RGBLED_TOGGLE, | ||
| 92 | RGBLED_STEP_MODE, | ||
| 93 | RGBLED_INCREASE_HUE, | ||
| 94 | RGBLED_DECREASE_HUE, | ||
| 95 | RGBLED_INCREASE_SAT, | ||
| 96 | RGBLED_DECREASE_SAT, | ||
| 97 | RGBLED_INCREASE_VAL, | ||
| 98 | RGBLED_DECREASE_VAL | ||
| 99 | #endif | ||
| 100 | }; | ||
| 101 | |||
| 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), | ||
| 113 | #endif | ||
| 114 | }; | ||
| 115 | |||
| 116 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 117 | static uint8_t shift_esc_shift_mask; | ||
| 118 | switch (id) { | ||
| 119 | case SHIFT_ESC: | ||
| 120 | shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; | ||
| 121 | if (record->event.pressed) { | ||
| 122 | if (shift_esc_shift_mask) { | ||
| 123 | add_key(KC_GRV); | ||
| 124 | send_keyboard_report(); | ||
| 125 | } else { | ||
| 126 | add_key(KC_ESC); | ||
| 127 | send_keyboard_report(); | ||
| 128 | } | ||
| 129 | } else { | ||
| 130 | if (shift_esc_shift_mask) { | ||
| 131 | del_key(KC_GRV); | ||
| 132 | send_keyboard_report(); | ||
| 133 | } else { | ||
| 134 | del_key(KC_ESC); | ||
| 135 | send_keyboard_report(); | ||
| 136 | } | ||
| 137 | } | ||
| 138 | break; | ||
| 139 | //led operations | ||
| 140 | #ifdef RGBLIGHT_ENABLE | ||
| 141 | case RGBLED_TOGGLE: | ||
| 142 | if (record->event.pressed) { | ||
| 143 | rgblight_toggle(); | ||
| 144 | } | ||
| 145 | |||
| 146 | break; | ||
| 147 | case RGBLED_INCREASE_HUE: | ||
| 148 | if (record->event.pressed) { | ||
| 149 | rgblight_increase_hue(); | ||
| 150 | } | ||
| 151 | break; | ||
| 152 | case RGBLED_DECREASE_HUE: | ||
| 153 | if (record->event.pressed) { | ||
| 154 | rgblight_decrease_hue(); | ||
| 155 | } | ||
| 156 | break; | ||
| 157 | case RGBLED_INCREASE_SAT: | ||
| 158 | if (record->event.pressed) { | ||
| 159 | rgblight_increase_sat(); | ||
| 160 | } | ||
| 161 | break; | ||
| 162 | case RGBLED_DECREASE_SAT: | ||
| 163 | if (record->event.pressed) { | ||
| 164 | rgblight_decrease_sat(); | ||
| 165 | } | ||
| 166 | break; | ||
| 167 | case RGBLED_INCREASE_VAL: | ||
| 168 | if (record->event.pressed) { | ||
| 169 | rgblight_increase_val(); | ||
| 170 | } | ||
| 171 | break; | ||
| 172 | case RGBLED_DECREASE_VAL: | ||
| 173 | if (record->event.pressed) { | ||
| 174 | rgblight_decrease_val(); | ||
| 175 | } | ||
| 176 | break; | ||
| 177 | case RGBLED_STEP_MODE: | ||
| 178 | if (record->event.pressed) { | ||
| 179 | rgblight_step(); | ||
| 180 | } | ||
| 181 | break; | ||
| 182 | #endif | ||
| 183 | } | ||
| 184 | } | ||
