diff options
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 4d1b8e0f24..e154770d72 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 b13620de3b..92a5f1b38b 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 f06a16c157..3e3ab1484d 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 30973348ae..ee142927f3 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 cc19de3bda..5455934a30 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 30973348ae..ee142927f3 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 6683416e36..9f506b443b 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 | . | | * `--------------- |