logo

qmk_firmware

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

keymap.c (2953B)


  1. /* Copyright 2021 Kyle McCreery
  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. // Defines names for use in layer keycodes and the keymap
  18. enum layer_names {
  19. _BASE,
  20. _FN1,
  21. _FN2,
  22. _FN3
  23. };
  24. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  25. /* Base */
  26. [_BASE] = LAYOUT(
  27. KC_F1, KC_F2, KC_F3, KC_F4,
  28. KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
  29. KC_P7, KC_P8, KC_P9, KC_PPLS,
  30. KC_MUTE, KC_P4, KC_P5, KC_P6, _______,
  31. MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT,
  32. KC_BSPC, KC_P0, _______, KC_PDOT, _______,
  33. KC_F5, KC_F6, KC_F7
  34. ),
  35. [_FN1] = LAYOUT(
  36. _______, _______, _______, _______,
  37. _______, _______, _______, _______,
  38. UG_HUED, UG_SPDU, UG_HUEU, _______,
  39. _______, UG_PREV, UG_TOGG, UG_NEXT, _______,
  40. _______, UG_VALD, UG_SPDD, UG_VALU, _______,
  41. _______, UG_SATD, _______, UG_SATU, _______,
  42. _______, _______, _______
  43. ),
  44. [_FN2] = LAYOUT(
  45. _______, _______, _______, _______,
  46. _______, _______, _______, _______,
  47. _______, _______, _______, _______,
  48. _______, _______, _______, _______, _______,
  49. _______, _______, _______, _______, _______,
  50. _______, _______, _______, _______, _______,
  51. _______, _______, _______
  52. ),
  53. [_FN3] = LAYOUT(
  54. _______, _______, _______, _______,
  55. _______, _______, _______, _______,
  56. _______, _______, _______, _______,
  57. _______, _______, _______, _______, _______,
  58. _______, _______, _______, _______, _______,
  59. _______, _______, _______, _______, _______,
  60. _______, _______, _______
  61. )
  62. };
  63. #ifdef ENCODER_MAP_ENABLE
  64. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
  65. [_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_BRID, KC_BRIU) },
  66. [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
  67. [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
  68. [_FN3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
  69. };
  70. #endif