diff options
| author | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-01-18 07:32:21 -0800 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-01-18 07:32:21 -0800 |
| commit | 12406c646f917b7451ec265d767f07a34ecf906a (patch) | |
| tree | 6a5bb1502bd082cd851471187bef3b59de1139d4 /keyboards/tkc1800 | |
| parent | e2f7c3d5a59933519e8cf7b4d9176587334d7b70 (diff) | |
| download | qmk_firmware-12406c646f917b7451ec265d767f07a34ecf906a.tar.gz qmk_firmware-12406c646f917b7451ec265d767f07a34ecf906a.zip | |
TKC1800 refactor and Configurator visual fixes (#4870)
* TKC1800: refactor
- tkc1800.h
- updated to use #pragma once
- visual alignment
- update config.h files to use #pragma once
- update all keymaps to use #include QMK_KEYBOARD_H
- delete redundant mod mask, KC_TRNS, and KC_NO definitions
- reformat keymap layers for readability
- add block comment for Function layer in default keymap
- delete commented action_get_macro code blocks (deprecated function)
- update files to better conform with QMK coding conventions
- update smt keymap to use set_single_persistent_default_layer (instead of persistent_default_layer_set)
- replace instances of `?=` with `=` in rules.mk
* TKC1800: Configurator visual fixes
- correct key sizes and positioning
- reformat file so each physical key object has its own line for readability
- update and add `label` keys for readability
* TKC1800: readme update
- fix image gallery link
- update Hardware Supported and Hardware Availability lines
- update make example (add :default suffix)
- update QMK Docs links (Newbs Guide; grammar)
* Add missing semicolons to smt keymap
Diffstat (limited to 'keyboards/tkc1800')
| -rw-r--r-- | keyboards/tkc1800/README.md | 11 | ||||
| -rw-r--r-- | keyboards/tkc1800/config.h | 5 | ||||
| -rw-r--r-- | keyboards/tkc1800/info.json | 648 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/default/config.h | 7 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/default/keymap.c | 118 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/smt/config.h | 7 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/smt/keymap.c | 135 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/wkl/config.h | 7 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/wkl/keymap.c | 101 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/yanfali/config.h | 7 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/yanfali/keymap.c | 75 | ||||
| -rw-r--r-- | keyboards/tkc1800/rules.mk | 26 | ||||
| -rw-r--r-- | keyboards/tkc1800/tkc1800.h | 23 |
13 files changed, 344 insertions, 826 deletions
diff --git a/keyboards/tkc1800/README.md b/keyboards/tkc1800/README.md index 4d1b8e0f2..e154770d7 100644 --- a/keyboards/tkc1800/README.md +++ b/keyboards/tkc1800/README.md | |||
| @@ -1,18 +1,17 @@ | |||
| 1 | The Key Company TKC1800 | 1 | The Key Company TKC1800 |
| 2 | === | ||
| 3 | 2 | ||
| 4 |  | 3 | [TKC1800 Image Gallery](https://imgur.com/a/Xlttp) |
| 5 | 4 | ||
| 6 | 5 | ||
| 7 | The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. | 6 | The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. |
| 8 | 7 | ||
| 9 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | 8 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) |
| 10 | Hardware Supported: AT90USB1286 | 9 | Hardware Supported: TKC1800 PCB |
| 11 | Hardware Availability: Via GB | 10 | Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1800) |
| 12 | 11 | ||
| 13 | 12 | ||
| 14 | Make example for this keyboard (after setting up your build environment): | 13 | Make example for this keyboard (after setting up your build environment): |
| 15 | 14 | ||
| 16 | make tkc1800 | 15 | make tkc1800:default |
| 17 | 16 | ||
| 18 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. \ No newline at end of file | 17 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index b13620de3..92a5f1b38 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h | |||
| @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License | |||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #ifndef CONFIG_H | 18 | #pragma once |
| 19 | #define CONFIG_H | ||
| 20 | 19 | ||
| 21 | #include "config_common.h" | 20 | #include "config_common.h" |
| 22 | 21 | ||
| @@ -182,5 +181,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 182 | 181 | ||
| 183 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 182 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
| 184 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 183 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
| 185 | |||
| 186 | #endif | ||
diff --git a/keyboards/tkc1800/info.json b/keyboards/tkc1800/info.json index f06a16c15..3e3ab1484 100644 --- a/keyboards/tkc1800/info.json +++ b/keyboards/tkc1800/info.json | |||
| @@ -3,550 +3,118 @@ | |||
| 3 | "url": "", | 3 | "url": "", |
| 4 | "maintainer": "qmk", | 4 | "maintainer": "qmk", |
| 5 | "width": 19.5, | 5 | "width": 19.5, |
| 6 | "height": 7, | 6 | "height": 7.25, |
| 7 | "layouts": { | 7 | "layouts": { |
| 8 | "LAYOUT": { | 8 | "LAYOUT": { |
| 9 | "key_count": 107, | 9 | "key_count": 107, |
| 10 | "layout": [ | 10 | "layout": [ |
| 11 | { | 11 | { "label": "Esc", "x": 0, "y": 0 }, |
| 12 | "label": "Esc", | 12 | { "label": "F1", "x": 1.25, "y": 0 }, |
| 13 | "x": 0, | 13 | { "label": "F2", "x": 2.25, "y": 0 }, |
| 14 | "y": 0 | 14 | { "label": "F3", "x": 3.25, "y": 0 }, |
| 15 | }, | 15 | { "label": "F4", "x": 4.25, "y": 0 }, |
| 16 | { | 16 | { "label": "F5", "x": 5.5, "y": 0 }, |
| 17 | "label": "F1", | 17 | { "label": "F6", "x": 6.5, "y": 0 }, |
| 18 | "x": 1.25, | 18 | { "label": "F7", "x": 7.5, "y": 0 }, |
| 19 | "y": 0 | 19 | { "label": "F8", "x": 8.5, "y": 0 }, |
| 20 | }, | 20 | { "label": "F9", "x": 9.75, "y": 0 }, |
| 21 | { | 21 | { "label": "F10", "x": 10.75, "y": 0 }, |
| 22 | "label": "F2", | 22 | { "label": "F11", "x": 11.75, "y": 0 }, |
| 23 | "x": 2.25, | 23 | { "label": "F12", "x": 12.75, "y": 0 }, |
| 24 | "y": 0 | 24 | { "label": "Insert", "x": 15.5, "y": 0 }, |
| 25 | }, | 25 | { "label": "Home", "x": 16.5, "y": 0 }, |
| 26 | { | 26 | { "label": "Page Up", "x": 17.5, "y": 0 }, |
| 27 | "label": "F3", | 27 | { "label": "Print Screen", "x": 18.5, "y": 0 }, |
| 28 | "x": 3.25, | 28 | { "label": "Delete", "x": 15.5, "y": 1 }, |
| 29 | "y": 0 | 29 | { "label": "End", "x": 16.5, "y": 1 }, |
| 30 | }, | 30 | { "label": "Page Down", "x": 17.5, "y": 1 }, |
| 31 | { | 31 | { "label": "Scroll Lock", "x": 18.5, "y": 1 }, |
| 32 | "label": "F4", | 32 | { "label": "`", "x": 0, "y": 2 }, |
| 33 | "x": 4.25, | 33 | { "label": "1", "x": 1, "y": 2 }, |
| 34 | "y": 0 | 34 | { "label": "2", "x": 2, "y": 2 }, |
| 35 | }, | 35 | { "label": "3", "x": 3, "y": 2 }, |
| 36 | { | 36 | { "label": "4", "x": 4, "y": 2 }, |
| 37 | "label": "F5", | 37 | { "label": "5", "x": 5, "y": 2 }, |
| 38 | "x": 5.5, | 38 | { "label": "6", "x": 6, "y": 2 }, |
| 39 | "y": 0 | 39 | { "label": "7", "x": 7, "y": 2 }, |
| 40 | }, | 40 | { "label": "8", "x": 8, "y": 2 }, |
| 41 | { | 41 | { "label": "9", "x": 9, "y": 2 }, |
| 42 | "label": "F6", | 42 | { "label": "0", "x": 10, "y": 2 }, |
| 43 | "x": 6.5, | 43 | { "label": "-", "x": 11, "y": 2 }, |
| 44 | "y": 0 | 44 | { "label": "=", "x": 12, "y": 2 }, |
| 45 | }, | 45 | { "label": "Backspace", "x": 13, "y": 2 }, |
| 46 | { | 46 | { "label": "Backspace_Right", "x": 14, "y": 2 }, |
| 47 | "label": "F7", | 47 | { "label": "Num Lock", "x": 15.5, "y": 2 }, |
| 48 | "x": 7.5, | 48 | { "label": "/", "x": 16.5, "y": 2 }, |
| 49 | "y": 0 | 49 | { "label": "*", "x": 17.5, "y": 2 }, |
| 50 | }, | 50 | { "label": "Pause", "x": 18.5, "y": 2 }, |
| 51 | { | 51 | { "label": "Tab", "x": 0, "y": 3, "w": 1.5 }, |
| 52 | "label": "F8", | 52 | { "label": "Q", "x": 1.5, "y": 3 }, |
| 53 | "x": 8.5, | 53 | { "label": "W", "x": 2.5, "y": 3 }, |
| 54 | "y": 0 | 54 | { "label": "E", "x": 3.5, "y": 3 }, |
| 55 | }, | 55 | { "label": "R", "x": 4.5, "y": 3 }, |
| 56 | { | 56 | { "label": "T", "x": 5.5, "y": 3 }, |
| 57 | "label": "F9", | 57 | { "label": "Y", "x": 6.5, "y": 3 }, |
| 58 | "x": 9.75, | 58 | { "label": "U", "x": 7.5, "y": 3 }, |
| 59 | "y": 0 | 59 | { "label": "I", "x": 8.5, "y": 3 }, |
| 60 | }, | 60 | { "label": "O", "x": 9.5, "y": 3 }, |
| 61 | { | 61 | { "label": "P", "x": 10.5, "y": 3 }, |
| 62 | "label": "F10", | 62 | { "label": "[", "x": 11.5, "y": 3 }, |
| 63 | "x": 10.75, | 63 | { "label": "]", "x": 12.5, "y": 3 }, |
| 64 | "y": 0 | 64 | { "label": "\\", "x": 13.5, "y": 3, "w": 1.5 }, |
| 65 | }, | 65 | { "label": "7", "x": 15.5, "y": 3 }, |
| 66 | { | 66 | { "label": "8", "x": 16.5, "y": 3 }, |
| 67 | "label": "F11", | 67 | { "label": "9", "x": 17.5, "y": 3 }, |
| 68 | "x": 11.75, | 68 | { "label": "-", "x": 18.5, "y": 3 }, |
| 69 | "y": 0 | 69 | { "label": "Caps Lock", "x": 0, "y": 4, "w": 1.75 }, |
| 70 | }, | 70 | { "label": "A", "x": 1.75, "y": 4 }, |
| 71 | { | 71 | { "label": "S", "x": 2.75, "y": 4 }, |
| 72 | "label": "F12", | 72 | { "label": "D", "x": 3.75, "y": 4 }, |
| 73 | "x": 12.75, | 73 | { "label": "F", "x": 4.75, "y": 4 }, |
| 74 | "y": 0 | 74 | { "label": "G", "x": 5.75, "y": 4 }, |
| 75 | }, | 75 | { "label": "H", "x": 6.75, "y": 4 }, |
| 76 | { | 76 | { "label": "J", "x": 7.75, "y": 4 }, |
| 77 | "label": "Insert", | 77 | { "label": "K", "x": 8.75, "y": 4 }, |
| 78 | "x": 15.5, | 78 | { "label": "L", "x": 9.75, "y": 4 }, |
| 79 | "y": 0 | 79 | { "label": ";", "x": 10.75, "y": 4 }, |
| 80 | }, | 80 | { "label": "'", "x": 11.75, "y": 4 }, |
| 81 | { | 81 | { "label": "ISO Hash", "x": 12.75, "y": 4 }, |
| 82 | "label": "Home", | 82 | { "label": "Enter", "x": 13.75, "y": 4, "w": 1.25 }, |
| 83 | "x": 16.5, | 83 | { "label": "4", "x": 15.5, "y": 4 }, |
| 84 | "y": 0 | 84 | { "label": "5", "x": 16.5, "y": 4 }, |
| 85 | }, | 85 | { "label": "6", "x": 17.5, "y": 4 }, |
| 86 | { | 86 | { "label": "+", "x": 18.5, "y": 4 }, |
| 87 | "label": "Pg Up", | 87 | { "label": "Shift", "x": 0, "y": 5, "w": 1.25 }, |
| 88 | "x": 17.5, | 88 | { "label": "ISO Backslash", "x": 1.25, "y": 5 }, |
| 89 | "y": 0 | 89 | { "label": "Z", "x": 2.25, "y": 5 }, |
| 90 | }, | 90 | { "label": "X", "x": 3.25, "y": 5 }, |
| 91 | { | 91 | { "label": "C", "x": 4.25, "y": 5 }, |
| 92 | "label": "Prt Sc", | 92 | { "label": "V", "x": 5.25, "y": 5 }, |
| 93 | "x": 18.5, | 93 | { "label": "B", "x": 6.25, "y": 5 }, |
| 94 | "y": 0 | 94 | { "label": "N", "x": 7.25, "y": 5 }, |
| 95 | }, | 95 | { "label": "M", "x": 8.25, "y": 5 }, |
| 96 | { | 96 | { "label": ",", "x": 9.25, "y": 5 }, |
| 97 | "label": "Delete", | 97 | { "label": ".", "x": 10.25, "y": 5 }, |
| 98 | "x": 15.5, | 98 | { "label": "/", "x": 11.25, "y": 5 }, |
| 99 | "y": 1 | 99 | { "label": "Shift", "x": 12.25, "y": 5, "w": 1.75 }, |
| 100 | }, | 100 | { "label": "Up", "x": 14.25, "y": 5.25 }, |
| 101 | { | 101 | { "label": "1", "x": 15.5, "y": 5 }, |
| 102 | "label": "End", | 102 | { "label": "2", "x": 16.5, "y": 5 }, |
| 103 | "x": 16.5, | 103 | { "label": "3", "x": 17.5, "y": 5 }, |
| 104 | "y": 1 | 104 | { "label": "Enter_Top", "x": 18.5, "y": 5 }, |
| 105 | }, | 105 | { "label": "Ctrl", "x": 0, "y": 6, "w": 1.25 }, |
| 106 | { | 106 | { "label": "GUI", "x": 1.25, "y": 6, "w": 1.25 }, |
| 107 | "label": "Pg Dn", | 107 | { "label": "Alt", "x": 2.5, "y": 6, "w": 1.25 }, |
| 108 | "x": 17.5, | 108 | { "label": "Space", "x": 3.75, "y": 6, "w": 6.25 }, |
| 109 | "y": 1 | 109 | { "label": "Alt", "x": 10, "y": 6 }, |
| 110 | }, | 110 | { "label": "Fn", "x": 11, "y": 6 }, |
| 111 | { | 111 | { "label": "Ctrl", "x": 12, "y": 6 }, |
| 112 | "label": "Scroll Lock", | 112 | { "label": "Left", "x": 13.25, "y": 6.25 }, |
| 113 | "x": 18.5, | 113 | { "label": "Down", "x": 14.25, "y": 6.25 }, |
| 114 | "y": 1 | 114 | { "label": "Right", "x": 15.25, "y": 6.25 }, |
| 115 | }, | 115 | { "label": "0", "x": 16.5, "y": 6 }, |
| 116 | { | 116 | { "label": ".", "x": 17.5, "y": 6 }, |
| 117 | "label": "~", | 117 | { "label": "Enter", "x": 18.5, "y": 6 } |
| 118 | "x": 0, | ||
| 119 | "y": 2 | ||
| 120 | }, | ||
| 121 | { | ||
| 122 | "label": "!", | ||
| 123 | "x": 1, | ||
| 124 | "y": 2 | ||
| 125 | }, | ||
| 126 | { | ||
| 127 | "label": "@", | ||
| 128 | "x": 2, | ||
| 129 | "y": 2 | ||
| 130 | }, | ||
| 131 | { | ||
| 132 | "label": "#", | ||
| 133 | "x": 3, | ||
| 134 | "y": 2 | ||
| 135 | }, | ||
| 136 | { | ||
| 137 | "label": "$", | ||
| 138 | "x": 4, | ||
| 139 | "y": 2 | ||
| 140 | }, | ||
| 141 | { | ||
| 142 | "label": "%", | ||
| 143 | "x": 5, | ||
| 144 | "y": 2 | ||
| 145 | }, | ||
| 146 | { | ||
| 147 | "label": "^", | ||
| 148 | "x": 6, | ||
| 149 | "y": 2 | ||
| 150 | }, | ||
| 151 | { | ||
| 152 | "label": "&", | ||
| 153 | "x": 7, | ||
| 154 | "y": 2 | ||
| 155 | }, | ||
| 156 | { | ||
| 157 | "label": "*", | ||
| 158 | "x": 8, | ||
| 159 | "y": 2 | ||
| 160 | }, | ||
| 161 | { | ||
| 162 | "label": "(", | ||
| 163 | "x": 9, | ||
| 164 | "y": 2 | ||
| 165 | }, | ||
| 166 | { | ||
| 167 | "label": ")", | ||
| 168 | "x": 10, | ||
| 169 | "y": 2 | ||
| 170 | }, | ||
| 171 | { | ||
| 172 | "label": "_", | ||
| 173 | "x": 11, | ||
| 174 | "y": 2 | ||
| 175 | }, | ||
| 176 | { | ||
| 177 | "label": "+", | ||
| 178 | "x": 12, | ||
| 179 | "y": 2 | ||
| 180 | }, | ||
| 181 | { | ||
| 182 | "label": "Backspace", | ||
| 183 | "x": 13, | ||
| 184 | "y": 2 | ||
| 185 | }, | ||
| 186 | { | ||
| 187 | "x": 14, | ||
| 188 | "y": 2 | ||
| 189 | }, | ||
| 190 | { | ||
| 191 | "label": "Num Lock", | ||
| 192 | "x": 15.5, | ||
| 193 | "y": 2 | ||
| 194 | }, | ||
| 195 | { | ||
| 196 | "label": "/", | ||
| 197 | "x": 16.5, | ||
| 198 | "y": 2 | ||
| 199 | }, | ||
| 200 | { | ||
| 201 | "label": "*", | ||
| 202 | "x": 17.5, | ||
| 203 | "y": 2 | ||
| 204 | }, | ||
| 205 | { | ||
| 206 | "label": "-", | ||
| 207 | "x": 18.5, | ||
| 208 | "y": 2 | ||
| 209 | }, | ||
| 210 | { | ||
| 211 | "label": "Tab", | ||
| 212 | "x": 0, | ||
| 213 | "y": 3, | ||
| 214 | "w": 1.5 | ||
| 215 | }, | ||
| 216 | { | ||
| 217 | "label": "Q", | ||
| 218 | "x": 1.5, | ||
| 219 | "y": 3 | ||
| 220 | }, | ||
| 221 | { | ||
| 222 | "label": "W", | ||
| 223 | "x": 2.5, | ||
| 224 | "y": 3 | ||
| 225 | }, | ||
| 226 | { | ||
| 227 | "label": "E", | ||
| 228 | "x": 3.5, | ||
| 229 | "y": 3 | ||
| 230 | }, | ||
| 231 | { | ||
| 232 | "label": "R", | ||
| 233 | "x": 4.5, | ||
| 234 | "y": 3 | ||
| 235 | }, | ||
| 236 | { | ||
| 237 | "label": "T", | ||
| 238 | "x": 5.5, | ||
| 239 | "y": 3 | ||
| 240 | }, | ||
| 241 | { | ||
| 242 | "label": "Y", | ||
| 243 | "x": 6.5, | ||
| 244 | "y": 3 | ||
| 245 | }, | ||
| 246 | { | ||
| 247 | "label": "U", | ||
| 248 | "x": 7.5, | ||
| 249 | "y": 3 | ||
| 250 | }, | ||
| 251 | { | ||
| 252 | "label": "I", | ||
| 253 | "x": 8.5, | ||
| 254 | "y": 3 | ||
| 255 | }, | ||
| 256 | { | ||
| 257 | "label": "O", | ||
| 258 | "x": 9.5, | ||
| 259 | "y": 3 | ||
| 260 | }, | ||
| 261 | { | ||
| 262 | "label": "P", | ||
| 263 | "x": 10.5, | ||
| 264 | "y": 3 | ||
| 265 | }, | ||
| 266 | { | ||
| 267 | "label": "{", | ||
| 268 | "x": 11.5, | ||
| 269 | "y": 3 | ||
| 270 | }, | ||
| 271 | { | ||
| 272 | "label": "}", | ||
| 273 | "x": 12.5, | ||
| 274 | "y": 3 | ||
| 275 | }, | ||
| 276 | { | ||
| 277 | "label": "|", | ||
| 278 | "x": 13.5, | ||
| 279 | "y": 3, | ||
| 280 | "w": 1.5 | ||
| 281 | }, | ||
| 282 | { | ||
| 283 | "label": "7", | ||
| 284 | "x": 15.5, | ||
| 285 | "y": 3 | ||
| 286 | }, | ||
| 287 | { | ||
| 288 | "label": "8", | ||
| 289 | "x": 16.5, | ||
| 290 | "y": 3 | ||
| 291 | }, | ||
| 292 | { | ||
| 293 | "label": "9", | ||
| 294 | "x": 17.5, | ||
| 295 | "y": 3 | ||
| 296 | }, | ||
| 297 | { | ||
| 298 | "label": "+", | ||
| 299 | "x": 18.5, | ||
| 300 | "y": 3 | ||
| 301 | }, | ||
| 302 | { | ||
| 303 | "label": "Caps Lock", | ||
| 304 | "x": 0, | ||
| 305 | "y": 4, | ||
| 306 | "w": 1.75 | ||
| 307 | }, | ||
| 308 | { | ||
| 309 | "label": "A", | ||
| 310 | "x": 1.75, | ||
| 311 | "y": 4 | ||
| 312 | }, | ||
| 313 | { | ||
| 314 | "label": "S", | ||
| 315 | "x": 2.75, | ||
| 316 | "y": 4 | ||
| 317 | }, | ||
| 318 | { | ||
| 319 | "label": "D", | ||
| 320 | "x": 3.75, | ||
| 321 | "y": 4 | ||
| 322 | }, | ||
| 323 | { | ||
| 324 | "label": "F", | ||
| 325 | "x": 4.75, | ||
| 326 | "y": 4 | ||
| 327 | }, | ||
| 328 | { | ||
| 329 | "label": "G", | ||
| 330 | "x": 5.75, | ||
| 331 | "y": 4 | ||
| 332 | }, | ||
| 333 | { | ||
| 334 | "label": "H", | ||
| 335 | "x": 6.75, | ||
| 336 | "y": 4 | ||
| 337 | }, | ||
| 338 | { | ||
| 339 | "label": "J", | ||
| 340 | "x": 7.75, | ||
| 341 | "y": 4 | ||
| 342 | }, | ||
| 343 | { | ||
| 344 | "label": "K", | ||
| 345 | "x": 8.75, | ||
| 346 | "y": 4 | ||
| 347 | }, | ||
| 348 | { | ||
| 349 | "label": "L", | ||
| 350 | "x": 9.75, | ||
| 351 | "y": 4 | ||
| 352 | }, | ||
| 353 | { | ||
| 354 | "label": ":", | ||
| 355 | "x": 10.75, | ||
| 356 | "y": 4 | ||
| 357 | }, | ||
| 358 | { | ||
| 359 | "label": "\"", | ||
| 360 | "x": 11.75, | ||
| 361 | "y": 4 | ||
| 362 | }, | ||
| 363 | { | ||
| 364 | "x": 12.75, | ||
| 365 | "y": 4 | ||
| 366 | }, | ||
| 367 | { | ||
| 368 | "label": "Enter", | ||
| 369 | "x": 13.75, | ||
| 370 | "y": 4, | ||
| 371 | "w": 1.25 | ||
| 372 | }, | ||
| 373 | { | ||
| 374 | "label": "4", | ||
| 375 | "x": 15.5, | ||
| 376 | "y": 4 | ||
| 377 | }, | ||
| 378 | { | ||
| 379 | "label": "5", | ||
| 380 | "x": 16.5, | ||
| 381 | "y": 4 | ||
| 382 | }, | ||
| 383 | { | ||
| 384 | "label": "6", | ||
| 385 | "x": 17.5, | ||
| 386 | "y": 4 | ||
| 387 | }, | ||
| 388 | { | ||
| 389 | "x": 18.5, | ||
| 390 | "y": 4 | ||
| 391 | }, | ||
| 392 | { | ||
| 393 | "x": 0, | ||
| 394 | "y": 5 | ||
| 395 | }, | ||
| 396 | { | ||
| 397 | "label": "Shift", | ||
| 398 | "x": 1, | ||
| 399 | "y": 5, | ||
| 400 | "w": 1.25 | ||
| 401 | }, | ||
| 402 | { | ||
| 403 | "label": "Z", | ||
| 404 | "x": 2.25, | ||
| 405 | "y": 5 | ||
| 406 | }, | ||
| 407 | { | ||
| 408 | "label": "X", | ||
| 409 | "x": 3.25, | ||
| 410 | "y": 5 | ||
| 411 | }, | ||
| 412 | { | ||
| 413 | "label": "C", | ||
| 414 | "x": 4.25, | ||
| 415 | "y": 5 | ||
| 416 | }, | ||
| 417 | { | ||
| 418 | "label": "V", | ||
| 419 | "x": 5.25, | ||
| 420 | "y": 5 | ||
| 421 | }, | ||
| 422 | { | ||
| 423 | "label": "B", | ||
| 424 | "x": 6.25, | ||
| 425 | "y": 5 | ||
| 426 | }, | ||
| 427 | { | ||
| 428 | "label": "N", | ||
| 429 | "x": 7.25, | ||
| 430 | "y": 5 | ||
| 431 | }, | ||
| 432 | { | ||
| 433 | "label": "M", | ||
| 434 | "x": 8.25, | ||
| 435 | "y": 5 | ||
| 436 | }, | ||
| 437 | { | ||
| 438 | "label": "<", | ||
| 439 | "x": 9.25, | ||
| 440 | "y": 5 | ||
| 441 | }, | ||
| 442 | { | ||
| 443 | "label": ">", | ||
| 444 | "x": 10.25, | ||
| 445 | "y": 5 | ||
| 446 | }, | ||
| 447 | { | ||
| 448 | "label": "?", | ||
| 449 | "x": 11.25, | ||
| 450 | "y": 5 | ||
| 451 | }, | ||
| 452 | { | ||
| 453 | "label": "Shift", | ||
| 454 | "x": 12.25, | ||
| 455 | "y": 5, | ||
| 456 | "w": 1.75 | ||
| 457 | }, | ||
| 458 | { | ||
| 459 | "label": "\\u2191", | ||
| 460 | "x": 14.25, | ||
| 461 | "y": 5 | ||
| 462 | }, | ||
| 463 | { | ||
| 464 | "label": "1", | ||
| 465 | "x": 15.5, | ||
| 466 | "y": 5 | ||
| 467 | }, | ||
| 468 | { | ||
| 469 | "label": "2", | ||
| 470 | "x": 16.5, | ||
| 471 | "y": 5 | ||
| 472 | }, | ||
| 473 | { | ||
| 474 | "label": "3", | ||
| 475 | "x": 17.5, | ||
| 476 | "y": 5 | ||
| 477 | }, | ||
| 478 | { | ||
| 479 | "label": "Enter", | ||
| 480 | "x": 18.5, | ||
| 481 | "y": 5 | ||
| 482 | }, | ||
| 483 | { | ||
| 484 | "label": "Ctrl", | ||
| 485 | "x": 0, | ||
| 486 | "y": 6, | ||
| 487 | "w": 1.25 | ||
| 488 | }, | ||
| 489 | { | ||
| 490 | "label": "Win", | ||
| 491 | "x": 1.25, | ||
| 492 | "y": 6, | ||
| 493 | "w": 1.25 | ||
| 494 | }, | ||
| 495 | { | ||
| 496 | "label": "Alt", | ||
| 497 | "x": 2.5, | ||
| 498 | "y": 6, | ||
| 499 | "w": 1.25 | ||
| 500 | }, | ||
| 501 | { | ||
| 502 | "x": 3.75, | ||
| 503 | "y": 6, | ||
| 504 | "w": 6.25 | ||
| 505 | }, | ||
| 506 | { | ||
| 507 | "label": "Alt", | ||
| 508 | "x": 10, | ||
| 509 | "y": 6 | ||
| 510 | }, | ||
| 511 | { | ||
| 512 | "label": "Win", | ||
| 513 | "x": 11, | ||
| 514 | "y": 6 | ||
| 515 | }, | ||
| 516 | { | ||
| 517 | "label": "Fn", | ||
| 518 | "x": 12, | ||
| 519 | "y": 6 | ||
| 520 | }, | ||
| 521 | { | ||
| 522 | "label": "\\u2190", | ||
| 523 | "x": 13.25, | ||
| 524 | "y": 6 | ||
| 525 | }, | ||
| 526 | { | ||
| 527 | "label": "\\u2193", | ||
| 528 | "x": 14.25, | ||
| 529 | "y": 6 | ||
| 530 | }, | ||
| 531 | { | ||
| 532 | "label": "\\u2192", | ||
| 533 | "x": 15.25, | ||
| 534 | "y": 6 | ||
| 535 | }, | ||
| 536 | { | ||
| 537 | "label": "0", | ||
| 538 | "x": 16.5, | ||
| 539 | "y": 6 | ||
| 540 | }, | ||
| 541 | { | ||
| 542 | "label": ".", | ||
| 543 | "x": 17.5, | ||
| 544 | "y": 6 | ||
| 545 | }, | ||
| 546 | { | ||
| 547 | "x": 18.5, | ||
| 548 | "y": 6 | ||
| 549 | } | ||
| 550 | ] | 118 | ] |
| 551 | } | 119 | } |
| 552 | } | 120 | } |
diff --git a/keyboards/tkc1800/keymaps/default/config.h b/keyboards/tkc1800/keymaps/default/config.h index 30973348a..ee142927f 100644 --- a/keyboards/tkc1800/keymaps/default/config.h +++ b/keyboards/tkc1800/keymaps/default/config.h | |||
| @@ -14,10 +14,7 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #ifndef CONFIG_USER_H | 17 | #pragma once |
| 18 | #define CONFIG_USER_H | ||
| 19 | |||
| 20 | #include "../../config.h" | ||
| 21 | 18 | ||
| 22 | #define USE_I2C | 19 | #define USE_I2C |
| 23 | #define SSD1306OLED | 20 | #define SSD1306OLED |
| @@ -25,5 +22,3 @@ | |||
| 25 | #define SSD1306_ADDRESS 0x3C | 22 | #define SSD1306_ADDRESS 0x3C |
| 26 | 23 | ||
| 27 | // place overrides here | 24 | // place overrides here |
| 28 | |||
| 29 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c index cc19de3bd..5455934a3 100644 --- a/keyboards/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc1800/keymaps/default/keymap.c | |||
| @@ -13,25 +13,17 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "tkc1800.h" | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "LUFA/Drivers/Peripheral/TWI.h" | 17 | #include "LUFA/Drivers/Peripheral/TWI.h" |
| 18 | #include "i2c.h" | 18 | #include "i2c.h" |
| 19 | #include "ssd1306.h" | 19 | #include "ssd1306.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | #define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 23 | #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 24 | |||
| 25 | |||
| 26 | // Helpful defines | ||
| 27 | #define ______ KC_TRNS | ||
| 28 | #define XXXXXX KC_NO | ||
| 29 | |||
| 30 | //Layers | 22 | //Layers |
| 31 | 23 | ||
| 32 | enum { | 24 | enum { |
| 33 | BASE = 0, | 25 | BASE = 0, |
| 34 | FUNCTION, | 26 | FUNCTION, |
| 35 | }; | 27 | }; |
| 36 | 28 | ||
| 37 | bool screenWorks = 0; | 29 | bool screenWorks = 0; |
| @@ -56,61 +48,77 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 56 | * |-----------------------------------------------------------' |-------------------| | 48 | * |-----------------------------------------------------------' |-------------------| |
| 57 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | 49 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| |
| 58 | * |--------------------------------------------------------'----`--------------| | | 50 | * |--------------------------------------------------------'----`--------------| | |
| 59 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | 51 | * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | |
| 60 | * `---------------------------------------------------------------------------------' | 52 | * `---------------------------------------------------------------------------------' |
| 61 | */ | 53 | */ |
| 62 | [BASE] = LAYOUT( | 54 | [BASE] = LAYOUT( |
| 63 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 55 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 64 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 56 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 65 | KC_GRV, 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, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 57 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 66 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | 58 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 67 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 59 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 68 | KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 60 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 69 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 61 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 70 | ), | 62 | ), |
| 71 | [FUNCTION] = LAYOUT( | 63 | /* Keymap FUNCTION: (Function Layer) |
| 72 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 64 | * ,-------------------------------------------------------. ,-------------------. |
| 73 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 65 | * | | | | | | | | | | | | | | | | | | | | | |
| 74 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, RESET, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 66 | * `-------------------------------------------------------' |-------------------| |
| 75 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | 67 | * | | | | | |
| 76 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 68 | * ,-----------------------------------------------------------. |-------------------| |
| 77 | KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, BL_STEP,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 69 | * | | | | | | | | | | | | | | RESET | | | | | | |
| 78 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 70 | * |-----------------------------------------------------------| |-------------------| |
| 79 | ), | 71 | * | | | | | | | | | | | | | | | | | | | | |
| 72 | * |-----------------------------------------------------------| |-------------------| | ||
| 73 | * | | | | | | | | | | | | | | | | | | | | ||
| 74 | * |-----------------------------------------------------------' |-------------------| | ||
| 75 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 76 | * |--------------------------------------------------------'----`--------------| | | ||
| 77 | * | | | | | | | | | | | | . | | | ||
| 78 | * `---------------------------------------------------------------------------------' | ||
| 79 | */ | ||
| 80 | [FUNCTION] = LAYOUT( | ||
| 81 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 82 | _______, _______, _______, _______, \ | ||
| 83 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 84 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 85 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 86 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 87 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 88 | ), | ||
| 80 | }; | 89 | }; |
| 81 | 90 | ||
| 82 | // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; | ||
| 83 | |||
| 84 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 91 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 85 | return true; | 92 | return true; |
| 86 | } | 93 | } |
| 87 | 94 | ||
| 88 | void led_set_user(uint8_t usb_led) { | 95 | void led_set_user(uint8_t usb_led) { |
| 89 | 96 | ||
| 90 | } | 97 | } |
| 98 | |||
| 91 | void matrix_init_user(void) { | 99 | void matrix_init_user(void) { |
| 92 | #ifdef USE_I2C | 100 | #ifdef USE_I2C |
| 93 | i2c_master_init(); | 101 | i2c_master_init(); |
| 94 | #ifdef SSD1306OLED | 102 | #ifdef SSD1306OLED |
| 95 | // calls code for the SSD1306 OLED | 103 | // calls code for the SSD1306 OLED |
| 96 | _delay_ms(400); | 104 | _delay_ms(400); |
| 97 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 105 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); |
| 98 | if(iota_gfx_init()){ // turns on the display | 106 | if ( iota_gfx_init() ) { // turns on the display |
| 99 | screenWorks = 1; | 107 | screenWorks = 1; |
| 100 | } | 108 | } |
| 109 | #endif | ||
| 101 | #endif | 110 | #endif |
| 111 | #ifdef AUDIO_ENABLE | ||
| 112 | startup_user(); | ||
| 102 | #endif | 113 | #endif |
| 103 | #ifdef AUDIO_ENABLE | ||
| 104 | startup_user(); | ||
| 105 | #endif | ||
| 106 | } | 114 | } |
| 107 | 115 | ||
| 108 | void matrix_scan_user(void) { | 116 | void matrix_scan_user(void) { |
| 109 | #ifdef SSD1306OLED | 117 | #ifdef SSD1306OLED |
| 110 | if(screenWorks){ | 118 | if ( screenWorks ) { |
| 111 | iota_gfx_task(); // this is what updates the display continuously | 119 | iota_gfx_task(); // this is what updates the display continuously |
| 112 | }; | 120 | }; |
| 113 | #endif | 121 | #endif |
| 114 | } | 122 | } |
| 115 | 123 | ||
| 116 | void matrix_update(struct CharacterMatrix *dest, | 124 | void matrix_update(struct CharacterMatrix *dest, |
| @@ -122,17 +130,17 @@ void matrix_update(struct CharacterMatrix *dest, | |||
| 122 | } | 130 | } |
| 123 | 131 | ||
| 124 | void iota_gfx_task_user(void) { | 132 | void iota_gfx_task_user(void) { |
| 125 | #if DEBUG_TO_SCREEN | 133 | #if DEBUG_TO_SCREEN |
| 126 | if (debug_enable) { | 134 | if (debug_enable) { |
| 127 | return; | 135 | return; |
| 128 | } | 136 | } |
| 129 | #endif | 137 | #endif |
| 130 | 138 | ||
| 131 | struct CharacterMatrix matrix; | 139 | struct CharacterMatrix matrix; |
| 132 | 140 | ||
| 133 | matrix_clear(&matrix); | 141 | matrix_clear(&matrix); |
| 134 | matrix_write_P(&matrix, PSTR("TKC1800")); | 142 | matrix_write_P(&matrix, PSTR("TKC1800")); |
| 135 | 143 | ||
| 136 | uint8_t layer = biton32(layer_state); | 144 | uint8_t layer = biton32(layer_state); |
| 137 | 145 | ||
| 138 | char buf[40]; | 146 | char buf[40]; |
| @@ -148,4 +156,4 @@ void iota_gfx_task_user(void) { | |||
| 148 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | 156 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); |
| 149 | matrix_write(&matrix, led); | 157 | matrix_write(&matrix, led); |
| 150 | matrix_update(&display, &matrix); | 158 | matrix_update(&display, &matrix); |
| 151 | } \ No newline at end of file | 159 | } |
diff --git a/keyboards/tkc1800/keymaps/smt/config.h b/keyboards/tkc1800/keymaps/smt/config.h index 30973348a..ee142927f 100644 --- a/keyboards/tkc1800/keymaps/smt/config.h +++ b/keyboards/tkc1800/keymaps/smt/config.h | |||
| @@ -14,10 +14,7 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #ifndef CONFIG_USER_H | 17 | #pragma once |
| 18 | #define CONFIG_USER_H | ||
| 19 | |||
| 20 | #include "../../config.h" | ||
| 21 | 18 | ||
| 22 | #define USE_I2C | 19 | #define USE_I2C |
| 23 | #define SSD1306OLED | 20 | #define SSD1306OLED |
| @@ -25,5 +22,3 @@ | |||
| 25 | #define SSD1306_ADDRESS 0x3C | 22 | #define SSD1306_ADDRESS 0x3C |
| 26 | 23 | ||
| 27 | // place overrides here | 24 | // place overrides here |
| 28 | |||
| 29 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc1800/keymaps/smt/keymap.c index 6683416e3..9f506b443 100644 --- a/keyboards/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc1800/keymaps/smt/keymap.c | |||
| @@ -13,30 +13,23 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "tkc1800.h" | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "LUFA/Drivers/Peripheral/TWI.h" | 17 | #include "LUFA/Drivers/Peripheral/TWI.h" |
| 18 | #include "i2c.h" | 18 | #include "i2c.h" |
| 19 | #include "ssd1306.h" | 19 | #include "ssd1306.h" |
| 20 | 20 | ||
| 21 | #define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 22 | #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 23 | |||
| 24 | // Custom macros | 21 | // Custom macros |
| 25 | #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl | 22 | #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl |
| 26 | #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) | 23 | #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) |
| 27 | #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift | 24 | #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift |
| 28 | 25 | ||
| 29 | // Helpful defines | ||
| 30 | #define ______ KC_TRNS | ||
| 31 | #define XXXXXX KC_NO | ||
| 32 | |||
| 33 | //Layers | 26 | //Layers |
| 34 | 27 | ||
| 35 | enum { | 28 | enum { |
| 36 | QWERTY = 0, | 29 | QWERTY = 0, |
| 37 | COLEMAK, | 30 | COLEMAK, |
| 38 | DVORAK, | 31 | DVORAK, |
| 39 | FUNCTION, | 32 | FUNCTION, |
| 40 | }; | 33 | }; |
| 41 | 34 | ||
| 42 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | 35 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() |
| @@ -62,15 +55,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 62 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | 55 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | |
| 63 | * `---------------------------------------------------------------------------------' | 56 | * `---------------------------------------------------------------------------------' |
| 64 | */ | 57 | */ |
| 65 | [QWERTY] = LAYOUT( | 58 | [QWERTY] = LAYOUT( |
| 66 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 59 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 67 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 60 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 68 | KC_GRV, 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_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 61 | KC_GRV, 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_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 69 | HPR_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_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | 62 | HPR_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_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 70 | CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 63 | CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 71 | KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 64 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 72 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 65 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 73 | ), | 66 | ), |
| 74 | /* Keymap COLEMAK: (Colemak Layer) Default Layer | 67 | /* Keymap COLEMAK: (Colemak Layer) Default Layer |
| 75 | * ,-------------------------------------------------------. ,-------------------. | 68 | * ,-------------------------------------------------------. ,-------------------. |
| 76 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | 69 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| |
| @@ -88,15 +81,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 88 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | 81 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | |
| 89 | * `---------------------------------------------------------------------------------' | 82 | * `---------------------------------------------------------------------------------' |
| 90 | */ | 83 | */ |
| 91 | [COLEMAK] = LAYOUT( | 84 | [COLEMAK] = LAYOUT( |
| 92 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 85 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 93 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 86 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 94 | KC_GRV, 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_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 87 | KC_GRV, 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_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 95 | HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | 88 | HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 96 | CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 89 | CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 97 | KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT,KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 90 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 98 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 91 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 99 | ), | 92 | ), |
| 100 | /* Keymap DVORAK: (Dvorak Layer) Default Layer | 93 | /* Keymap DVORAK: (Dvorak Layer) Default Layer |
| 101 | * ,-------------------------------------------------------. ,-------------------. | 94 | * ,-------------------------------------------------------. ,-------------------. |
| 102 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | 95 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| |
| @@ -114,50 +107,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 114 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | 107 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | |
| 115 | * `---------------------------------------------------------------------------------' | 108 | * `---------------------------------------------------------------------------------' |
| 116 | */ | 109 | */ |
| 117 | [DVORAK] = LAYOUT( | 110 | [DVORAK] = LAYOUT( |
| 118 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 111 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 119 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 112 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 120 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 113 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 121 | HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | 114 | HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 122 | CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 115 | CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 123 | KC_LSFT, XXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 116 | KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 124 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 117 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 125 | ), | 118 | ), |
| 126 | [FUNCTION] = LAYOUT( | 119 | [FUNCTION] = LAYOUT( |
| 127 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 120 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 128 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 121 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 129 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 122 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 130 | ______, ______, ______, ______, ______, ______, ______, QWERTY, COLEMAK,DVORAK, ______, ______, ______, ______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | 123 | _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 131 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, XXXXXX, ______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 124 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 132 | ______, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, BL_STEP,______, ______, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 125 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 133 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 126 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, _______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 134 | ), | 127 | ), |
| 135 | }; | 128 | }; |
| 136 | 129 | ||
| 137 | // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; | ||
| 138 | |||
| 139 | void persistent_default_layer_set(uint16_t default_layer) { | ||
| 140 | eeconfig_update_default_layer(default_layer); | ||
| 141 | default_layer_set(default_layer); | ||
| 142 | } | ||
| 143 | |||
| 144 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 130 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 145 | switch (keycode) { | 131 | switch (keycode) { |
| 146 | case QWERTY: | 132 | case QWERTY: |
| 147 | if (record->event.pressed) { | 133 | if (record->event.pressed) { |
| 148 | persistent_default_layer_set(1UL<<QWERTY); | 134 | set_single_persistent_default_layer(QWERTY); |
| 149 | } | 135 | } |
| 150 | return false; | 136 | return false; |
| 151 | break; | 137 | break; |
| 152 | case COLEMAK: | 138 | case COLEMAK: |
| 153 | if (record->event.pressed) { | 139 | if (record->event.pressed) { |
| 154 | persistent_default_layer_set(1UL<<COLEMAK); | 140 | set_single_persistent_default_layer(COLEMAK); |
| 155 | } | 141 | } |
| 156 | return false; | 142 | return false; |
| 157 | break; | 143 | break; |
| 158 | case DVORAK: | 144 | case DVORAK: |
| 159 | if (record->event.pressed) { | 145 | if (record->event.pressed) { |
| 160 | persistent_default_layer_set(1UL<<DVORAK); | 146 | set_single_persistent_default_layer(DVORAK); |
| 161 | } | 147 | } |
| 162 | return false; | 148 | return false; |
| 163 | break; | 149 | break; |
| @@ -168,25 +154,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 168 | void led_set_user(uint8_t usb_led) { | 154 | void led_set_user(uint8_t usb_led) { |
| 169 | 155 | ||
| 170 | } | 156 | } |
| 157 | |||
| 171 | void matrix_init_user(void) { | 158 | void matrix_init_user(void) { |
| 172 | #ifdef USE_I2C | 159 | #ifdef USE_I2C |
| 173 | i2c_master_init(); | 160 | i2c_master_init(); |
| 174 | #ifdef SSD1306OLED | 161 | #ifdef SSD1306OLED |
| 175 | // calls code for the SSD1306 OLED | 162 | // calls code for the SSD1306 OLED |
| 176 | _delay_ms(400); | 163 | _delay_ms(400); |
| 177 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 164 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); |
| 178 | iota_gfx_init(); // turns on the display | 165 | iota_gfx_init(); // turns on the display |
| 166 | #endif | ||
| 179 | #endif | 167 | #endif |
| 168 | #ifdef AUDIO_ENABLE | ||
| 169 | startup_user(); | ||
| 180 | #endif | 170 | #endif |
| 181 | #ifdef AUDIO_ENABLE | ||
| 182 | startup_user(); | ||
| 183 | #endif | ||
| 184 | } | 171 | } |
| 185 | 172 | ||
| 186 | void matrix_scan_user(void) { | 173 | void matrix_scan_user(void) { |
| 187 | #ifdef SSD1306OLED | 174 | #ifdef SSD1306OLED |
| 188 | iota_gfx_task(); // this is what updates the display continuously | 175 | iota_gfx_task(); // this is what updates the display continuously |
| 189 | #endif | 176 | #endif |
| 190 | } | 177 | } |
| 191 | 178 | ||
| 192 | void matrix_update(struct CharacterMatrix *dest, | 179 | void matrix_update(struct CharacterMatrix *dest, |
| @@ -198,11 +185,11 @@ void matrix_update(struct CharacterMatrix *dest, | |||
| 198 | } | 185 | } |
| 199 | 186 | ||
| 200 | void iota_gfx_task_user(void) { | 187 | void iota_gfx_task_user(void) { |
| 201 | #if DEBUG_TO_SCREEN | 188 | #if DEBUG_TO_SCREEN |
| 202 | if (debug_enable) { | 189 | if (debug_enable) { |
| 203 | return; | 190 | return; |
| 204 | } | 191 | } |
| 205 | #endif | 192 | #endif |
| 206 | 193 | ||
| 207 | struct CharacterMatrix matrix; | 194 | struct CharacterMatrix matrix; |
| 208 | 195 | ||
diff --git a/keyboards/tkc1800/keymaps/wkl/config.h b/keyboards/tkc1800/keymaps/wkl/config.h index 30973348a..ee142927f 100644 --- a/keyboards/tkc1800/keymaps/wkl/config.h +++ b/keyboards/tkc1800/keymaps/wkl/config.h | |||
| @@ -14,10 +14,7 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #ifndef CONFIG_USER_H | 17 | #pragma once |
| 18 | #define CONFIG_USER_H | ||
| 19 | |||
| 20 | #include "../../config.h" | ||
| 21 | 18 | ||
| 22 | #define USE_I2C | 19 | #define USE_I2C |
| 23 | #define SSD1306OLED | 20 | #define SSD1306OLED |
| @@ -25,5 +22,3 @@ | |||
| 25 | #define SSD1306_ADDRESS 0x3C | 22 | #define SSD1306_ADDRESS 0x3C |
| 26 | 23 | ||
| 27 | // place overrides here | 24 | // place overrides here |
| 28 | |||
| 29 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc1800/keymaps/wkl/keymap.c index e04c4d5c1..6f331c61c 100644 --- a/keyboards/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc1800/keymaps/wkl/keymap.c | |||
| @@ -13,25 +13,17 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "tkc1800.h" | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "LUFA/Drivers/Peripheral/TWI.h" | 17 | #include "LUFA/Drivers/Peripheral/TWI.h" |
| 18 | #include "i2c.h" | 18 | #include "i2c.h" |
| 19 | #include "ssd1306.h" | 19 | #include "ssd1306.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | #define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 23 | #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 24 | |||
| 25 | |||
| 26 | // Helpful defines | ||
| 27 | #define ______ KC_TRNS | ||
| 28 | #define XXXXXX KC_NO | ||
| 29 | |||
| 30 | //Layers | 22 | //Layers |
| 31 | 23 | ||
| 32 | enum { | 24 | enum { |
| 33 | BASE = 0, | 25 | BASE = 0, |
| 34 | FUNCTION, | 26 | FUNCTION, |
| 35 | }; | 27 | }; |
| 36 | 28 | ||
| 37 | bool screenWorks = 0; | 29 | bool screenWorks = 0; |
| @@ -56,61 +48,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 56 | * |-----------------------------------------------------------' |-------------------| | 48 | * |-----------------------------------------------------------' |-------------------| |
| 57 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | 49 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| |
| 58 | * |--------------------------------------------------------'----`--------------| | | 50 | * |--------------------------------------------------------'----`--------------| | |
| 59 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | 51 | * |Ctrl | Alt | Space | Fn |Ctrl |Left |Down|Rght| 0 | . | | |
| 60 | * `---------------------------------------------------------------------------------' | 52 | * `---------------------------------------------------------------------------------' |
| 61 | */ | 53 | */ |
| 62 | [BASE] = LAYOUT( | 54 | [BASE] = LAYOUT( |
| 63 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 55 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 64 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 56 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 65 | KC_GRV, 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, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 57 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 66 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | 58 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 67 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 59 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 68 | KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 60 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 69 | KC_LCTL, KC_LALT, XXXXXX, KC_SPC, XXXXXX, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 61 | KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 70 | ), | 62 | ), |
| 71 | [FUNCTION] = LAYOUT( | 63 | [FUNCTION] = LAYOUT( |
| 72 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 73 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 65 | _______, _______, _______, _______, \ |
| 74 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, RESET, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ |
| 75 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | 67 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 76 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 68 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ |
| 77 | KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, BL_STEP,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 69 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ |
| 78 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXX, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 70 | _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______ \ |
| 79 | ), | 71 | ), |
| 80 | }; | 72 | }; |
| 81 | 73 | ||
| 82 | // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; | ||
| 83 | |||
| 84 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 74 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 85 | return true; | 75 | return true; |
| 86 | } | 76 | } |
| 87 | 77 | ||
| 88 | void led_set_user(uint8_t usb_led) { | 78 | void led_set_user(uint8_t usb_led) { |
| 89 | 79 | ||
| 90 | } | 80 | } |
| 81 | |||
| 91 | void matrix_init_user(void) { | 82 | void matrix_init_user(void) { |
| 92 | #ifdef USE_I2C | 83 | #ifdef USE_I2C |
| 93 | i2c_master_init(); | 84 | i2c_master_init(); |
| 94 | #ifdef SSD1306OLED | 85 | #ifdef SSD1306OLED |
| 95 | // calls code for the SSD1306 OLED | 86 | // calls code for the SSD1306 OLED |
| 96 | _delay_ms(400); | 87 | _delay_ms(400); |
| 97 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 88 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); |
| 98 | if(iota_gfx_init()){ // turns on the display | 89 | if ( iota_gfx_init() ) { // turns on the display |
| 99 | screenWorks = 1; | 90 | screenWorks = 1; |
| 100 | } | 91 | } |
| 92 | #endif | ||
| 101 | #endif | 93 | #endif |
| 94 | #ifdef AUDIO_ENABLE | ||
| 95 | startup_user(); | ||
| 102 | #endif | 96 | #endif |
| 103 | #ifdef AUDIO_ENABLE | ||
| 104 | startup_user(); | ||
| 105 | #endif | ||
| 106 | } | 97 | } |
| 107 | 98 | ||
| 108 | void matrix_scan_user(void) { | 99 | void matrix_scan_user(void) { |
| 109 | #ifdef SSD1306OLED | 100 | #ifdef SSD1306OLED |
| 110 | if(screenWorks){ | 101 | if ( screenWorks ) { |
| 111 | iota_gfx_task(); // this is what updates the display continuously | 102 | iota_gfx_task(); // this is what updates the display continuously |
| 112 | }; | 103 | }; |
| 113 | #endif | 104 | #endif |
| 114 | } | 105 | } |
| 115 | 106 | ||
| 116 | void matrix_update(struct CharacterMatrix *dest, | 107 | void matrix_update(struct CharacterMatrix *dest, |
| @@ -122,17 +113,17 @@ void matrix_update(struct CharacterMatrix *dest, | |||
| 122 | } | 113 | } |
| 123 | 114 | ||
| 124 | void iota_gfx_task_user(void) { | 115 | void iota_gfx_task_user(void) { |
| 125 | #if DEBUG_TO_SCREEN | 116 | #if DEBUG_TO_SCREEN |
| 126 | if (debug_enable) { | 117 | if (debug_enable) { |
| 127 | return; | 118 | return; |
| 128 | } | 119 | } |
| 129 | #endif | 120 | #endif |
| 130 | 121 | ||
| 131 | struct CharacterMatrix matrix; | 122 | struct CharacterMatrix matrix; |
| 132 | 123 | ||
| 133 | matrix_clear(&matrix); | 124 | matrix_clear(&matrix); |
| 134 | matrix_write_P(&matrix, PSTR("TKC1800")); | 125 | matrix_write_P(&matrix, PSTR("TKC1800")); |
| 135 | 126 | ||
| 136 | uint8_t layer = biton32(layer_state); | 127 | uint8_t layer = biton32(layer_state); |
| 137 | 128 | ||
| 138 | char buf[40]; | 129 | char buf[40]; |
| @@ -148,4 +139,4 @@ void iota_gfx_task_user(void) { | |||
| 148 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | 139 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); |
| 149 | matrix_write(&matrix, led); | 140 | matrix_write(&matrix, led); |
| 150 | matrix_update(&display, &matrix); | 141 | matrix_update(&display, &matrix); |
| 151 | } \ No newline at end of file | 142 | } |
diff --git a/keyboards/tkc1800/keymaps/yanfali/config.h b/keyboards/tkc1800/keymaps/yanfali/config.h index e5de001a5..f1390cb03 100644 --- a/keyboards/tkc1800/keymaps/yanfali/config.h +++ b/keyboards/tkc1800/keymaps/yanfali/config.h | |||
| @@ -14,10 +14,7 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #ifndef CONFIG_USER_H | 17 | #pragma once |
| 18 | #define CONFIG_USER_H | ||
| 19 | |||
| 20 | #include "../../config.h" | ||
| 21 | 18 | ||
| 22 | //#define USE_I2C | 19 | //#define USE_I2C |
| 23 | //#define SSD1306OLED | 20 | //#define SSD1306OLED |
| @@ -25,5 +22,3 @@ | |||
| 25 | #define SSD1306_ADDRESS 0x3C | 22 | #define SSD1306_ADDRESS 0x3C |
| 26 | 23 | ||
| 27 | // place overrides here | 24 | // place overrides here |
| 28 | |||
| 29 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc1800/keymaps/yanfali/keymap.c index 292bdb0bb..8dad3446d 100644 --- a/keyboards/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc1800/keymaps/yanfali/keymap.c | |||
| @@ -13,20 +13,12 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "tkc1800.h" | 16 | #include QMK_KEYBOARD_H |
| 17 | #include "LUFA/Drivers/Peripheral/TWI.h" | 17 | #include "LUFA/Drivers/Peripheral/TWI.h" |
| 18 | #include "i2c.h" | 18 | #include "i2c.h" |
| 19 | #include "ssd1306.h" | 19 | #include "ssd1306.h" |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | #define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 23 | #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 24 | |||
| 25 | |||
| 26 | // Helpful defines | ||
| 27 | #define ______ KC_TRNS | ||
| 28 | #define XXXXXX KC_NO | ||
| 29 | |||
| 30 | //Layers | 22 | //Layers |
| 31 | 23 | ||
| 32 | enum { | 24 | enum { |
| @@ -58,53 +50,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 58 | * `---------------------------------------------------------------------------------' | 50 | * `---------------------------------------------------------------------------------' |
| 59 | */ | 51 | */ |
| 60 | [BASE] = LAYOUT( | 52 | [BASE] = LAYOUT( |
| 61 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 53 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ |
| 62 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 54 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ |
| 63 | KC_GRV, 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, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 55 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ |
| 64 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | 56 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ |
| 65 | LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 57 | LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ |
| 66 | KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 58 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ |
| 67 | KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 59 | KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ |
| 68 | ), | 60 | ), |
| 69 | [FUNCTION] = LAYOUT( | 61 | [FUNCTION] = LAYOUT( |
| 70 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | 62 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 71 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | 63 | _______, _______, _______, _______, \ |
| 72 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, RESET, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | 64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ |
| 73 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | 65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 74 | LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | 66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ |
| 75 | KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ | 67 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ |
| 76 | KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT | 68 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ |
| 77 | ), | 69 | ), |
| 78 | }; | 70 | }; |
| 79 | 71 | ||
| 80 | // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; | ||
| 81 | |||
| 82 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 72 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 83 | return true; | 73 | return true; |
| 84 | } | 74 | } |
| 85 | 75 | ||
| 86 | void led_set_user(uint8_t usb_led) { | 76 | void led_set_user(uint8_t usb_led) { |
| 87 | 77 | ||
| 88 | } | 78 | } |
| 79 | |||
| 89 | void matrix_init_user(void) { | 80 | void matrix_init_user(void) { |
| 90 | #ifdef USE_I2C | 81 | #ifdef USE_I2C |
| 91 | i2c_master_init(); | 82 | i2c_master_init(); |
| 92 | #ifdef SSD1306OLED | 83 | #ifdef SSD1306OLED |
| 93 | // calls code for the SSD1306 OLED | 84 | // calls code for the SSD1306 OLED |
| 94 | _delay_ms(400); | 85 | _delay_ms(400); |
| 95 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 86 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); |
| 96 | iota_gfx_init(); // turns on the display | 87 | iota_gfx_init(); // turns on the display |
| 88 | #endif | ||
| 97 | #endif | 89 | #endif |
| 90 | #ifdef AUDIO_ENABLE | ||
| 91 | startup_user(); | ||
| 98 | #endif | 92 | #endif |
| 99 | #ifdef AUDIO_ENABLE | ||
| 100 | startup_user(); | ||
| 101 | #endif | ||
| 102 | } | 93 | } |
| 103 | 94 | ||
| 104 | void matrix_scan_user(void) { | 95 | void matrix_scan_user(void) { |
| 105 | #ifdef SSD1306OLED | 96 | #ifdef SSD1306OLED |
| 106 | iota_gfx_task(); // this is what updates the display continuously | 97 | iota_gfx_task(); // this is what updates the display continuously |
| 107 | #endif | 98 | #endif |
| 108 | } | 99 | } |
| 109 | 100 | ||
| 110 | void matrix_update(struct CharacterMatrix *dest, | 101 | void matrix_update(struct CharacterMatrix *dest, |
| @@ -116,11 +107,11 @@ void matrix_update(struct CharacterMatrix *dest, | |||
| 116 | } | 107 | } |
| 117 | 108 | ||
| 118 | void iota_gfx_task_user(void) { | 109 | void iota_gfx_task_user(void) { |
| 119 | #if DEBUG_TO_SCREEN | 110 | #if DEBUG_TO_SCREEN |
| 120 | if (debug_enable) { | 111 | if (debug_enable) { |
| 121 | return; | 112 | return; |
| 122 | } | 113 | } |
| 123 | #endif | 114 | #endif |
| 124 | 115 | ||
| 125 | struct CharacterMatrix matrix; | 116 | struct CharacterMatrix matrix; |
| 126 | 117 | ||
diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk index 56c2d4b74..35da90d07 100644 --- a/keyboards/tkc1800/rules.mk +++ b/keyboards/tkc1800/rules.mk | |||
| @@ -51,21 +51,21 @@ OPT_DEFS += -DBOOTLOADER_SIZE=8192 | |||
| 51 | # Build Options | 51 | # Build Options |
| 52 | # change yes to no to disable | 52 | # change yes to no to disable |
| 53 | # | 53 | # |
| 54 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) | 54 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) |
| 55 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | 55 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 56 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | 56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 57 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | 57 | CONSOLE_ENABLE = yes # Console for debug(+400) |
| 58 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | 58 | COMMAND_ENABLE = yes # Commands for debug and configuration |
| 59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 60 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | 60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 62 | NKRO_ENABLE ?= yes # USB Nkey Rollover | 62 | NKRO_ENABLE = yes # USB Nkey Rollover |
| 63 | BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default | 63 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default |
| 64 | RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 64 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
| 65 | MIDI_ENABLE ?= no # MIDI controls | 65 | MIDI_ENABLE = no # MIDI controls |
| 66 | UNICODE_ENABLE ?= no # Unicode | 66 | UNICODE_ENABLE = no # Unicode |
| 67 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | 67 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 68 | AUDIO_ENABLE ?= no # Audio output on port C6 | 68 | AUDIO_ENABLE = no # Audio output on port C6 |
| 69 | 69 | ||
| 70 | SRC = i2c.c \ | 70 | SRC = i2c.c \ |
| 71 | ssd1306.c | 71 | ssd1306.c |
diff --git a/keyboards/tkc1800/tkc1800.h b/keyboards/tkc1800/tkc1800.h index 0a872ef88..4d1686cf1 100644 --- a/keyboards/tkc1800/tkc1800.h +++ b/keyboards/tkc1800/tkc1800.h | |||
| @@ -13,8 +13,7 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #ifndef TKC1800_H | 16 | #pragma once |
| 17 | #define TKC1800_H | ||
| 18 | 17 | ||
| 19 | #include "quantum.h" | 18 | #include "quantum.h" |
| 20 | 19 | ||
| @@ -24,16 +23,14 @@ | |||
| 24 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \ | 23 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \ |
| 25 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ | 24 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ |
| 26 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ | 25 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ |
| 27 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ | 26 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ |
| 28 | K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ | 27 | K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ |
| 29 | ) { \ | 28 | ) { \ |
| 30 | { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ | 29 | { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ |
| 31 | { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1F, K1G, K1H, K1I }, \ | 30 | { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1F, K1G, K1H, K1I }, \ |
| 32 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ | 31 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ |
| 33 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ | 32 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ |
| 34 | { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ | 33 | { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ |
| 35 | { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ | 34 | { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ |
| 36 | { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, K6B, K6C, K6D, K6E, KC_NO, K6G, K6H, K6I } \ | 35 | { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, K6B, K6C, K6D, K6E, KC_NO, K6G, K6H, K6I } \ |
| 37 | } | 36 | } |
| 38 | |||
| 39 | #endif | ||
