diff options
| author | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-05-11 22:16:07 -0700 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-05-11 22:16:07 -0700 |
| commit | ec302295b695e43c5967a6f806c4b4505c651e13 (patch) | |
| tree | a2a94d8bde17905465315f06aaef143b5f811173 | |
| parent | f542c0589bec06501a3990070c08638a9124f055 (diff) | |
| download | qmk_firmware-ec302295b695e43c5967a6f806c4b4505c651e13.tar.gz qmk_firmware-ec302295b695e43c5967a6f806c4b4505c651e13.zip | |
[Keyboard] Z-150 Blackheart refactor (#5823)
* Fix white space on z150_blackheart.h
* Update z150_blackheart.h to use #pragma once include guard
* Update z150_blackheart.h to use QMK-preferred K<row><col> notation
* Add QMK Configurator support
* Refactor the keymaps
- refactor the keymaps into separate files for each layout macro
- give credit where credit is due
- white space update (four-space indent)
* Make Hardware Availability link in readme a rich text link
* Convert LED indicators to GPIO commands
* Elevate Indicator LED set-up and toggling to keyboard level
| -rw-r--r-- | keyboards/z150_blackheart/info.json | 191 | ||||
| -rw-r--r-- | keyboards/z150_blackheart/keymaps/default/keymap.c | 83 | ||||
| -rw-r--r-- | keyboards/z150_blackheart/keymaps/default_tkl/keymap.c | 48 | ||||
| -rw-r--r-- | keyboards/z150_blackheart/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/z150_blackheart/z150_blackheart.c | 31 | ||||
| -rw-r--r-- | keyboards/z150_blackheart/z150_blackheart.h | 45 |
6 files changed, 323 insertions, 77 deletions
diff --git a/keyboards/z150_blackheart/info.json b/keyboards/z150_blackheart/info.json new file mode 100644 index 000000000..016641254 --- /dev/null +++ b/keyboards/z150_blackheart/info.json | |||
| @@ -0,0 +1,191 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Z-150 Blackheart", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk, blindassassin111", | ||
| 5 | "width": 21.25, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "key_count": 84, | ||
| 10 | "layout": [ | ||
| 11 | {"label":"F1", "x":0, "y":0}, | ||
| 12 | {"label":"F2", "x":1, "y":0}, | ||
| 13 | {"label":"Esc", "x":2.5, "y":0}, | ||
| 14 | {"label":"!", "x":3.5, "y":0}, | ||
| 15 | {"label":"@", "x":4.5, "y":0}, | ||
| 16 | {"label":"#", "x":5.5, "y":0}, | ||
| 17 | {"label":"$", "x":6.5, "y":0}, | ||
| 18 | {"label":"%", "x":7.5, "y":0}, | ||
| 19 | {"label":"^", "x":8.5, "y":0}, | ||
| 20 | {"label":"&", "x":9.5, "y":0}, | ||
| 21 | {"label":"*", "x":10.5, "y":0}, | ||
| 22 | {"label":"(", "x":11.5, "y":0}, | ||
| 23 | {"label":")", "x":12.5, "y":0}, | ||
| 24 | {"label":"_", "x":13.5, "y":0}, | ||
| 25 | {"label":"+", "x":14.5, "y":0}, | ||
| 26 | {"label":"Backspace", "x":15.5, "y":0, "w":1.75}, | ||
| 27 | {"label":"Num Lock", "x":17.25, "y":0}, | ||
| 28 | {"label":"Scroll Lock", "x":18.25, "y":0, "w":1.5}, | ||
| 29 | {"label":"Sys Req", "x":19.75, "y":0, "w":1.5}, | ||
| 30 | {"label":"F3", "x":0, "y":1}, | ||
| 31 | {"label":"F4", "x":1, "y":1}, | ||
| 32 | {"label":"Tab", "x":2.5, "y":1, "w":1.5}, | ||
| 33 | {"label":"Q", "x":4, "y":1}, | ||
| 34 | {"label":"W", "x":5, "y":1}, | ||
| 35 | {"label":"E", "x":6, "y":1}, | ||
| 36 | {"label":"R", "x":7, "y":1}, | ||
| 37 | {"label":"T", "x":8, "y":1}, | ||
| 38 | {"label":"Y", "x":9, "y":1}, | ||
| 39 | {"label":"U", "x":10, "y":1}, | ||
| 40 | {"label":"I", "x":11, "y":1}, | ||
| 41 | {"label":"O", "x":12, "y":1}, | ||
| 42 | {"label":"P", "x":13, "y":1}, | ||
| 43 | {"label":"{", "x":14, "y":1}, | ||
| 44 | {"label":"}", "x":15, "y":1, "w":1.25}, | ||
| 45 | {"label":"Enter", "x":15.25, "y":2, "w":2}, | ||
| 46 | {"label":"7", "x":17.25, "y":1}, | ||
| 47 | {"label":"8", "x":18.25, "y":1}, | ||
| 48 | {"label":"9", "x":19.25, "y":1}, | ||
| 49 | {"label":"PrtSc", "x":20.25, "y":1}, | ||
| 50 | {"label":"F5", "x":0, "y":2}, | ||
| 51 | {"label":"F6", "x":1, "y":2}, | ||
| 52 | {"label":"Ctrl", "x":2.5, "y":2, "w":1.75}, | ||
| 53 | {"label":"A", "x":4.25, "y":2}, | ||
| 54 | {"label":"S", "x":5.25, "y":2}, | ||
| 55 | {"label":"D", "x":6.25, "y":2}, | ||
| 56 | {"label":"F", "x":7.25, "y":2}, | ||
| 57 | {"label":"G", "x":8.25, "y":2}, | ||
| 58 | {"label":"H", "x":9.25, "y":2}, | ||
| 59 | {"label":"J", "x":10.25, "y":2}, | ||
| 60 | {"label":"K", "x":11.25, "y":2}, | ||
| 61 | {"label":"L", "x":12.25, "y":2}, | ||
| 62 | {"label":":", "x":13.25, "y":2}, | ||
| 63 | {"label":"\"", "x":14.25, "y":2}, | ||
| 64 | {"label":"4", "x":17.25, "y":2}, | ||
| 65 | {"label":"5", "x":18.25, "y":2}, | ||
| 66 | {"label":"6", "x":19.25, "y":2}, | ||
| 67 | {"label":"-", "x":20.25, "y":2}, | ||
| 68 | {"label":"F7", "x":0, "y":3}, | ||
| 69 | {"label":"F8", "x":1, "y":3}, | ||
| 70 | {"label":"Shift", "x":2.5, "y":3, "w":2.25}, | ||
| 71 | {"label":"Z", "x":4.75, "y":3}, | ||
| 72 | {"label":"X", "x":5.75, "y":3}, | ||
| 73 | {"label":"C", "x":6.75, "y":3}, | ||
| 74 | {"label":"V", "x":7.75, "y":3}, | ||
| 75 | {"label":"B", "x":8.75, "y":3}, | ||
| 76 | {"label":"N", "x":9.75, "y":3}, | ||
| 77 | {"label":"M", "x":10.75, "y":3}, | ||
| 78 | {"label":"<", "x":11.75, "y":3}, | ||
| 79 | {"label":">", "x":12.75, "y":3}, | ||
| 80 | {"label":"?", "x":13.75, "y":3}, | ||
| 81 | {"label":"Shift", "x":14.75, "y":3, "w":1.5}, | ||
| 82 | {"label":"|", "x":16.25, "y":3}, | ||
| 83 | {"label":"1", "x":17.25, "y":3}, | ||
| 84 | {"label":"2", "x":18.25, "y":3}, | ||
| 85 | {"label":"3", "x":19.25, "y":3}, | ||
| 86 | {"label":"+", "x":20.25, "y":3, "h":2}, | ||
| 87 | {"label":"F9", "x":0, "y":4}, | ||
| 88 | {"label":"F10", "x":1, "y":4}, | ||
| 89 | {"label":"Alt", "x":2.5, "y":4, "w":1.75}, | ||
| 90 | {"label":"~", "x":4.25, "y":4}, | ||
| 91 | {"label":"Space", "x":5.25, "y":4, "w":9}, | ||
| 92 | {"label":"Caps Lock", "x":14.25, "y":4, "w":2}, | ||
| 93 | {"label":"0", "x":16.25, "y":4, "w":2}, | ||
| 94 | {"label":".", "x":18.25, "y":4, "w":2} | ||
| 95 | ] | ||
| 96 | }, | ||
| 97 | "LAYOUT_z150_tkl": { | ||
| 98 | "key_count": 88, | ||
| 99 | "layout": [ | ||
| 100 | {"label":"F1", "x":0, "y":0}, | ||
| 101 | {"label":"F2", "x":1, "y":0}, | ||
| 102 | {"label":"Esc", "x":2.5, "y":0}, | ||
| 103 | {"label":"1", "x":3.5, "y":0}, | ||
| 104 | {"label":"2", "x":4.5, "y":0}, | ||
| 105 | {"label":"3", "x":5.5, "y":0}, | ||
| 106 | {"label":"4", "x":6.5, "y":0}, | ||
| 107 | {"label":"5", "x":7.5, "y":0}, | ||
| 108 | {"label":"6", "x":8.5, "y":0}, | ||
| 109 | {"label":"7", "x":9.5, "y":0}, | ||
| 110 | {"label":"8", "x":10.5, "y":0}, | ||
| 111 | {"label":"9", "x":11.5, "y":0}, | ||
| 112 | {"label":"0", "x":12.5, "y":0}, | ||
| 113 | {"label":"-", "x":13.5, "y":0}, | ||
| 114 | {"label":"=", "x":14.5, "y":0}, | ||
| 115 | {"label":"Backspace", "x":15.5, "y":0, "w":2}, | ||
| 116 | {"label":"Insert", "x":18.25, "y":0}, | ||
| 117 | {"label":"Home", "x":19.25, "y":0}, | ||
| 118 | {"label":"PgUp", "x":20.25, "y":0}, | ||
| 119 | {"label":"F3", "x":0, "y":1}, | ||
| 120 | {"label":"F4", "x":1, "y":1}, | ||
| 121 | {"label":"Tab", "x":2.5, "y":1, "w":1.5}, | ||
| 122 | {"label":"Q", "x":4, "y":1}, | ||
| 123 | {"label":"W", "x":5, "y":1}, | ||
| 124 | {"label":"E", "x":6, "y":1}, | ||
| 125 | {"label":"R", "x":7, "y":1}, | ||
| 126 | {"label":"T", "x":8, "y":1}, | ||
| 127 | {"label":"Y", "x":9, "y":1}, | ||
| 128 | {"label":"U", "x":10, "y":1}, | ||
| 129 | {"label":"I", "x":11, "y":1}, | ||
| 130 | {"label":"O", "x":12, "y":1}, | ||
| 131 | {"label":"P", "x":13, "y":1}, | ||
| 132 | {"label":"[", "x":14, "y":1}, | ||
| 133 | {"label":"]", "x":15, "y":1}, | ||
| 134 | {"label":"\\", "x":16, "y":1, "w":1.5}, | ||
| 135 | {"label":"Delete", "x":18.25, "y":1}, | ||
| 136 | {"label":"End", "x":19.25, "y":1}, | ||
| 137 | {"label":"PgDn", "x":20.25, "y":1}, | ||
| 138 | {"label":"F5", "x":0, "y":2}, | ||
| 139 | {"label":"F6", "x":1, "y":2}, | ||
| 140 | {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, | ||
| 141 | {"label":"A", "x":4.25, "y":2}, | ||
| 142 | {"label":"S", "x":5.25, "y":2}, | ||
| 143 | {"label":"D", "x":6.25, "y":2}, | ||
| 144 | {"label":"F", "x":7.25, "y":2}, | ||
| 145 | {"label":"G", "x":8.25, "y":2}, | ||
| 146 | {"label":"H", "x":9.25, "y":2}, | ||
| 147 | {"label":"J", "x":10.25, "y":2}, | ||
| 148 | {"label":"K", "x":11.25, "y":2}, | ||
| 149 | {"label":"L", "x":12.25, "y":2}, | ||
| 150 | {"label":";", "x":13.25, "y":2}, | ||
| 151 | {"label":"'", "x":14.25, "y":2}, | ||
| 152 | {"label":"Enter", "x":15.25, "y":2, "w":2.25}, | ||
| 153 | {"x":18.25, "y":2}, | ||
| 154 | {"x":19.25, "y":2}, | ||
| 155 | {"x":20.25, "y":2}, | ||
| 156 | {"label":"F7", "x":0, "y":3}, | ||
| 157 | {"label":"F8", "x":1, "y":3}, | ||
| 158 | {"label":"Shift", "x":2.5, "y":3, "w":1.25}, | ||
| 159 | {"label":"ISO \\", "x":3.75, "y":3}, | ||
| 160 | {"label":"Z", "x":4.75, "y":3}, | ||
| 161 | {"label":"X", "x":5.75, "y":3}, | ||
| 162 | {"label":"C", "x":6.75, "y":3}, | ||
| 163 | {"label":"V", "x":7.75, "y":3}, | ||
| 164 | {"label":"B", "x":8.75, "y":3}, | ||
| 165 | {"label":"N", "x":9.75, "y":3}, | ||
| 166 | {"label":"M", "x":10.75, "y":3}, | ||
| 167 | {"label":",", "x":11.75, "y":3}, | ||
| 168 | {"label":".", "x":12.75, "y":3}, | ||
| 169 | {"label":"/", "x":13.75, "y":3}, | ||
| 170 | {"label":"Shift", "x":14.75, "y":3, "w":1.75}, | ||
| 171 | {"label":"Fn", "x":16.5, "y":3}, | ||
| 172 | {"x":18.25, "y":3}, | ||
| 173 | {"label":"Up", "x":19.25, "y":3}, | ||
| 174 | {"x":20.25, "y":3}, | ||
| 175 | {"label":"F9", "x":0, "y":4}, | ||
| 176 | {"label":"F10", "x":1, "y":4}, | ||
| 177 | {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, | ||
| 178 | {"label":"Win", "x":3.75, "y":4, "w":1.25}, | ||
| 179 | {"label":"Alt", "x":5, "y":4, "w":1.25}, | ||
| 180 | {"label":"Space", "x":6.25, "y":4, "w":6.25}, | ||
| 181 | {"label":"Alt", "x":12.5, "y":4, "w":1.25}, | ||
| 182 | {"label":"Win", "x":13.75, "y":4, "w":1.25}, | ||
| 183 | {"label":"Menu", "x":15, "y":4, "w":1.25}, | ||
| 184 | {"label":"Ctrl", "x":16.25, "y":4, "w":1.25}, | ||
| 185 | {"label":"Left", "x":18.25, "y":4}, | ||
| 186 | {"label":"Down", "x":19.25, "y":4}, | ||
| 187 | {"label":"Right", "x":20.25, "y":4} | ||
| 188 | ] | ||
| 189 | } | ||
| 190 | } | ||
| 191 | } | ||
diff --git a/keyboards/z150_blackheart/keymaps/default/keymap.c b/keyboards/z150_blackheart/keymaps/default/keymap.c index e93802052..ff4f6f7f9 100644 --- a/keyboards/z150_blackheart/keymaps/default/keymap.c +++ b/keyboards/z150_blackheart/keymaps/default/keymap.c | |||
| @@ -1,38 +1,37 @@ | |||
| 1 | /* Copyright 2018 blindassassin111 | ||
| 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 | */ | ||
| 1 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 2 | 17 | ||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 4 | 19 | ||
| 5 | LAYOUT( | 20 | [0] = LAYOUT( |
| 6 | KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, MO(1), | 21 | KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, MO(1), |
| 7 | KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, | 22 | KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, |
| 8 | KC_F5, KC_F6, KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, KC_PMNS, | 23 | KC_F5, KC_F6, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, KC_PMNS, |
| 9 | KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH, KC_RSFT, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, | 24 | KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, |
| 10 | KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT | 25 | KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT |
| 11 | ), | 26 | ), |
| 12 | 27 | ||
| 13 | LAYOUT( | 28 | [1] = LAYOUT( |
| 14 | _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 29 | _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 15 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 30 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 16 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 17 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 18 | _______, _______, _______, _______, _______, _______, _______, _______ | 33 | _______, _______, _______, _______, _______, _______, _______, _______ |
| 19 | ), | 34 | ), |
| 20 | |||
| 21 | LAYOUT_z150_tkl( | ||
| 22 | KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
| 23 | KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
| 24 | KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 25 | KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, | ||
| 26 | KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 27 | ), | ||
| 28 | |||
| 29 | LAYOUT_z150_tkl( | ||
| 30 | _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 33 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 34 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 35 | ), | ||
| 36 | }; | 35 | }; |
| 37 | 36 | ||
| 38 | void matrix_init_user(void) { | 37 | void matrix_init_user(void) { |
| @@ -42,28 +41,8 @@ void matrix_scan_user(void) { | |||
| 42 | } | 41 | } |
| 43 | 42 | ||
| 44 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 43 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 45 | return true; | 44 | return true; |
| 46 | } | 45 | } |
| 47 | 46 | ||
| 48 | void led_set_user(uint8_t usb_led) { | 47 | void led_set_user(uint8_t usb_led) { |
| 49 | DDRB |= (1 << 0); | ||
| 50 | DDRE |= (1 << 6) | (1 << 7); | ||
| 51 | |||
| 52 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { | ||
| 53 | PORTE |= (1 << 7); | ||
| 54 | } else { | ||
| 55 | PORTE &= ~(1 << 7); | ||
| 56 | } | ||
| 57 | |||
| 58 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
| 59 | PORTB |= (1 << 0); | ||
| 60 | } else { | ||
| 61 | PORTB &= ~(1 << 0); | ||
| 62 | } | ||
| 63 | |||
| 64 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { | ||
| 65 | PORTE |= (1 << 6); | ||
| 66 | } else { | ||
| 67 | PORTE &= ~(1 << 6); | ||
| 68 | } | ||
| 69 | } \ No newline at end of file | 48 | } \ No newline at end of file |
diff --git a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c new file mode 100644 index 000000000..f1a24b8dd --- /dev/null +++ b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* Copyright 2018 blindassassin111 | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | |||
| 20 | [0] = LAYOUT_z150_tkl( | ||
| 21 | KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
| 22 | KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
| 23 | KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 24 | KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, | ||
| 25 | KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 26 | ), | ||
| 27 | |||
| 28 | [1] = LAYOUT_z150_tkl( | ||
| 29 | _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 30 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 33 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 34 | ), | ||
| 35 | }; | ||
| 36 | |||
| 37 | void matrix_init_user(void) { | ||
| 38 | } | ||
| 39 | |||
| 40 | void matrix_scan_user(void) { | ||
| 41 | } | ||
| 42 | |||
| 43 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 44 | return true; | ||
| 45 | } | ||
| 46 | |||
| 47 | void led_set_user(uint8_t usb_led) { | ||
| 48 | } \ No newline at end of file | ||
diff --git a/keyboards/z150_blackheart/readme.md b/keyboards/z150_blackheart/readme.md index 5e87b6c8f..331f85694 100644 --- a/keyboards/z150_blackheart/readme.md +++ b/keyboards/z150_blackheart/readme.md | |||
| @@ -5,7 +5,7 @@ A replacement PCB for Zenith Z-150 keyboards. | |||
| 5 | 5 | ||
| 6 | Keyboard Maintainer: QMK Community and blindassassin111 | 6 | Keyboard Maintainer: QMK Community and blindassassin111 |
| 7 | Hardware Supported: Z-150 blackheart PCB | 7 | Hardware Supported: Z-150 blackheart PCB |
| 8 | Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html | 8 | Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) |
| 9 | 9 | ||
| 10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
| 11 | 11 | ||
diff --git a/keyboards/z150_blackheart/z150_blackheart.c b/keyboards/z150_blackheart/z150_blackheart.c index 10f388cf6..b754c64a1 100644 --- a/keyboards/z150_blackheart/z150_blackheart.c +++ b/keyboards/z150_blackheart/z150_blackheart.c | |||
| @@ -1 +1,32 @@ | |||
| 1 | #include "z150_blackheart.h" | 1 | #include "z150_blackheart.h" |
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | setPinOutput(B0); | ||
| 5 | setPinOutput(E6); | ||
| 6 | setPinOutput(E7); | ||
| 7 | |||
| 8 | matrix_init_user(); | ||
| 9 | }; | ||
| 10 | |||
| 11 | void led_set_kb(uint8_t usb_led) { | ||
| 12 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 13 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
| 14 | writePinHigh(E7); | ||
| 15 | } else { | ||
| 16 | writePinLow(E7); | ||
| 17 | } | ||
| 18 | |||
| 19 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
| 20 | writePinHigh(B0); | ||
| 21 | } else { | ||
| 22 | writePinLow(B0); | ||
| 23 | } | ||
| 24 | |||
| 25 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
| 26 | writePinHigh(E6); | ||
| 27 | } else { | ||
| 28 | writePinLow(E6); | ||
| 29 | } | ||
| 30 | |||
| 31 | led_set_user(usb_led); | ||
| 32 | } | ||
diff --git a/keyboards/z150_blackheart/z150_blackheart.h b/keyboards/z150_blackheart/z150_blackheart.h index baf187fd2..f97ac1c03 100644 --- a/keyboards/z150_blackheart/z150_blackheart.h +++ b/keyboards/z150_blackheart/z150_blackheart.h | |||
| @@ -1,34 +1,31 @@ | |||
| 1 | #ifndef z150_blackheart_H | 1 | #pragma once |
| 2 | #define z150_blackheart_H | ||
| 3 | 2 | ||
| 4 | #include "quantum.h" | 3 | #include "quantum.h" |
| 5 | 4 | ||
| 6 | #define LAYOUT( \ | 5 | #define LAYOUT( \ |
| 7 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, \ | 6 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, \ |
| 8 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ | 7 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, \ |
| 9 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, K216, K217, K218, \ | 8 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ |
| 10 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ | 9 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, \ |
| 11 | K400, K401, K402, K403, K407, K414, K415, K417 \ | 10 | K40, K41, K42, K43, K47, K4E, K4F, K4H \ |
| 12 | ) { \ | 11 | ) { \ |
| 13 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019 }, \ | 12 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, KC_NO, K0J }, \ |
| 14 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ | 13 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J }, \ |
| 15 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215, K216, K217, K218, KC_NO }, \ | 14 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I, KC_NO }, \ |
| 16 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, KC_NO }, \ | 15 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, KC_NO }, \ |
| 17 | { K400, K401, K402, K403, KC_NO, KC_NO, KC_NO, K407, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K414, K415, KC_NO, K417, KC_NO, KC_NO } \ | 16 | { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K4E, K4F, KC_NO, K4H, KC_NO, KC_NO } \ |
| 18 | } | 17 | } |
| 19 | 18 | ||
| 20 | #define LAYOUT_z150_tkl( \ | 19 | #define LAYOUT_z150_tkl( \ |
| 21 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K017, K018, K019, \ | 20 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0H, K0I, K0J, \ |
| 22 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K117, K118, K119, \ | 21 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1H, K1I, K1J, \ |
| 23 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, \ | 22 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2G, K2H, K2I, \ |
| 24 | K300, K301, K302, K405, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, \ | 23 | K30, K31, K32, K45, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3G, K3H, K3I, \ |
| 25 | K400, K401, K402, K403, K404, K407, K412, K413, K414, K415, K416, K417, K418 \ | 24 | K40, K41, K42, K43, K44, K47, K4C, K4D, K4E, K4F, K4G, K4H, K4I \ |
| 26 | ) { \ | 25 | ) { \ |
| 27 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, KC_NO, K017, K018, K019 }, \ | 26 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, KC_NO, K0H, K0I, K0J }, \ |
| 28 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, KC_NO, K117, K118, K119 }, \ | 27 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, KC_NO, K1H, K1I, K1J }, \ |
| 29 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO, K216, K217, K218, KC_NO }, \ | 28 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, KC_NO, K2G, K2H, K2I, KC_NO }, \ |
| 30 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, KC_NO, K316, K317, K318, KC_NO }, \ | 29 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, K3G, K3H, K3I, KC_NO }, \ |
| 31 | { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417, K418, KC_NO } \ | 30 | { K40, K41, K42, K43, K44, K45, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, K4F, K4G, K4H, K4I, KC_NO } \ |
| 32 | } | 31 | } |
| 33 | |||
| 34 | #endif \ No newline at end of file | ||
