logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

keymap.c (2355B)


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