diff options
Diffstat (limited to 'keyboards/terrazzo/keymaps/ortho_all/keymap.c')
| -rw-r--r-- | keyboards/terrazzo/keymaps/ortho_all/keymap.c | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/keyboards/terrazzo/keymaps/ortho_all/keymap.c b/keyboards/terrazzo/keymaps/ortho_all/keymap.c new file mode 100644 index 000000000..ba33c15fb --- /dev/null +++ b/keyboards/terrazzo/keymaps/ortho_all/keymap.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* Copyright 2020 ademey "MsMustard" | ||
| 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 | |||
| 17 | /* Ortho layout with all 1u | ||
| 18 | * make terrazzo:othro_all | ||
| 19 | */ | ||
| 20 | #include QMK_KEYBOARD_H | ||
| 21 | |||
| 22 | enum layers { | ||
| 23 | _QWERTY, | ||
| 24 | _RAISE, | ||
| 25 | _LOWER, | ||
| 26 | _NAV, | ||
| 27 | _FN | ||
| 28 | }; | ||
| 29 | |||
| 30 | #define LOWERSP LT(_LOWER, KC_SPC) | ||
| 31 | #define RAISESP LT(_RAISE, KC_SPC) | ||
| 32 | #define SFTSLSH MT(MOD_RSFT, KC_SLSH) | ||
| 33 | |||
| 34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 35 | |||
| 36 | [_QWERTY] = LAYOUT_ortho_all( | ||
| 37 | KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 38 | TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
| 39 | TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 40 | TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), MO(_NAV), MO(_FN), KC_DEL | ||
| 41 | ), | ||
| 42 | |||
| 43 | [_RAISE] = LAYOUT_ortho_all( | ||
| 44 | _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, | ||
| 45 | _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______, | ||
| 46 | _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______, | ||
| 47 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 48 | ), | ||
| 49 | |||
| 50 | [_LOWER] = LAYOUT_ortho_all( | ||
| 51 | _______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | ||
| 52 | _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______, | ||
| 53 | _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______, | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 55 | ), | ||
| 56 | |||
| 57 | [_NAV] = LAYOUT_ortho_all( | ||
| 58 | _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, | ||
| 59 | _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,_______, | ||
| 60 | _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, | ||
| 61 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 62 | ), | ||
| 63 | |||
| 64 | [_FN] = LAYOUT_ortho_all( | ||
| 65 | _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, | ||
| 66 | _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______, | ||
| 67 | _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG, | ||
| 68 | _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 69 | ) | ||
| 70 | }; | ||
| 71 | |||
| 72 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 73 | terrazzo_scroll_pixel(clockwise); | ||
| 74 | switch(get_highest_layer(layer_state)) { | ||
| 75 | case _NAV: | ||
| 76 | /* Change volume when on nav layer */ | ||
| 77 | clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); | ||
| 78 | break; | ||
| 79 | default: | ||
| 80 | /* Default encoder behavior of Page Up and Down */ | ||
| 81 | clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); | ||
| 82 | break; | ||
| 83 | } | ||
| 84 | } \ No newline at end of file | ||
