diff options
| author | Conor Burns <mail@conor-burns.com> | 2022-01-14 20:06:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-14 11:06:24 -0800 |
| commit | f8870a4c8a3f35e80b168fb8b302c6bf918269c7 (patch) | |
| tree | b9928d3695317170fb8895deb4867e7252c1f161 | |
| parent | ca0f922e073db9804ab0b55c62a43d81a957dce8 (diff) | |
| download | qmk_firmware-f8870a4c8a3f35e80b168fb8b302c6bf918269c7.tar.gz qmk_firmware-f8870a4c8a3f35e80b168fb8b302c6bf918269c7.zip | |
[Keymap] added keymap conor with rgb layers (#15234)
| -rw-r--r-- | keyboards/gray_studio/space65/keymaps/conor/config.h | 25 | ||||
| -rw-r--r-- | keyboards/gray_studio/space65/keymaps/conor/keymap.c | 93 | ||||
| -rw-r--r-- | keyboards/gray_studio/space65/keymaps/conor/rules.mk | 1 |
3 files changed, 119 insertions, 0 deletions
diff --git a/keyboards/gray_studio/space65/keymaps/conor/config.h b/keyboards/gray_studio/space65/keymaps/conor/config.h new file mode 100644 index 000000000..e32150b1a --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/conor/config.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* Copyright 2021 Conor Burns | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #define RGBLIGHT_LAYERS | ||
| 20 | #define GRAVE_ESC_GUI_OVERRIDE | ||
| 21 | #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_EFFECT_BREATHING + 2 | ||
| 22 | #define RGBLIGHT_DEFAULT_HUE 152 | ||
| 23 | #define RGBLIGHT_DEFAULT_SAT 232 | ||
| 24 | #define RGBLIGHT_DEFAULT_VAR 255 | ||
| 25 | #define RGBLIGHT_DEFAULT_SPD 2 \ No newline at end of file | ||
diff --git a/keyboards/gray_studio/space65/keymaps/conor/keymap.c b/keyboards/gray_studio/space65/keymaps/conor/keymap.c new file mode 100644 index 000000000..39bec338c --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/conor/keymap.c | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | /* Copyright 2021 Conor Burns | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | enum layer_names { | ||
| 19 | _HOME, | ||
| 20 | _FN2, | ||
| 21 | _FN3, | ||
| 22 | _FN4 | ||
| 23 | }; | ||
| 24 | |||
| 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 26 | [_HOME] = LAYOUT( | ||
| 27 | KC_GESC, 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_BSPC, KC_BSPC, KC_DEL, | ||
| 28 | 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_HOME, | ||
| 29 | 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_ENT, KC_PGUP, | ||
| 30 | KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | ||
| 31 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 32 | ), | ||
| 33 | [_FN2] = LAYOUT( | ||
| 34 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
| 35 | _______, _______, _______, _______, _______, _______, _______, RALT(KC_U), _______, RALT(KC_O), _______, _______, _______, _______, _______, | ||
| 36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 37 | _______, _______, RALT(KC_A), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 38 | _______, _______, _______, MO(2), _______, _______, _______, _______, _______, _______, _______ | ||
| 39 | ), | ||
| 40 | [_FN3] = LAYOUT( | ||
| 41 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 42 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 43 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 44 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 45 | _______, _______, _______, _______, _______, MO(3), _______, _______, _______, _______, _______ | ||
| 46 | ), | ||
| 47 | [_FN4] = LAYOUT( | ||
| 48 | RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 49 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 50 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 51 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 53 | ), | ||
| 54 | }; | ||
| 55 | |||
| 56 | // RGB LED Indicators | ||
| 57 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 58 | {0, 3, HSV_PURPLE} // Light 3 LEDs, starting with LED 0 | ||
| 59 | ); | ||
| 60 | const rgblight_segment_t PROGMEM my_2_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 61 | {3, 1, HSV_PURPLE} // Light 1 LED, starting with LED 3 | ||
| 62 | ); | ||
| 63 | const rgblight_segment_t PROGMEM my_3_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 64 | {4, 1, HSV_PURPLE} // Light 1 LED, starting with LED 4 | ||
| 65 | ); | ||
| 66 | const rgblight_segment_t PROGMEM my_4_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 67 | {5, 1, HSV_PURPLE} // Light 1 LED, starting with LED 5 | ||
| 68 | ); | ||
| 69 | |||
| 70 | // Now define the array of layers. Later layers take precedence | ||
| 71 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 72 | my_capslock_layer, // 0 | ||
| 73 | my_2_layer, // 1 | ||
| 74 | my_3_layer, // 2 | ||
| 75 | my_4_layer // 3 | ||
| 76 | ); | ||
| 77 | |||
| 78 | void keyboard_post_init_user(void) { | ||
| 79 | // Enable the LED layers | ||
| 80 | rgblight_layers = my_rgb_layers; | ||
| 81 | } | ||
| 82 | |||
| 83 | bool led_update_user(led_t led_state) { | ||
| 84 | rgblight_set_layer_state(0, led_state.caps_lock); | ||
| 85 | return true; | ||
| 86 | } | ||
| 87 | |||
| 88 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 89 | rgblight_set_layer_state(1, layer_state_cmp(state, _FN2)); | ||
| 90 | rgblight_set_layer_state(2, layer_state_cmp(state, _FN3)); | ||
| 91 | rgblight_set_layer_state(3, layer_state_cmp(state, _FN4)); | ||
| 92 | return state; | ||
| 93 | } \ No newline at end of file | ||
diff --git a/keyboards/gray_studio/space65/keymaps/conor/rules.mk b/keyboards/gray_studio/space65/keymaps/conor/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/conor/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
