diff options
author | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-01-18 16:32:21 +0100 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-01-18 16:32:21 +0100 |
commit | 12406c646f917b7451ec265d767f07a34ecf906a (patch) | |
tree | 6a5bb1502bd082cd851471187bef3b59de1139d4 | |
parent | e2f7c3d5a59933519e8cf7b4d9176587334d7b70 (diff) | |
download | qmk_firmware-12406c646f917b7451ec265d767f07a34ecf906a.tar.gz qmk_firmware-12406c646f917b7451ec265d767f07a34ecf906a.tar.xz |
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
-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 @@ The Key Company TKC1800 -=== -![TKC1800](https://imgur.com/a/Xlttp) +[TKC1800 Image Gallery](https://imgur.com/a/Xlttp) The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) -Hardware Supported: AT90USB1286 -Hardware Availability: Via GB +Hardware Supported: TKC1800 PCB +Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1800) Make example for this keyboard (after setting up your build environment): - make tkc1800 + make tkc1800:default -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 +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 along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -182,5 +181,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#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 @@ "url": "", "maintainer": "qmk", "width": 19.5, - "height": 7, + "height": 7.25, "layouts": { "LAYOUT": { "key_count": 107, "layout": [ - { - "label": "Esc", - "x": 0, - "y": 0 - }, - { - "label": "F1", - "x": 1.25, - "y": 0 - }, - { - "label": "F2", - "x": 2.25, - "y": 0 - }, - { - "label": "F3", - "x": 3.25, - "y": 0 - }, - { - "label": "F4", - "x": 4.25, - "y": 0 - }, - { - "label": "F5", - "x": 5.5, - "y": 0 - }, - { - "label": "F6", - "x": 6.5, - "y": 0 - }, - { - "label": "F7", - "x": 7.5, - "y": 0 - }, - { - "label": "F8", - "x": 8.5, - "y": 0 - }, - { - "label": "F9", - "x": 9.75, - "y": 0 - }, - { - "label": "F10", - "x": 10.75, - "y": 0 - }, - { - "label": "F11", - "x": 11.75, - "y": 0 - }, - { - "label": "F12", - "x": 12.75, - "y": 0 - }, - { - "label": "Insert", - "x": 15.5, - "y": 0 - }, - { - "label": "Home", - "x": 16.5, - "y": 0 - }, - { - "label": "Pg Up", - "x": 17.5, - "y": 0 - }, - { - "label": "Prt Sc", - "x": 18.5, - "y": 0 - }, - { - "label": "Delete", - "x": 15.5, - "y": 1 - }, - { - "label": "End", - "x": 16.5, - "y": 1 - }, - { - "label": "Pg Dn", - "x": 17.5, - "y": 1 - }, - { - "label": "Scroll Lock", - "x": 18.5, - "y": 1 - }, - { - "label": "~", - "x": 0, - "y": 2 - }, - { - "label": "!", - "x": 1, - "y": 2 - }, - { - "label": "@", - "x": 2, - "y": 2 - }, - { - "label": "#", - "x": 3, - "y": 2 - }, - { - "label": "$", - "x": 4, - "y": 2 - }, - { - "label": "%", - "x": 5, - "y": 2 - }, - { - "label": "^", - "x": 6, - "y": 2 - }, - { - "label": "&", - "x": 7, - "y": 2 - }, - { - "label": "*", - "x": 8, - "y": 2 - }, - { - "label": "(", - "x": 9, - "y": 2 - }, - { - "label": ")", - "x": 10, - "y": 2 - }, - { - "label": "_", - "x": 11, - "y": 2 - }, - { - "label": "+", - "x": 12, - "y": 2 - }, - { - "label": "Backspace", - "x": 13, - "y": 2 - }, - { - "x": 14, - "y": 2 - }, - { - "label": "Num Lock", - "x": 15.5, - "y": 2 - }, - { - "label": "/", - "x": 16.5, - "y": 2 - }, - { - "label": "*", - "x": 17.5, - "y": 2 - }, - { - "label": "-", - "x": 18.5, - "y": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 3, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 3 - }, - { - "label": "W", - "x": 2.5, - "y": 3 - }, - { - "label": "E", - "x": 3.5, - "y": 3 - }, - { - "label": "R", - "x": 4.5, - "y": 3 - }, - { - "label": "T", - "x": 5.5, - "y": 3 - }, - { - "label": "Y", - "x": 6.5, - "y": 3 - }, - { - "label": "U", - "x": 7.5, - "y": 3 - }, - { - "label": "I", - "x": 8.5, - "y": 3 - }, - { - "label": "O", - "x": 9.5, - "y": 3 - }, - { - "label": "P", - "x": 10.5, - "y": 3 - }, - { - "label": "{", - "x": 11.5, - "y": 3 - }, - { - "label": "}", - "x": 12.5, - "y": 3 - }, - { - "label": "|", - "x": 13.5, - "y": 3, - "w": 1.5 - }, - { - "label": "7", - "x": 15.5, - "y": 3 - }, - { - "label": "8", - "x": 16.5, - "y": 3 - }, - { - "label": "9", - "x": 17.5, - "y": 3 - }, - { - "label": "+", - "x": 18.5, - "y": 3 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 4, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 4 - }, - { - "label": "S", - "x": 2.75, - "y": 4 - }, - { - "label": "D", - "x": 3.75, - "y": 4 - }, - { - "label": "F", - "x": 4.75, - "y": 4 - }, - { - "label": "G", - "x": 5.75, - "y": 4 - }, - { - "label": "H", - "x": 6.75, - "y": 4 - }, - { - "label": "J", - "x": 7.75, - "y": 4 - }, - { - "label": "K", - "x": 8.75, - "y": 4 - }, - { - "label": "L", - "x": 9.75, - "y": 4 - }, - { - "label": ":", - "x": 10.75, - "y": 4 - }, - { - "label": "\"", - "x": 11.75, - "y": 4 - }, - { - "x": 12.75, - "y": 4 - }, - { - "label": "Enter", - "x": 13.75, - "y": 4, - "w": 1.25 - }, - { - "label": "4", - "x": 15.5, - "y": 4 - }, - { - "label": "5", - "x": 16.5, - "y": 4 - }, - { - "label": "6", - "x": 17.5, - "y": 4 - }, - { - "x": 18.5, - "y": 4 - }, - { - "x": 0, - "y": 5 - }, - { - "label": "Shift", - "x": 1, - "y": 5, - "w": 1.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 5 - }, - { - "label": "X", - "x": 3.25, - "y": 5 - }, - { - "label": "C", - "x": 4.25, - "y": 5 - }, - { - "label": "V", - "x": 5.25, - "y": 5 - }, - { - "label": "B", - "x": 6.25, - "y": 5 - }, - { - "label": "N", - "x": 7.25, - "y": 5 - }, - { - "label": "M", - "x": 8.25, - "y": 5 - }, - { - "label": "<", - "x": 9.25, - "y": 5 - }, - { - "label": ">", - "x": 10.25, - "y": 5 - }, - { - "label": "?", - "x": 11.25, - "y": 5 - }, - { - "label": "Shift", - "x": 12.25, - "y": 5, - "w": 1.75 - }, - { - "label": "\\u2191", - "x": 14.25, - "y": 5 - }, - { - "label": "1", - "x": 15.5, - "y": 5 - }, - { - "label": "2", - "x": 16.5, - "y": 5 - }, - { - "label": "3", - "x": 17.5, - "y": 5 - }, - { - "label": "Enter", - "x": 18.5, - "y": 5 - }, - { - "label": "Ctrl", - "x": 0, - "y": 6, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 6, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 6, - "w": 1.25 - }, - { - "x": 3.75, - "y": 6, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 6 - }, - { - "label": "Win", - "x": 11, - "y": 6 - }, - { - "label": "Fn", - "x": 12, - "y": 6 - }, - { - "label": "\\u2190", - "x": 13.25, - "y": 6 - }, - { - "label": "\\u2193", - "x": 14.25, - "y": 6 - }, - { - "label": "\\u2192", - "x": 15.25, - "y": 6 - }, - { - "label": "0", - "x": 16.5, - "y": 6 - }, - { - "label": ".", - "x": 17.5, - "y": 6 - }, - { - "x": 18.5, - "y": 6 - } + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 1.25, "y": 0 }, + { "label": "F2", "x": 2.25, "y": 0 }, + { "label": "F3", "x": 3.25, "y": 0 }, + { "label": "F4", "x": 4.25, "y": 0 }, + { "label": "F5", "x": 5.5, "y": 0 }, + { "label": "F6", "x": 6.5, "y": 0 }, + { "label": "F7", "x": 7.5, "y": 0 }, + { "label": "F8", "x": 8.5, "y": 0 }, + { "label": "F9", "x": 9.75, "y": 0 }, + { "label": "F10", "x": 10.75, "y": 0 }, + { "label": "F11", "x": 11.75, "y": 0 }, + { "label": "F12", "x": 12.75, "y": 0 }, + { "label": "Insert", "x": 15.5, "y": 0 }, + { "label": "Home", "x": 16.5, "y": 0 }, + { "label": "Page Up", "x": 17.5, "y": 0 }, + { "label": "Print Screen", "x": 18.5, "y": 0 }, + { "label": "Delete", "x": 15.5, "y": 1 }, + { "label": "End", "x": 16.5, "y": 1 }, + { "label": "Page Down", "x": 17.5, "y": 1 }, + { "label": "Scroll Lock", "x": 18.5, "y": 1 }, + { "label": "`", "x": 0, "y": 2 }, + { "label": "1", "x": 1, "y": 2 }, + { "label": "2", "x": 2, "y": 2 }, + { "label": "3", "x": 3, "y": 2 }, + { "label": "4", "x": 4, "y": 2 }, + { "label": "5", "x": 5, "y": 2 }, + { "label": "6", "x": 6, "y": 2 }, + { "label": "7", "x": 7, "y": 2 }, + { "label": "8", "x": 8, "y": 2 }, + { "label": "9", "x": 9, "y": 2 }, + { "label": "0", "x": 10, "y": 2 }, + { "label": "-", "x": 11, "y": 2 }, + { "label": "=", "x": 12, "y": 2 }, + { "label": "Backspace", "x": 13, "y": 2 }, + { "label": "Backspace_Right", "x": 14, "y": 2 }, + { "label": "Num Lock", "x": 15.5, "y": 2 }, + { "label": "/", "x": 16.5, "y": 2 }, + { "label": "*", "x": 17.5, "y": 2 }, + { "label": "Pause", "x": 18.5, "y": 2 }, + { "label": "Tab", "x": 0, "y": 3, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 3 }, + { "label": "W", "x": 2.5, "y": 3 }, + { "label": "E", "x": 3.5, "y": 3 }, + { "label": "R", "x": 4.5, "y": 3 }, + { "label": "T", "x": 5.5, "y": 3 }, + { "label": "Y", "x": 6.5, "y": 3 }, + { "label": "U", "x": 7.5, "y": 3 }, + { "label": "I", "x": 8.5, "y": 3 }, + { "label": "O", "x": 9.5, "y": 3 }, + { "label": "P", "x": 10.5, "y": 3 }, + { "label": "[", "x": 11.5, "y": 3 }, + { "label": "]", "x": 12.5, "y": 3 }, + { "label": "\\", "x": 13.5, "y": 3, "w": 1.5 }, + { "label": "7", "x": 15.5, "y": 3 }, + { "label": "8", "x": 16.5, "y": 3 }, + { "label": "9", "x": 17.5, "y": 3 }, + { "label": "-", "x": 18.5, "y": 3 }, + { "label": "Caps Lock", "x": 0, "y": 4, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 4 }, + { "label": "S", "x": 2.75, "y": 4 }, + { "label": "D", "x": 3.75, "y": 4 }, + { "label": "F", "x": 4.75, "y": 4 }, + { "label": "G", "x": 5.75, "y": 4 }, + { "label": "H", "x": 6.75, "y": 4 }, + { "label": "J", "x": 7.75, "y": 4 }, + { "label": "K", "x": 8.75, "y": 4 }, + { "label": "L", "x": 9.75, "y": 4 }, + { "label": ";", "x": 10.75, "y": 4 }, + { "label": "'", "x": 11.75, "y": 4 }, + { "label": "ISO Hash", "x": 12.75, "y": 4 }, + { "label": "Enter", "x": 13.75, "y": 4, "w": 1.25 }, + { "label": "4", "x": 15.5, "y": 4 }, + { "label": "5", "x": 16.5, "y": 4 }, + { "label": "6", "x": 17.5, "y": 4 }, + { "label": "+", "x": 18.5, "y": 4 }, + { "label": "Shift", "x": 0, "y": 5, "w": 1.25 }, + { "label": "ISO Backslash", "x": 1.25, "y": 5 }, + { "label": "Z", "x": 2.25, "y": 5 }, + { "label": "X", "x": 3.25, "y": 5 }, + { "label": "C", "x": 4.25, "y": 5 }, + { "label": "V", "x": 5.25, "y": 5 }, + { "label": "B", "x": 6.25, "y": 5 }, + { "label": "N", "x": 7.25, "y": 5 }, + { "label": "M", "x": 8.25, "y": 5 }, + { "label": ",", "x": 9.25, "y": 5 }, + { "label": ".", "x": 10.25, "y": 5 }, + { "label": "/", "x": 11.25, "y": 5 }, + { "label": "Shift", "x": 12.25, "y": 5, "w": 1.75 }, + { "label": "Up", "x": 14.25, "y": 5.25 }, + { "label": "1", "x": 15.5, "y": 5 }, + { "label": "2", "x": 16.5, "y": 5 }, + { "label": "3", "x": 17.5, "y": 5 }, + { "label": "Enter_Top", "x": 18.5, "y": 5 }, + { "label": "Ctrl", "x": 0, "y": 6, "w": 1.25 }, + { "label": "GUI", "x": 1.25, "y": 6, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 6, "w": 1.25 }, + { "label": "Space", "x": 3.75, "y": 6, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 6 }, + { "label": "Fn", "x": 11, "y": 6 }, + { "label": "Ctrl", "x": 12, "y": 6 }, + { "label": "Left", "x": 13.25, "y": 6.25 }, + { "label": "Down", "x": 14.25, "y": 6.25 }, + { "label": "Right", "x": 15.25, "y": 6.25 }, + { "label": "0", "x": 16.5, "y": 6 }, + { "label": ".", "x": 17.5, "y": 6 }, + { "label": "Enter", "x": 18.5, "y": 6 } ] } } 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 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define USE_I2C #define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#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 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) - - -// Helpful defines -#define ______ KC_TRNS -#define XXXXXX KC_NO - //Layers enum { - BASE = 0, - FUNCTION, + BASE = 0, + FUNCTION, }; bool screenWorks = 0; @@ -56,61 +48,77 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------' |-------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| * |--------------------------------------------------------'----`--------------| | - * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | + * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [BASE] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - 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 - ), - [FUNCTION] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [BASE] = LAYOUT( + 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, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, \ + 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, \ + 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, \ + 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, \ + 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 \ + ), + /* Keymap FUNCTION: (Function Layer) + * ,-------------------------------------------------------. ,-------------------. + * | | | | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' |-------------------| + * | | | | | + * ,-----------------------------------------------------------. |-------------------| + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |--------------------------------------------------------'----`--------------| | + * | | | | | | | | | | | | . | | + * `---------------------------------------------------------------------------------' + */ + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { } + void matrix_init_user(void) { #ifdef USE_I2C i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if(iota_gfx_init()){ // turns on the display - screenWorks = 1; - } + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + if ( iota_gfx_init() ) { // turns on the display + screenWorks = 1; + } + #endif #endif + #ifdef AUDIO_ENABLE + startup_user(); #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif } void matrix_scan_user(void) { - #ifdef SSD1306OLED - if(screenWorks){ - iota_gfx_task(); // this is what updates the display continuously - }; - #endif + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -122,17 +130,17 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; matrix_clear(&matrix); matrix_write_P(&matrix, PSTR("TKC1800")); - + uint8_t layer = biton32(layer_state); char buf[40]; @@ -148,4 +156,4 @@ void iota_gfx_task_user(void) { (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); matrix_write(&matrix, led); matrix_update(&display, &matrix); -}
\ No newline at end of file +} 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 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define USE_I2C #define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#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 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -// Helpful defines -#define ______ KC_TRNS -#define XXXXXX KC_NO - //Layers enum { - QWERTY = 0, - COLEMAK, - DVORAK, - FUNCTION, + QWERTY = 0, + COLEMAK, + DVORAK, + FUNCTION, }; //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] = { * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [QWERTY] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - 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 - ), + [QWERTY] = LAYOUT( + 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, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, \ + 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, \ + 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, \ + 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, \ + 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 \ + ), /* Keymap COLEMAK: (Colemak Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. * |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] = { * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [COLEMAK] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - 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 - ), + [COLEMAK] = LAYOUT( + 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, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, \ + 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, \ + 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, \ + 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, \ + 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 \ + ), /* Keymap DVORAK: (Dvorak Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. * |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] = { * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [DVORAK] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - 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 - ), - [FUNCTION] = LAYOUT( - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - ______, ______, ______, ______, ______, ______, ______, QWERTY, COLEMAK,DVORAK, ______, ______, ______, ______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, XXXXXX, ______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - ______, 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, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [DVORAK] = LAYOUT( + 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, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, \ + 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, \ + 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, \ + 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, \ + 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 \ + ), + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + _______, 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, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, _______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - persistent_default_layer_set(1UL<<QWERTY); + set_single_persistent_default_layer(QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<COLEMAK); + set_single_persistent_default_layer(COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - persistent_default_layer_set(1UL<<DVORAK); + set_single_persistent_default_layer(DVORAK); } return false; break; @@ -168,25 +154,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { } + void matrix_init_user(void) { #ifdef USE_I2C i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display + #endif #endif + #ifdef AUDIO_ENABLE + startup_user(); #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif } void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -198,11 +185,11 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; 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 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define USE_I2C #define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#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 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) - - -// Helpful defines -#define ______ KC_TRNS -#define XXXXXX KC_NO - //Layers enum { - BASE = 0, - FUNCTION, + BASE = 0, + FUNCTION, }; bool screenWorks = 0; @@ -56,61 +48,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------' |-------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| * |--------------------------------------------------------'----`--------------| | - * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | + * |Ctrl | Alt | Space | Fn |Ctrl |Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [BASE] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - KC_LCTL, KC_LALT, XXXXXX, KC_SPC, XXXXXX, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), - [FUNCTION] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXX, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [BASE] = LAYOUT( + 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, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, \ + 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, \ + 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, \ + 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, \ + KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { } + void matrix_init_user(void) { #ifdef USE_I2C i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if(iota_gfx_init()){ // turns on the display - screenWorks = 1; - } + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + if ( iota_gfx_init() ) { // turns on the display + screenWorks = 1; + } + #endif #endif + #ifdef AUDIO_ENABLE + startup_user(); #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif } void matrix_scan_user(void) { - #ifdef SSD1306OLED - if(screenWorks){ - iota_gfx_task(); // this is what updates the display continuously - }; - #endif + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -122,17 +113,17 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; matrix_clear(&matrix); matrix_write_P(&matrix, PSTR("TKC1800")); - + uint8_t layer = biton32(layer_state); char buf[40]; @@ -148,4 +139,4 @@ void iota_gfx_task_user(void) { (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); matrix_write(&matrix, led); matrix_update(&display, &matrix); -}
\ No newline at end of file +} 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 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once //#define USE_I2C //#define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#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 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) - - -// Helpful defines -#define ______ KC_TRNS -#define XXXXXX KC_NO - //Layers enum { @@ -58,53 +50,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------------------------' */ [BASE] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - 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 + 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, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, \ + 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, \ + 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, \ + 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, \ + 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 \ ), [FUNCTION] = LAYOUT( - 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, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - 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, \ - 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, \ - 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, \ - 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, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { } + void matrix_init_user(void) { #ifdef USE_I2C i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display + #endif #endif + #ifdef AUDIO_ENABLE + startup_user(); #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif } void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -116,11 +107,11 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; 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 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= yes # USB Nkey Rollover -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 SRC = i2c.c \ 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 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TKC1800_H -#define TKC1800_H +#pragma once #include "quantum.h" @@ -24,16 +23,14 @@ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ - K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ + K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ ) { \ - { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ - { 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 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ - { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ - { 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 } \ + { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ + { 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 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ + { 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 } \ } - -#endif |