keymap.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* Copyright 2019 QMK Community
  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. #define _BL 0
  18. #define _FN 1
  19. // Defines the keycodes used by our macros in process_record_user.
  20. // Disabled as it isn't used in this keymap, but available for modification.
  21. // enum custom_keycodes {
  22. // QMKBEST = SAFE_RANGE,
  23. // QMKURL
  24. // };
  25. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  26. [_BL] = LAYOUT_numpad_5x4(
  27. /* Base Layer: Number Pad
  28. * ,---------------.
  29. * |FN | / | * | - |
  30. * |---+---+---|---|
  31. * | 7 | 8 | 9 | |
  32. * |---+---+---| + |
  33. * | 4 | 5 | 6 | |
  34. * |---+---+---|---|
  35. * | 1 | 2 | 3 | |
  36. * |---+---+---|Ent|
  37. * | 0 | . | |
  38. * `---------------'
  39. */
  40. MO(_FN), KC_PSLS, KC_PAST, KC_PMNS, \
  41. KC_P7, KC_P8, KC_P9, \
  42. KC_P4, KC_P5, KC_P6, KC_PPLS, \
  43. KC_P1, KC_P2, KC_P3, \
  44. KC_P0, KC_PDOT, KC_PENT
  45. ),
  46. /* Function Layer: RGB Controls and Numlock
  47. * ,---------------.
  48. * |FN |TOG|M+ |M- | Mode
  49. * |---+---+---|---|
  50. * | |H- |H+ | | Hue
  51. * |---+---+---| |
  52. * | |S- |S+ | | Saturation
  53. * |---+---+---|---|
  54. * | |B- |B+ |NUM| Brightness
  55. * |---+---+---| |
  56. * | | |LCK|
  57. * `---------------'
  58. */
  59. [_FN] = LAYOUT_numpad_5x4(
  60. KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, \
  61. KC_NO, RGB_HUD, RGB_HUI, \
  62. KC_NO, RGB_SAD, RGB_SAI, KC_NO, \
  63. KC_NO, RGB_VAD, RGB_VAI, \
  64. KC_NO, KC_NO, KC_NLCK
  65. ),
  66. };
  67. // Handles macros for keycodes defined above.
  68. // Disabled as it isn't used in this keymap, but available for modification.
  69. // bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  70. // switch (keycode) {
  71. // case QMKBEST:
  72. // if (record->event.pressed) {
  73. // // when keycode QMKBEST is pressed
  74. // SEND_STRING("QMK is the best thing ever!");
  75. // } else {
  76. // // when keycode QMKBEST is released
  77. // }
  78. // break;
  79. // case QMKURL:
  80. // if (record->event.pressed) {
  81. // // when keycode QMKURL is pressed
  82. // SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
  83. // } else {
  84. // // when keycode QMKURL is released
  85. // }
  86. // break;
  87. // }
  88. // return true;
  89. // }
  90. void matrix_init_user(void) {
  91. }
  92. void matrix_scan_user(void) {
  93. }
  94. void led_set_user(uint8_t usb_led) {
  95. }