diff options
Diffstat (limited to 'keyboards/xd002/keymaps/rgb/keymap.c')
| -rw-r--r-- | keyboards/xd002/keymaps/rgb/keymap.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/keyboards/xd002/keymaps/rgb/keymap.c b/keyboards/xd002/keymaps/rgb/keymap.c new file mode 100644 index 000000000..af0473413 --- /dev/null +++ b/keyboards/xd002/keymaps/rgb/keymap.c | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | // Defines the keycodes used by our macros in process_record_user | ||
| 4 | enum custom_keycodes { | ||
| 5 | QMKURL = SAFE_RANGE, | ||
| 6 | }; | ||
| 7 | |||
| 8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 9 | [0] = LAYOUT( | ||
| 10 | RGB_HUI, QMKURL | ||
| 11 | ) | ||
| 12 | }; | ||
| 13 | |||
| 14 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 15 | if (record->event.pressed) { | ||
| 16 | switch (keycode) { | ||
| 17 | case QMKURL: | ||
| 18 | // Using SEND_STRING here adds 400bytes ... | ||
| 19 | // SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); | ||
| 20 | tap_code(KC_H); | ||
| 21 | tap_code(KC_T); | ||
| 22 | tap_code(KC_T); | ||
| 23 | tap_code(KC_P); | ||
| 24 | tap_code(KC_S); | ||
| 25 | tap_code16(KC_COLON); | ||
| 26 | tap_code(KC_SLASH); | ||
| 27 | tap_code(KC_SLASH); | ||
| 28 | tap_code(KC_Q); | ||
| 29 | tap_code(KC_M); | ||
| 30 | tap_code(KC_K); | ||
| 31 | tap_code(KC_DOT); | ||
| 32 | tap_code(KC_F); | ||
| 33 | tap_code(KC_M); | ||
| 34 | tap_code(KC_SLASH); | ||
| 35 | tap_code(KC_ENTER); | ||
| 36 | break; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | return true; | ||
| 40 | } | ||
| 41 | |||
| 42 | void keyboard_post_init_user(void) { | ||
| 43 | rgblight_enable_noeeprom(); // enables Rgb, without saving settings | ||
| 44 | rgblight_sethsv_noeeprom(180, 255, 255); // sets the color to teal/cyan without saving | ||
| 45 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // sets mode to Fast breathing without saving | ||
| 46 | } | ||
