logo

qmk_firmware

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

keymap.c (1757B)


  1. // Below layout is based upon /u/That-Canadian's planck layout
  2. #include QMK_KEYBOARD_H
  3. extern keymap_config_t keymap_config;
  4. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  5. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  6. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  7. // entirely and just use numbers.
  8. enum layer_names {
  9. _QWERTY,
  10. _RGB,
  11. _FUNC
  12. };
  13. // Defines for task manager and such
  14. #define CALTDEL LCTL(LALT(KC_DEL))
  15. #define TSKMGR LCTL(LSFT(KC_ESC))
  16. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  17. /* Qwerty
  18. * ,-------------.
  19. * | 1 | 2 |
  20. * |------+------|
  21. * | 3 | 4 |
  22. * |------+------|
  23. * | 5 | 6 |
  24. * |------+------|
  25. * | FUNC | RGB |
  26. * `-------------'
  27. */
  28. [_QWERTY] = LAYOUT(
  29. KC_1, KC_2,
  30. KC_3, KC_4,
  31. KC_5, KC_6,
  32. MO(_FUNC), TG(_RGB)
  33. ),
  34. /* RGB
  35. * ,-------------.
  36. * | Mode-| Mode+|
  37. * |------+------|
  38. * | HUE- | HUE+ |
  39. * |------+------|
  40. * | SAT- | SAT+ |
  41. * |------+------|
  42. * |RGBTOG| |
  43. * `-------------'
  44. */
  45. [_RGB] = LAYOUT(
  46. UG_PREV, UG_NEXT,
  47. UG_HUED, UG_HUEU,
  48. UG_SATD, UG_SATU,
  49. UG_TOGG, KC_TRNS
  50. ),
  51. /* Function
  52. * ,-------------.
  53. * | Q |CALDEL|
  54. * |------+------|
  55. * | A |TSKMGR|
  56. * |------+------|
  57. * | Z | X |
  58. * |------+------|
  59. * | | C |
  60. * `-------------'
  61. */
  62. [_FUNC] = LAYOUT(
  63. KC_Q, CALTDEL,
  64. KC_A, TSKMGR,
  65. KC_Z, KC_X,
  66. _______, KC_C
  67. )
  68. };