diff options
| author | Brian Marsh <pezhore@gmail.com> | 2021-02-12 14:51:23 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 15:51:23 -0500 |
| commit | 519032c61b462a5f96f741bebd8f505c12e92d3a (patch) | |
| tree | 47a9437246c9c329e209eb37652d2f29055923b9 | |
| parent | bedb72b0bc30db906b436e2fc820a4a6559a7520 (diff) | |
| download | qmk_firmware-519032c61b462a5f96f741bebd8f505c12e92d3a.tar.gz qmk_firmware-519032c61b462a5f96f741bebd8f505c12e92d3a.zip | |
Adding custom keymap for Quark keyboard (#11744)
* adding pezhore keymap
* Adding sarcasm/irony mark, unicode emoji
* removing numpad layer enum
Co-authored-by: Brian Marsh <brian.marsh@rangelabs.io>
| -rw-r--r-- | keyboards/quark/keymaps/pezhore/config.h | 19 | ||||
| -rw-r--r-- | keyboards/quark/keymaps/pezhore/keymap.c | 195 |
2 files changed, 214 insertions, 0 deletions
diff --git a/keyboards/quark/keymaps/pezhore/config.h b/keyboards/quark/keymaps/pezhore/config.h new file mode 100644 index 000000000..824bad44a --- /dev/null +++ b/keyboards/quark/keymaps/pezhore/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2020 Nathan Spears | ||
| 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 | #pragma once | ||
| 18 | #define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WINC | ||
| 19 | #define TAPPING_TOGGLE 2 | ||
diff --git a/keyboards/quark/keymaps/pezhore/keymap.c b/keyboards/quark/keymaps/pezhore/keymap.c new file mode 100644 index 000000000..194fb7cfc --- /dev/null +++ b/keyboards/quark/keymaps/pezhore/keymap.c | |||
| @@ -0,0 +1,195 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | enum ortho_4x12_layers { | ||
| 20 | _QWERTY, | ||
| 21 | _FN, | ||
| 22 | _LOWER, | ||
| 23 | _RAISE, | ||
| 24 | _ADJUST | ||
| 25 | }; | ||
| 26 | |||
| 27 | enum ortho_4x12_keycodes { | ||
| 28 | LOWER = SAFE_RANGE, | ||
| 29 | RAISE, | ||
| 30 | SHRUG, // ¯\_(ツ)_/¯ | ||
| 31 | TFLIP, // (╯°□°)╯︵ ┻━┻ | ||
| 32 | POOP, // 💩 | ||
| 33 | DPOINT, // (ಠ_ಠ) | ||
| 34 | STRUT, // ᕕ( ᐛ )ᕗ | ||
| 35 | SARCSM, // ⸮ | ||
| 36 | }; | ||
| 37 | |||
| 38 | |||
| 39 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 40 | |||
| 41 | /* Qwerty | ||
| 42 | * ,-----------------------------------------------------------------------------------. | ||
| 43 | * | Tab | Q | W | E | R | T | Y | U | I | O | P |Bkpsc | | ||
| 44 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 45 | * | Esc | A | S | D | F | G | H | J | K | L | ; | " | | ||
| 46 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 47 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
| 48 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 49 | * | FN | Ctrl | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 50 | * `-----------------------------------------------------------------------------------' | ||
| 51 | */ | ||
| 52 | [_QWERTY] = LAYOUT_ortho_4x12( | ||
| 53 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 54 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 55 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
| 56 | MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 57 | ), | ||
| 58 | |||
| 59 | /* FN | ||
| 60 | * ,-----------------------------------------------------------------------------------. | ||
| 61 | * | ` | | | | | | | | |POOP |PrtScr|Del | | ||
| 62 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 63 | * | | | | | | | | | | | |UC_Wnc| | ||
| 64 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 65 | * | |SHRUG |TFLIP | POOP |DPOINT|STRUT | | | | |SARCSM|UC_Lin| | ||
| 66 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 67 | * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | ||
| 68 | * `-----------------------------------------------------------------------------------' | ||
| 69 | */ | ||
| 70 | [_FN] = LAYOUT_ortho_4x12( | ||
| 71 | KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, POOP, KC_PSCR, KC_DEL, | ||
| 72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_WC, | ||
| 73 | _______, SHRUG, TFLIP, POOP, DPOINT, STRUT, _______, _______, _______, _______, SARCSM, UC_M_LN, | ||
| 74 | _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______ | ||
| 75 | ), | ||
| 76 | |||
| 77 | /* Lower | ||
| 78 | * ,-----------------------------------------------------------------------------------. | ||
| 79 | * | | | | | | | | | | | | Del | | ||
| 80 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 81 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 82 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 83 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | | ||
| 84 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 85 | * | | | | | | | |Raise | Home | PgDn | PgUp | End | | ||
| 86 | * `-----------------------------------------------------------------------------------' | ||
| 87 | */ | ||
| 88 | [_LOWER] = LAYOUT_ortho_4x12( | ||
| 89 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, | ||
| 90 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
| 91 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, | ||
| 92 | _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END | ||
| 93 | ), | ||
| 94 | |||
| 95 | /* Raise | ||
| 96 | * ,-----------------------------------------------------------------------------------. | ||
| 97 | * | | | | | | | | | | | | Del | | ||
| 98 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 99 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 100 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 101 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | | | | | ||
| 102 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 103 | * | | | | |Lower | | | | Next | Vol- | Vol+ | Play | | ||
| 104 | * `-----------------------------------------------------------------------------------' | ||
| 105 | */ | ||
| 106 | [_RAISE] = LAYOUT_ortho_4x12( | ||
| 107 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, | ||
| 108 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
| 109 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV, _______, _______, _______, | ||
| 110 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 111 | ), | ||
| 112 | |||
| 113 | |||
| 114 | /* Adjust (Lower + Raise) | ||
| 115 | * ,-----------------------------------------------------------------------------------. | ||
| 116 | * | | Reset| Debug| | | | | | | | | Del | | ||
| 117 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 118 | * | | | | | | | | | | | | | ||
| 119 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 120 | * | | | | | | | | | | | | | ||
| 121 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 122 | * | | | | | | | | | | | | | ||
| 123 | * `-----------------------------------------------------------------------------------' | ||
| 124 | */ | ||
| 125 | [_ADJUST] = LAYOUT_ortho_4x12( | ||
| 126 | _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, | ||
| 127 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 128 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 129 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 130 | ) | ||
| 131 | |||
| 132 | |||
| 133 | }; | ||
| 134 | |||
| 135 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 136 | switch (keycode) { | ||
| 137 | case LOWER: | ||
| 138 | if (record->event.pressed) { | ||
| 139 | layer_on(_LOWER); | ||
| 140 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 141 | } else { | ||
| 142 | layer_off(_LOWER); | ||
| 143 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 144 | } | ||
| 145 | return false; | ||
| 146 | break; | ||
| 147 | case RAISE: | ||
| 148 | if (record->event.pressed) { | ||
| 149 | layer_on(_RAISE); | ||
| 150 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 151 | } else { | ||
| 152 | layer_off(_RAISE); | ||
| 153 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 154 | } | ||
| 155 | return false; | ||
| 156 | break; | ||
| 157 | case SHRUG: | ||
| 158 | if (record->event.pressed) { | ||
| 159 | send_unicode_string("¯\\_(ツ)_/¯"); | ||
| 160 | } | ||
| 161 | return false; | ||
| 162 | break; | ||
| 163 | case TFLIP: | ||
| 164 | if (record->event.pressed) { | ||
| 165 | send_unicode_string("(╯°□°)╯︵ ┻━┻"); | ||
| 166 | } | ||
| 167 | return false; | ||
| 168 | break; | ||
| 169 | case POOP: | ||
| 170 | if (record->event.pressed) { | ||
| 171 | send_unicode_string("💩"); | ||
| 172 | } | ||
| 173 | return false; | ||
| 174 | break; | ||
| 175 | case DPOINT: | ||
| 176 | if (record->event.pressed) { | ||
| 177 | send_unicode_string("(ಠ_ಠ)"); | ||
| 178 | } | ||
| 179 | return false; | ||
| 180 | break; | ||
| 181 | case STRUT: | ||
| 182 | if (record->event.pressed) { | ||
| 183 | send_unicode_string("ᕕ( ᐛ )ᕗ"); | ||
| 184 | } | ||
| 185 | return false; | ||
| 186 | break; | ||
| 187 | case SARCSM: | ||
| 188 | if (record->event.pressed) { | ||
| 189 | send_unicode_string("⸮"); | ||
| 190 | } | ||
| 191 | return false; | ||
| 192 | break; | ||
| 193 | } | ||
| 194 | return true; | ||
| 195 | }; \ No newline at end of file | ||
