keymap.c 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // This is the canonical layout file for the Quantum project. If you want to add another keyboard,
  2. // this is the style you want to emulate.
  3. #include QMK_KEYBOARD_H
  4. extern keymap_config_t keymap_config;
  5. // Each layer gets a name for readability, which is then used in the keymap matrix below.
  6. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
  7. // Layer names don't all need to be of the same length, obviously, and you can also skip them
  8. // entirely and just use numbers.
  9. #define _QWERTY 0
  10. #define _LOWER 1
  11. #define _RAISE 2
  12. #define _ADJUST 3
  13. #define LOWER MO(_LOWER)
  14. #define RAISE MO(_RAISE)
  15. /* Funct
  16. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  17. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | |
  18. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  19. * | caps | F11 | F12 | | | | | - | = | [ | ] | \ |
  20. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  21. * | | vol- | mute | vol+ | | | | _ | + | { | } | | |
  22. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  23. * | | prev | play | next | | | | | | | | |
  24. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  25. * | | | | | | | | | home | pgdn | pgup | end |
  26. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  27. */
  28. #define _FUNCT LAYOUT_ortho_5x12 (\
  29. _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\
  30. KC_CAPS, KC_F11, KC_F12, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\
  31. _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,\
  32. _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______,\
  33. _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\
  34. )
  35. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  36. /* Qwerty
  37. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  38. * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | bspc |
  39. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  40. * | ` | Q | W | E | R | T | Y | U | I | O | P | del |
  41. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  42. * | tab | A | S | D | F | G | H | J | K | L | ; | ' |
  43. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  44. * | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
  45. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  46. * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right |
  47. * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
  48. */
  49. [_QWERTY] = LAYOUT_ortho_5x12 (
  50. KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
  51. KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
  52. KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
  53. KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
  54. KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
  55. ),
  56. [_LOWER] = _FUNCT,
  57. [_RAISE] = _FUNCT,
  58. [_ADJUST] = LAYOUT_ortho_5x12 (
  59. _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
  60. _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
  61. _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
  62. _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
  63. _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
  64. ),
  65. };
  66. uint32_t layer_state_set_user(uint32_t state) {
  67. return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
  68. }
  69. void matrix_init_user(void) {
  70. }