keymap.c (2355B)
1 // Copyright 2024 splitkb.com (support@splitkb.com) 2 // SPDX-License-Identifier: GPL-2.0-or-later 3 4 #include QMK_KEYBOARD_H 5 6 enum layers { 7 _DEFAULT = 0, 8 }; 9 10 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 11 [_DEFAULT] = LAYOUT_myr( 12 KC_A, KC_E, KC_I, KC_M, KC_Q, KC_U, KC_9, KC_9, S(KC_U), S(KC_Q), S(KC_M), S(KC_I), S(KC_E), S(KC_A), 13 KC_B, KC_F, KC_J, KC_N, KC_R, KC_V, KC_8, KC_8, S(KC_V), S(KC_R), S(KC_N), S(KC_J), S(KC_F), S(KC_B), 14 KC_C, KC_G, KC_K, KC_O, KC_S, KC_W, KC_7, KC_7, S(KC_W), S(KC_S), S(KC_O), S(KC_K), S(KC_G), S(KC_C), 15 KC_D, KC_H, KC_L, KC_P, KC_T, KC_X, KC_5, KC_6, KC_6, KC_5, S(KC_X), S(KC_T), S(KC_P), S(KC_L), S(KC_H), S(KC_D), 16 KC_0, KC_1, KC_2, KC_3, KC_4, KC_4, KC_3, KC_2, KC_1, KC_0, 17 18 KC_A, KC_B, KC_C, KC_D, KC_E, KC_A, KC_B, KC_C, KC_D, KC_E 19 ), 20 }; 21 22 void keyboard_post_init_user(void) { 23 #ifdef RGBLIGHT_ENABLE 24 rgblight_enable_noeeprom(); // enables RGB, without saving settings 25 rgblight_sethsv_noeeprom(HSV_RED); // sets the color to red without saving 26 rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving 27 #endif 28 } 29 30 #ifdef ENCODER_ENABLE 31 bool encoder_update_user(uint8_t index, bool clockwise) { 32 // 0-3 left-half encoders 33 // 4-7 are right-half encoders 34 if (index == 0) { 35 tap_code(KC_0); 36 } else if (index == 1) { 37 tap_code(KC_1); 38 } else if (index == 2) { 39 tap_code(KC_2); 40 } else if (index == 3) { 41 // Myriad 42 tap_code(KC_3); 43 } else if (index == 4) { 44 tap_code(KC_4); 45 } else if (index == 5) { 46 tap_code(KC_5); 47 } else if (index == 6) { 48 tap_code(KC_6); 49 } else if (index == 7) { 50 // Myriad 51 tap_code(KC_7); 52 } 53 54 if (clockwise) { 55 tap_code16(KC_PLUS); 56 } else { 57 tap_code(KC_MINUS); 58 } 59 60 return false; 61 } 62 #endif 63 64 #ifdef OLED_ENABLE 65 bool oled_task_user(void) { 66 // A 128x32 OLED rotated 90 degrees is 5 characters wide and 16 characters tall 67 // This example string should fill that neatly 68 oled_write_P(PSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%^&*()[]{}-=_+?"), is_keyboard_master()); 69 return false; 70 } 71 #endif