1 /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp>
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.
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.
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/>.
16 #include QMK_KEYBOARD_H
18 // Defines the keycodes used by our macros in process_record_user
26 // Defines the keycodes used by our macros in process_record_user
27 enum custom_keycodes {
34 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
37 * ,----------------------------------------------------------------------------.
38 * | Q | W | E | R | T | Tab | Y | U | I | O | P |
39 * |------+------+------+------+------|------|------+------+------+------+------|
40 * | A | S | D | F | G | BkSp | H | J | K | L | ; |
41 * |------+------+------+------+------|------|------+------+------+------+------|
42 * | Z | X | C | V | B | Enter| N | M | , | . | / |
43 * `-------------+------+------+------|------|------+------+------+------+------'
44 * | GUI | LOWER|Ctrl/Esc|Space|Shift| RAISE| Alt |
45 * `------------------------------------------------'
48 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P,
49 KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
50 KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
51 KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, KC_LSFT, RAISE, KC_LALT
56 * ,----------------------------------------------------------------------------.
57 * | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
58 * |------+------+------+------+------|------|------+------+------+------+------|
59 * | Tab | _ | + | | | ~ | | : | " | > | { | } |
60 * |------+------+------+------+------|------|------+------+------+------+------|
61 * | Caps| - | = | \ | ` | | ; | ' | < | [ | ] |
62 * `-------------+------+------+------|------|------+------+------+------+------'
63 * | | LOWER| | | Esc | RAISE| |
64 * `------------------------------------------------'
67 KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
68 KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR,
69 KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC,
70 _______, _______, _______, _______, _______, _______, _______
75 * ,----------------------------------------------------------------------------.
76 * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
77 * |------+------+------+------+------|------|------+------+------+------+------|
78 * | Tab | | | |Enter | | Left | Down | Up | Right| Enter|
79 * |------+------+------+------+------|------|------+------+------+------+------|
80 * | Ctrl| | GUI | Alt | Del | | BkSp | PgUp | PgDn | | |
81 * `-------------+------+------+------|------|------+------+------+------+------'
82 * | | LOWER| | | | RAISE| |
83 * `------------------------------------------------'
86 KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0,
87 KC_TAB, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT,
88 KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, _______, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______,
89 _______, _______, _______, _______, _______, _______, _______
93 /* Adjust (Lower + Raise)
95 * ,----------------------------------------------------------------------------.
96 * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
97 * |------+------+------+------+------|------|------+------+------+------+------|
98 * | F11 | F12 | |RGBSAI|RGBSAD| |RGBVAI|RGBVAD| | | |
99 * |------+------+------+------+------|------|------+------+------+------+------|
100 * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| | Prev | Next | Vol- | Vol+ | Play |
101 * `-------------+------+------+------|------|------+------+------+------+------'
102 * | | LOWER| | | | RAISE| |
103 * `------------------------------------------------'
106 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
107 KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, _______, RGB_VAI, RGB_VAD, _______, _______, _______,
108 RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
109 _______, _______, _______, _______, _______, _______, _______
113 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
116 if (record->event.pressed) {
117 // persistant_default_layer_set(1UL<<_QWERTY);
118 set_single_persistent_default_layer(_QWERTY);
122 if (record->event.pressed) {
124 update_tri_layer(_LOWER, _RAISE, _ADJUST);
127 update_tri_layer(_LOWER, _RAISE, _ADJUST);
131 if (record->event.pressed) {
133 update_tri_layer(_LOWER, _RAISE, _ADJUST);
136 update_tri_layer(_LOWER, _RAISE, _ADJUST);
140 if (record->event.pressed) {
150 void matrix_init_user(void) {
154 void matrix_scan_user(void) {
158 void led_set_user(uint8_t usb_led) {