keymap.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. RGB_RMOD, RGB_MOD,
  47. RGB_HUD, RGB_HUI,
  48. RGB_SAD, RGB_SAI,
  49. RGB_TOG, 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. };