diff options
| author | TerryMathews <terry@terrymathews.net> | 2020-07-28 01:34:18 -0400 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-08-29 14:30:02 -0700 |
| commit | 4764aa8711cadc2776fde7641e97e280c4ac55c5 (patch) | |
| tree | 3d756581c9fa601ae9a3fdb4311739be03e2005f /keyboards/tkc/tkc1800 | |
| parent | e6266b19be46c1340209bdd0a6c519452d5b9f2a (diff) | |
| download | qmk_firmware-4764aa8711cadc2776fde7641e97e280c4ac55c5.tar.gz qmk_firmware-4764aa8711cadc2776fde7641e97e280c4ac55c5.zip | |
The Key Company project consolidation (#9547)
* Consolidate TKC projects and increase VIA keymap count to 4.
* Updated readme files.
* Removed config.h via limitation of 2 dynamic keymaps
* Reduce dynamic keymaps from 4 to 3 due to EEPROM space limitations.
* Update dynamic_keymap.c
* Restore 4 dynamic keymaps for VIA in TKC projects.
* Update quantum/dynamic_keymap.c
Diffstat (limited to 'keyboards/tkc/tkc1800')
| -rw-r--r-- | keyboards/tkc/tkc1800/README.md | 17 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/config.h | 183 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/info.json | 121 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/default/keymap.c | 106 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/smt/keymap.c | 177 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/via/keymap.c | 130 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/wkl/keymap.c | 88 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c | 88 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/rules.mk | 33 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/tkc1800.c | 76 | ||||
| -rw-r--r-- | keyboards/tkc/tkc1800/tkc1800.h | 36 |
13 files changed, 1057 insertions, 0 deletions
diff --git a/keyboards/tkc/tkc1800/README.md b/keyboards/tkc/tkc1800/README.md new file mode 100644 index 000000000..5382b91b3 --- /dev/null +++ b/keyboards/tkc/tkc1800/README.md | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | The Key Company TKC1800 | ||
| 2 | |||
| 3 | [TKC1800 Image Gallery](https://imgur.com/a/Xlttp) | ||
| 4 | |||
| 5 | |||
| 6 | The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. | ||
| 7 | |||
| 8 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 9 | Hardware Supported: TKC1800 PCB | ||
| 10 | Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1800) | ||
| 11 | |||
| 12 | |||
| 13 | Make example for this keyboard (after setting up your build environment): | ||
| 14 | |||
| 15 | make tkc/tkc1800:default | ||
| 16 | |||
| 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/tkc/tkc1800/config.h b/keyboards/tkc/tkc1800/config.h new file mode 100644 index 000000000..9c35699c9 --- /dev/null +++ b/keyboards/tkc/tkc1800/config.h | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | 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/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x544B // "TK" | ||
| 24 | #define PRODUCT_ID 0x0001 | ||
| 25 | #define DEVICE_VER 0x0003 | ||
| 26 | #define MANUFACTURER The Key Company | ||
| 27 | #define PRODUCT TKC1800 | ||
| 28 | #define DESCRIPTION QMK keyboard firmware for TKC1800 | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 7 | ||
| 32 | #define MATRIX_COLS 19 | ||
| 33 | |||
| 34 | // ROWS: Top to bottom, COLS: Left to right | ||
| 35 | /* Row pin configuration | ||
| 36 | */ | ||
| 37 | #define MATRIX_ROW_PINS { F4, F3, F2, F1, F0, E1, E0 } | ||
| 38 | /* Column pin configuration | ||
| 39 | */ | ||
| 40 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } | ||
| 41 | #define UNUSED_PINS | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | #define BACKLIGHT_PIN B6 | ||
| 47 | #define BACKLIGHT_BREATHING | ||
| 48 | #define BACKLIGHT_LEVELS 3 | ||
| 49 | |||
| 50 | /* Underlight configuration | ||
| 51 | */ | ||
| 52 | #define RGB_DI_PIN D7 | ||
| 53 | #define RGBLIGHT_ANIMATIONS | ||
| 54 | #define RGBLED_NUM 30 // Number of LEDs | ||
| 55 | #define RGBLIGHT_HUE_STEP 5 | ||
| 56 | #define RGBLIGHT_SAT_STEP 10 | ||
| 57 | #define RGBLIGHT_VAL_STEP 10 | ||
| 58 | |||
| 59 | /* define if matrix has ghost */ | ||
| 60 | //#define MATRIX_HAS_GHOST | ||
| 61 | |||
| 62 | /* Set 0 if debouncing isn't needed */ | ||
| 63 | #define DEBOUNCE 5 | ||
| 64 | |||
| 65 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 66 | #define LOCKING_SUPPORT_ENABLE | ||
| 67 | /* Locking resynchronize hack */ | ||
| 68 | #define LOCKING_RESYNC_ENABLE | ||
| 69 | |||
| 70 | #define QMK_ESC_OUTPUT A0 // usually COL | ||
| 71 | #define QMK_ESC_INPUT F4 // usually ROW | ||
| 72 | #define QMK_LED D2 // NumLock on TKC1800 | ||
| 73 | //#define QMK_SPEAKER C6 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Force NKRO | ||
| 77 | * | ||
| 78 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 79 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 80 | * makefile for this to work.) | ||
| 81 | * | ||
| 82 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 83 | * until the next keyboard reset. | ||
| 84 | * | ||
| 85 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 86 | * fully operational during normal computer usage. | ||
| 87 | * | ||
| 88 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 89 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 90 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 91 | * power-up. | ||
| 92 | * | ||
| 93 | */ | ||
| 94 | //#define FORCE_NKRO | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Magic Key Options | ||
| 98 | * | ||
| 99 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 100 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 101 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 102 | * | ||
| 103 | * The options below allow the magic key functionality to be changed. This is | ||
| 104 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 105 | * | ||
| 106 | */ | ||
| 107 | |||
| 108 | /* control how magic key switches layers */ | ||
| 109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 111 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 112 | |||
| 113 | /* override magic key keymap */ | ||
| 114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 116 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 117 | //#define MAGIC_KEY_HELP1 H | ||
| 118 | //#define MAGIC_KEY_HELP2 SLASH | ||
| 119 | //#define MAGIC_KEY_DEBUG D | ||
| 120 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 121 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 122 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 123 | //#define MAGIC_KEY_VERSION V | ||
| 124 | //#define MAGIC_KEY_STATUS S | ||
| 125 | //#define MAGIC_KEY_CONSOLE C | ||
| 126 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
| 127 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
| 128 | //#define MAGIC_KEY_LAYER0 0 | ||
| 129 | //#define MAGIC_KEY_LAYER1 1 | ||
| 130 | //#define MAGIC_KEY_LAYER2 2 | ||
| 131 | //#define MAGIC_KEY_LAYER3 3 | ||
| 132 | //#define MAGIC_KEY_LAYER4 4 | ||
| 133 | //#define MAGIC_KEY_LAYER5 5 | ||
| 134 | //#define MAGIC_KEY_LAYER6 6 | ||
| 135 | //#define MAGIC_KEY_LAYER7 7 | ||
| 136 | //#define MAGIC_KEY_LAYER8 8 | ||
| 137 | //#define MAGIC_KEY_LAYER9 9 | ||
| 138 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
| 139 | //#define MAGIC_KEY_LOCK CAPS | ||
| 140 | //#define MAGIC_KEY_EEPROM E | ||
| 141 | //#define MAGIC_KEY_NKRO N | ||
| 142 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 143 | |||
| 144 | /* | ||
| 145 | * Feature disable options | ||
| 146 | * These options are also useful to firmware size reduction. | ||
| 147 | */ | ||
| 148 | |||
| 149 | /* disable debug print */ | ||
| 150 | //#define NO_DEBUG | ||
| 151 | |||
| 152 | /* disable print */ | ||
| 153 | //#define NO_PRINT | ||
| 154 | |||
| 155 | /* disable action features */ | ||
| 156 | //#define NO_ACTION_LAYER | ||
| 157 | //#define NO_ACTION_TAPPING | ||
| 158 | //#define NO_ACTION_ONESHOT | ||
| 159 | //#define NO_ACTION_MACRO | ||
| 160 | //#define NO_ACTION_FUNCTION | ||
| 161 | |||
| 162 | /* | ||
| 163 | * MIDI options | ||
| 164 | */ | ||
| 165 | |||
| 166 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 167 | //#define MIDI_ENABLE_STRICT 1 | ||
| 168 | |||
| 169 | /* enable basic MIDI features: | ||
| 170 | - MIDI notes can be sent when in Music mode is on | ||
| 171 | */ | ||
| 172 | //#define MIDI_BASIC | ||
| 173 | |||
| 174 | /* enable advanced MIDI features: | ||
| 175 | - MIDI notes can be added to the keymap | ||
| 176 | - Octave shift and transpose | ||
| 177 | - Virtual sustain, portamento, and modulation wheel | ||
| 178 | - etc. | ||
| 179 | */ | ||
| 180 | //#define MIDI_ADVANCED | ||
| 181 | |||
| 182 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 183 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
diff --git a/keyboards/tkc/tkc1800/info.json b/keyboards/tkc/tkc1800/info.json new file mode 100644 index 000000000..3e3ab1484 --- /dev/null +++ b/keyboards/tkc/tkc1800/info.json | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TKC1800", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 19.5, | ||
| 6 | "height": 7.25, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "key_count": 107, | ||
| 10 | "layout": [ | ||
| 11 | { "label": "Esc", "x": 0, "y": 0 }, | ||
| 12 | { "label": "F1", "x": 1.25, "y": 0 }, | ||
| 13 | { "label": "F2", "x": 2.25, "y": 0 }, | ||
| 14 | { "label": "F3", "x": 3.25, "y": 0 }, | ||
| 15 | { "label": "F4", "x": 4.25, "y": 0 }, | ||
| 16 | { "label": "F5", "x": 5.5, "y": 0 }, | ||
| 17 | { "label": "F6", "x": 6.5, "y": 0 }, | ||
| 18 | { "label": "F7", "x": 7.5, "y": 0 }, | ||
| 19 | { "label": "F8", "x": 8.5, "y": 0 }, | ||
| 20 | { "label": "F9", "x": 9.75, "y": 0 }, | ||
| 21 | { "label": "F10", "x": 10.75, "y": 0 }, | ||
| 22 | { "label": "F11", "x": 11.75, "y": 0 }, | ||
| 23 | { "label": "F12", "x": 12.75, "y": 0 }, | ||
| 24 | { "label": "Insert", "x": 15.5, "y": 0 }, | ||
| 25 | { "label": "Home", "x": 16.5, "y": 0 }, | ||
| 26 | { "label": "Page Up", "x": 17.5, "y": 0 }, | ||
| 27 | { "label": "Print Screen", "x": 18.5, "y": 0 }, | ||
| 28 | { "label": "Delete", "x": 15.5, "y": 1 }, | ||
| 29 | { "label": "End", "x": 16.5, "y": 1 }, | ||
| 30 | { "label": "Page Down", "x": 17.5, "y": 1 }, | ||
| 31 | { "label": "Scroll Lock", "x": 18.5, "y": 1 }, | ||
| 32 | { "label": "`", "x": 0, "y": 2 }, | ||
| 33 | { "label": "1", "x": 1, "y": 2 }, | ||
| 34 | { "label": "2", "x": 2, "y": 2 }, | ||
| 35 | { "label": "3", "x": 3, "y": 2 }, | ||
| 36 | { "label": "4", "x": 4, "y": 2 }, | ||
| 37 | { "label": "5", "x": 5, "y": 2 }, | ||
| 38 | { "label": "6", "x": 6, "y": 2 }, | ||
| 39 | { "label": "7", "x": 7, "y": 2 }, | ||
| 40 | { "label": "8", "x": 8, "y": 2 }, | ||
| 41 | { "label": "9", "x": 9, "y": 2 }, | ||
| 42 | { "label": "0", "x": 10, "y": 2 }, | ||
| 43 | { "label": "-", "x": 11, "y": 2 }, | ||
| 44 | { "label": "=", "x": 12, "y": 2 }, | ||
| 45 | { "label": "Backspace", "x": 13, "y": 2 }, | ||
| 46 | { "label": "Backspace_Right", "x": 14, "y": 2 }, | ||
| 47 | { "label": "Num Lock", "x": 15.5, "y": 2 }, | ||
| 48 | { "label": "/", "x": 16.5, "y": 2 }, | ||
| 49 | { "label": "*", "x": 17.5, "y": 2 }, | ||
| 50 | { "label": "Pause", "x": 18.5, "y": 2 }, | ||
| 51 | { "label": "Tab", "x": 0, "y": 3, "w": 1.5 }, | ||
| 52 | { "label": "Q", "x": 1.5, "y": 3 }, | ||
| 53 | { "label": "W", "x": 2.5, "y": 3 }, | ||
| 54 | { "label": "E", "x": 3.5, "y": 3 }, | ||
| 55 | { "label": "R", "x": 4.5, "y": 3 }, | ||
| 56 | { "label": "T", "x": 5.5, "y": 3 }, | ||
| 57 | { "label": "Y", "x": 6.5, "y": 3 }, | ||
| 58 | { "label": "U", "x": 7.5, "y": 3 }, | ||
| 59 | { "label": "I", "x": 8.5, "y": 3 }, | ||
| 60 | { "label": "O", "x": 9.5, "y": 3 }, | ||
| 61 | { "label": "P", "x": 10.5, "y": 3 }, | ||
| 62 | { "label": "[", "x": 11.5, "y": 3 }, | ||
| 63 | { "label": "]", "x": 12.5, "y": 3 }, | ||
| 64 | { "label": "\\", "x": 13.5, "y": 3, "w": 1.5 }, | ||
| 65 | { "label": "7", "x": 15.5, "y": 3 }, | ||
| 66 | { "label": "8", "x": 16.5, "y": 3 }, | ||
| 67 | { "label": "9", "x": 17.5, "y": 3 }, | ||
| 68 | { "label": "-", "x": 18.5, "y": 3 }, | ||
| 69 | { "label": "Caps Lock", "x": 0, "y": 4, "w": 1.75 }, | ||
| 70 | { "label": "A", "x": 1.75, "y": 4 }, | ||
| 71 | { "label": "S", "x": 2.75, "y": 4 }, | ||
| 72 | { "label": "D", "x": 3.75, "y": 4 }, | ||
| 73 | { "label": "F", "x": 4.75, "y": 4 }, | ||
| 74 | { "label": "G", "x": 5.75, "y": 4 }, | ||
| 75 | { "label": "H", "x": 6.75, "y": 4 }, | ||
| 76 | { "label": "J", "x": 7.75, "y": 4 }, | ||
| 77 | { "label": "K", "x": 8.75, "y": 4 }, | ||
| 78 | { "label": "L", "x": 9.75, "y": 4 }, | ||
| 79 | { "label": ";", "x": 10.75, "y": 4 }, | ||
| 80 | { "label": "'", "x": 11.75, "y": 4 }, | ||
| 81 | { "label": "ISO Hash", "x": 12.75, "y": 4 }, | ||
| 82 | { "label": "Enter", "x": 13.75, "y": 4, "w": 1.25 }, | ||
| 83 | { "label": "4", "x": 15.5, "y": 4 }, | ||
| 84 | { "label": "5", "x": 16.5, "y": 4 }, | ||
| 85 | { "label": "6", "x": 17.5, "y": 4 }, | ||
| 86 | { "label": "+", "x": 18.5, "y": 4 }, | ||
| 87 | { "label": "Shift", "x": 0, "y": 5, "w": 1.25 }, | ||
| 88 | { "label": "ISO Backslash", "x": 1.25, "y": 5 }, | ||
| 89 | { "label": "Z", "x": 2.25, "y": 5 }, | ||
| 90 | { "label": "X", "x": 3.25, "y": 5 }, | ||
| 91 | { "label": "C", "x": 4.25, "y": 5 }, | ||
| 92 | { "label": "V", "x": 5.25, "y": 5 }, | ||
| 93 | { "label": "B", "x": 6.25, "y": 5 }, | ||
| 94 | { "label": "N", "x": 7.25, "y": 5 }, | ||
| 95 | { "label": "M", "x": 8.25, "y": 5 }, | ||
| 96 | { "label": ",", "x": 9.25, "y": 5 }, | ||
| 97 | { "label": ".", "x": 10.25, "y": 5 }, | ||
| 98 | { "label": "/", "x": 11.25, "y": 5 }, | ||
| 99 | { "label": "Shift", "x": 12.25, "y": 5, "w": 1.75 }, | ||
| 100 | { "label": "Up", "x": 14.25, "y": 5.25 }, | ||
| 101 | { "label": "1", "x": 15.5, "y": 5 }, | ||
| 102 | { "label": "2", "x": 16.5, "y": 5 }, | ||
| 103 | { "label": "3", "x": 17.5, "y": 5 }, | ||
| 104 | { "label": "Enter_Top", "x": 18.5, "y": 5 }, | ||
| 105 | { "label": "Ctrl", "x": 0, "y": 6, "w": 1.25 }, | ||
| 106 | { "label": "GUI", "x": 1.25, "y": 6, "w": 1.25 }, | ||
| 107 | { "label": "Alt", "x": 2.5, "y": 6, "w": 1.25 }, | ||
| 108 | { "label": "Space", "x": 3.75, "y": 6, "w": 6.25 }, | ||
| 109 | { "label": "Alt", "x": 10, "y": 6 }, | ||
| 110 | { "label": "Fn", "x": 11, "y": 6 }, | ||
| 111 | { "label": "Ctrl", "x": 12, "y": 6 }, | ||
| 112 | { "label": "Left", "x": 13.25, "y": 6.25 }, | ||
| 113 | { "label": "Down", "x": 14.25, "y": 6.25 }, | ||
| 114 | { "label": "Right", "x": 15.25, "y": 6.25 }, | ||
| 115 | { "label": "0", "x": 16.5, "y": 6 }, | ||
| 116 | { "label": ".", "x": 17.5, "y": 6 }, | ||
| 117 | { "label": "Enter", "x": 18.5, "y": 6 } | ||
| 118 | ] | ||
| 119 | } | ||
| 120 | } | ||
| 121 | } | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c new file mode 100644 index 000000000..4f4c7f8e9 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/default/keymap.c | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * ,-------------------------------------------------------. ,-------------------. | ||
| 29 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 30 | * `-------------------------------------------------------' |-------------------| | ||
| 31 | * |Del |End |PgDn|ScrL| | ||
| 32 | * ,-----------------------------------------------------------. |-------------------| | ||
| 33 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 34 | * |-----------------------------------------------------------| |-------------------| | ||
| 35 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 36 | * |-----------------------------------------------------------| |-------------------| | ||
| 37 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 38 | * |-----------------------------------------------------------' |-------------------| | ||
| 39 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 40 | * |--------------------------------------------------------'----`--------------| | | ||
| 41 | * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | | ||
| 42 | * `---------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | [BASE] = LAYOUT( | ||
| 45 | 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, \ | ||
| 46 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 47 | 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, \ | ||
| 48 | 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, \ | ||
| 49 | 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, \ | ||
| 50 | 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, \ | ||
| 51 | 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 \ | ||
| 52 | ), | ||
| 53 | /* Keymap FUNCTION: (Function Layer) | ||
| 54 | * ,-------------------------------------------------------. ,-------------------. | ||
| 55 | * | | | | | | | | | | | | | | | | | | | | | | ||
| 56 | * `-------------------------------------------------------' |-------------------| | ||
| 57 | * | | | | | | ||
| 58 | * ,-----------------------------------------------------------. |-------------------| | ||
| 59 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 60 | * |-----------------------------------------------------------| |-------------------| | ||
| 61 | * | | | | | | | | | | | | | | | | | | | | | ||
| 62 | * |-----------------------------------------------------------| |-------------------| | ||
| 63 | * | | | | | | | | | | | | | | | | | | | | ||
| 64 | * |-----------------------------------------------------------' |-------------------| | ||
| 65 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 66 | * |--------------------------------------------------------'----`--------------| | | ||
| 67 | * | | | | | | | | | | | | . | | | ||
| 68 | * `---------------------------------------------------------------------------------' | ||
| 69 | */ | ||
| 70 | [FUNCTION] = LAYOUT( | ||
| 71 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 72 | _______, _______, _______, _______, \ | ||
| 73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 76 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 77 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 78 | ), | ||
| 79 | }; | ||
| 80 | |||
| 81 | |||
| 82 | #ifdef OLED_DRIVER_ENABLE | ||
| 83 | void oled_task_user(void) { | ||
| 84 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 85 | // Host Keyboard Layer Status | ||
| 86 | oled_write_P(PSTR("Layer: "), false); | ||
| 87 | |||
| 88 | switch (get_highest_layer(layer_state)) { | ||
| 89 | case BASE: | ||
| 90 | oled_write_P(PSTR("Base\n"), false); | ||
| 91 | break; | ||
| 92 | case FUNCTION: | ||
| 93 | oled_write_P(PSTR("Function\n"), false); | ||
| 94 | break; | ||
| 95 | default: | ||
| 96 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 97 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 98 | } | ||
| 99 | |||
| 100 | // Host Keyboard LED Status | ||
| 101 | led_t led_state = host_keyboard_led_state(); | ||
| 102 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 103 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 104 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 105 | } | ||
| 106 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c new file mode 100644 index 000000000..9b6ad80d3 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c | |||
| @@ -0,0 +1,177 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | // Custom macros | ||
| 20 | #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl | ||
| 21 | #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) | ||
| 22 | #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift | ||
| 23 | |||
| 24 | //Layers | ||
| 25 | |||
| 26 | enum { | ||
| 27 | QWERTY = 0, | ||
| 28 | COLEMAK, | ||
| 29 | DVORAK, | ||
| 30 | FUNCTION, | ||
| 31 | }; | ||
| 32 | |||
| 33 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 34 | /* Keymap QWERTY: (Qwerty Layer) Default Layer | ||
| 35 | * ,-------------------------------------------------------. ,-------------------. | ||
| 36 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 37 | * `-------------------------------------------------------' |-------------------| | ||
| 38 | * |Del |End |PgDn|ScrL| | ||
| 39 | * ,-----------------------------------------------------------. |-------------------| | ||
| 40 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 41 | * |-----------------------------------------------------------| |-------------------| | ||
| 42 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 43 | * |-----------------------------------------------------------| |-------------------| | ||
| 44 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 45 | * |-----------------------------------------------------------' |-------------------| | ||
| 46 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 47 | * |--------------------------------------------------------'----`--------------| | | ||
| 48 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 49 | * `---------------------------------------------------------------------------------' | ||
| 50 | */ | ||
| 51 | [QWERTY] = LAYOUT( | ||
| 52 | 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_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 54 | 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, \ | ||
| 55 | 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, \ | ||
| 56 | 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, \ | ||
| 57 | 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, \ | ||
| 58 | 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 \ | ||
| 59 | ), | ||
| 60 | /* Keymap COLEMAK: (Colemak Layer) Default Layer | ||
| 61 | * ,-------------------------------------------------------. ,-------------------. | ||
| 62 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 63 | * `-------------------------------------------------------' |-------------------| | ||
| 64 | * |Del |End |PgDn|ScrL| | ||
| 65 | * ,-----------------------------------------------------------. |-------------------| | ||
| 66 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 67 | * |-----------------------------------------------------------| |-------------------| | ||
| 68 | * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 69 | * |-----------------------------------------------------------| |-------------------| | ||
| 70 | * |CAPS | A| R| S| T| D| H| N| E| I| O| '|Return | | 4 | 5 | 6 | + | | ||
| 71 | * |-----------------------------------------------------------' |-------------------| | ||
| 72 | * |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 73 | * |--------------------------------------------------------'----`--------------| | | ||
| 74 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 75 | * `---------------------------------------------------------------------------------' | ||
| 76 | */ | ||
| 77 | [COLEMAK] = LAYOUT( | ||
| 78 | 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, \ | ||
| 79 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 80 | 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, \ | ||
| 81 | 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, \ | ||
| 82 | 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, \ | ||
| 83 | 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, \ | ||
| 84 | 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 \ | ||
| 85 | ), | ||
| 86 | /* Keymap DVORAK: (Dvorak Layer) Default Layer | ||
| 87 | * ,-------------------------------------------------------. ,-------------------. | ||
| 88 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 89 | * `-------------------------------------------------------' |-------------------| | ||
| 90 | * |Del |End |PgDn|ScrL| | ||
| 91 | * ,-----------------------------------------------------------. |-------------------| | ||
| 92 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| ~ | |NumL| / | * |Paus| | ||
| 93 | * |-----------------------------------------------------------| |-------------------| | ||
| 94 | * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| BS | | 7 | 8 | 9 | - | | ||
| 95 | * |-----------------------------------------------------------| |-------------------| | ||
| 96 | * |CAPS | A| O| E| U| I| D| H| T| N| S| -|Return | | 4 | 5 | 6 | + | | ||
| 97 | * |-----------------------------------------------------------' |-------------------| | ||
| 98 | * |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 99 | * |--------------------------------------------------------'----`--------------| | | ||
| 100 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 101 | * `---------------------------------------------------------------------------------' | ||
| 102 | */ | ||
| 103 | [DVORAK] = LAYOUT( | ||
| 104 | 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, \ | ||
| 105 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 106 | 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, \ | ||
| 107 | 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, \ | ||
| 108 | 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, \ | ||
| 109 | 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, \ | ||
| 110 | 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 \ | ||
| 111 | ), | ||
| 112 | [FUNCTION] = LAYOUT( | ||
| 113 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | ||
| 114 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 115 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 116 | _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 117 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 118 | _______, 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, \ | ||
| 119 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, _______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 120 | ), | ||
| 121 | }; | ||
| 122 | |||
| 123 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 124 | switch (keycode) { | ||
| 125 | case QWERTY: | ||
| 126 | if (record->event.pressed) { | ||
| 127 | set_single_persistent_default_layer(QWERTY); | ||
| 128 | } | ||
| 129 | return false; | ||
| 130 | break; | ||
| 131 | case COLEMAK: | ||
| 132 | if (record->event.pressed) { | ||
| 133 | set_single_persistent_default_layer(COLEMAK); | ||
| 134 | } | ||
| 135 | return false; | ||
| 136 | break; | ||
| 137 | case DVORAK: | ||
| 138 | if (record->event.pressed) { | ||
| 139 | set_single_persistent_default_layer(DVORAK); | ||
| 140 | } | ||
| 141 | return false; | ||
| 142 | break; | ||
| 143 | } | ||
| 144 | return true; | ||
| 145 | } | ||
| 146 | |||
| 147 | #ifdef OLED_DRIVER_ENABLE | ||
| 148 | void oled_task_user(void) { | ||
| 149 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 150 | // Host Keyboard Layer Status | ||
| 151 | oled_write_P(PSTR("Layer: "), false); | ||
| 152 | |||
| 153 | switch (get_highest_layer(layer_state)) { | ||
| 154 | case QWERTY: | ||
| 155 | oled_write_P(PSTR("Base\n"), false); | ||
| 156 | break; | ||
| 157 | case COLEMAK: | ||
| 158 | oled_write_P(PSTR("Colemak\n"), false); | ||
| 159 | break; | ||
| 160 | case DVORAK: | ||
| 161 | oled_write_P(PSTR("Dvorak\n"), false); | ||
| 162 | break; | ||
| 163 | case FUNCTION: | ||
| 164 | oled_write_P(PSTR("Function\n"), false); | ||
| 165 | break; | ||
| 166 | default: | ||
| 167 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 168 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 169 | } | ||
| 170 | |||
| 171 | // Host Keyboard LED Status | ||
| 172 | led_t led_state = host_keyboard_led_state(); | ||
| 173 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 174 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 175 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 176 | } | ||
| 177 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c new file mode 100644 index 000000000..55c2874c6 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | //Layers | ||
| 19 | |||
| 20 | enum { | ||
| 21 | BASE = 0, | ||
| 22 | FUNCTION, | ||
| 23 | ALTERNATE, | ||
| 24 | LAST, | ||
| 25 | }; | ||
| 26 | |||
| 27 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 28 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 29 | * ,-------------------------------------------------------. ,-------------------. | ||
| 30 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 31 | * `-------------------------------------------------------' |-------------------| | ||
| 32 | * |Del |End |PgDn|ScrL| | ||
| 33 | * ,-----------------------------------------------------------. |-------------------| | ||
| 34 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 35 | * |-----------------------------------------------------------| |-------------------| | ||
| 36 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 37 | * |-----------------------------------------------------------| |-------------------| | ||
| 38 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 39 | * |-----------------------------------------------------------' |-------------------| | ||
| 40 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 41 | * |--------------------------------------------------------'----`--------------| | | ||
| 42 | * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | | ||
| 43 | * `---------------------------------------------------------------------------------' | ||
| 44 | */ | ||
| 45 | [BASE] = LAYOUT( | ||
| 46 | 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, \ | ||
| 47 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 48 | 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, \ | ||
| 49 | 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, \ | ||
| 50 | 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, \ | ||
| 51 | 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, \ | ||
| 52 | 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 \ | ||
| 53 | ), | ||
| 54 | /* Keymap FUNCTION: (Function Layer) | ||
| 55 | * ,-------------------------------------------------------. ,-------------------. | ||
| 56 | * | | | | | | | | | | | | | | | | | | | | | | ||
| 57 | * `-------------------------------------------------------' |-------------------| | ||
| 58 | * | | | | | | ||
| 59 | * ,-----------------------------------------------------------. |-------------------| | ||
| 60 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 61 | * |-----------------------------------------------------------| |-------------------| | ||
| 62 | * | | | | | | | | | | | | | | | | | | | | | ||
| 63 | * |-----------------------------------------------------------| |-------------------| | ||
| 64 | * | | | | | | | | | | | | | | | | | | | | ||
| 65 | * |-----------------------------------------------------------' |-------------------| | ||
| 66 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 67 | * |--------------------------------------------------------'----`--------------| | | ||
| 68 | * | | | | | | | | | | | | . | | | ||
| 69 | * `---------------------------------------------------------------------------------' | ||
| 70 | */ | ||
| 71 | [FUNCTION] = LAYOUT( | ||
| 72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 73 | _______, _______, _______, _______, \ | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 76 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 77 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 78 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 79 | ), | ||
| 80 | [ALTERNATE] = 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 | ), | ||
| 89 | [LAST] = LAYOUT( | ||
| 90 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 91 | _______, _______, _______, _______, \ | ||
| 92 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 93 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 94 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 95 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 96 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 97 | ), | ||
| 98 | }; | ||
| 99 | |||
| 100 | #ifdef OLED_DRIVER_ENABLE | ||
| 101 | void oled_task_user(void) { | ||
| 102 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 103 | // Host Keyboard Layer Status | ||
| 104 | oled_write_P(PSTR("Layer: "), false); | ||
| 105 | |||
| 106 | switch (get_highest_layer(layer_state)) { | ||
| 107 | case BASE: | ||
| 108 | oled_write_P(PSTR("Base\n"), false); | ||
| 109 | break; | ||
| 110 | case FUNCTION: | ||
| 111 | oled_write_P(PSTR("Function\n"), false); | ||
| 112 | break; | ||
| 113 | case ALTERNATE: | ||
| 114 | oled_write_P(PSTR("Alternate\n"), false); | ||
| 115 | break; | ||
| 116 | case LAST: | ||
| 117 | oled_write_P(PSTR("Last\n"), false); | ||
| 118 | break; | ||
| 119 | default: | ||
| 120 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 121 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 122 | } | ||
| 123 | |||
| 124 | // Host Keyboard LED Status | ||
| 125 | led_t led_state = host_keyboard_led_state(); | ||
| 126 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 127 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 128 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 129 | } | ||
| 130 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/via/rules.mk b/keyboards/tkc/tkc1800/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c new file mode 100644 index 000000000..3c65b61d1 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * ,-------------------------------------------------------. ,-------------------. | ||
| 29 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 30 | * `-------------------------------------------------------' |-------------------| | ||
| 31 | * |Del |End |PgDn|ScrL| | ||
| 32 | * ,-----------------------------------------------------------. |-------------------| | ||
| 33 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 34 | * |-----------------------------------------------------------| |-------------------| | ||
| 35 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 36 | * |-----------------------------------------------------------| |-------------------| | ||
| 37 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 38 | * |-----------------------------------------------------------' |-------------------| | ||
| 39 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 40 | * |--------------------------------------------------------'----`--------------| | | ||
| 41 | * |Ctrl | Alt | Space | Fn |Ctrl |Left |Down|Rght| 0 | . | | | ||
| 42 | * `---------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | [BASE] = LAYOUT( | ||
| 45 | 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, \ | ||
| 46 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 47 | 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, \ | ||
| 48 | 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, \ | ||
| 49 | 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, \ | ||
| 50 | 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, \ | ||
| 51 | KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 52 | ), | ||
| 53 | [FUNCTION] = LAYOUT( | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 55 | _______, _______, _______, _______, \ | ||
| 56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 58 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 59 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 60 | _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 61 | ), | ||
| 62 | }; | ||
| 63 | |||
| 64 | #ifdef OLED_DRIVER_ENABLE | ||
| 65 | void oled_task_user(void) { | ||
| 66 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 67 | // Host Keyboard Layer Status | ||
| 68 | oled_write_P(PSTR("Layer: "), false); | ||
| 69 | |||
| 70 | switch (get_highest_layer(layer_state)) { | ||
| 71 | case BASE: | ||
| 72 | oled_write_P(PSTR("Base\n"), false); | ||
| 73 | break; | ||
| 74 | case FUNCTION: | ||
| 75 | oled_write_P(PSTR("Function\n"), false); | ||
| 76 | break; | ||
| 77 | default: | ||
| 78 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 79 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 80 | } | ||
| 81 | |||
| 82 | // Host Keyboard LED Status | ||
| 83 | led_t led_state = host_keyboard_led_state(); | ||
| 84 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 85 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 86 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 87 | } | ||
| 88 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c new file mode 100644 index 000000000..bbffc2d20 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * ,-------------------------------------------------------. ,-------------------. | ||
| 29 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 30 | * `-------------------------------------------------------' |-------------------| | ||
| 31 | * |Del |End |PgDn|ScrL| | ||
| 32 | * ,-----------------------------------------------------------. |-------------------| | ||
| 33 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 34 | * |-----------------------------------------------------------| |-------------------| | ||
| 35 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 36 | * |-----------------------------------------------------------| |-------------------| | ||
| 37 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 38 | * |-----------------------------------------------------------' |-------------------| | ||
| 39 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 40 | * |--------------------------------------------------------'----`--------------| | | ||
| 41 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 42 | * `---------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | [BASE] = LAYOUT( | ||
| 45 | 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, \ | ||
| 46 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 47 | 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, \ | ||
| 48 | 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, \ | ||
| 49 | 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, \ | ||
| 50 | 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, \ | ||
| 51 | 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 \ | ||
| 52 | ), | ||
| 53 | [FUNCTION] = LAYOUT( | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 55 | _______, _______, _______, _______, \ | ||
| 56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 58 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 59 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 60 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 61 | ), | ||
| 62 | }; | ||
| 63 | |||
| 64 | #ifdef OLED_DRIVER_ENABLE | ||
| 65 | void oled_task_user(void) { | ||
| 66 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 67 | // Host Keyboard Layer Status | ||
| 68 | oled_write_P(PSTR("Layer: "), false); | ||
| 69 | |||
| 70 | switch (get_highest_layer(layer_state)) { | ||
| 71 | case BASE: | ||
| 72 | oled_write_P(PSTR("Base\n"), false); | ||
| 73 | break; | ||
| 74 | case FUNCTION: | ||
| 75 | oled_write_P(PSTR("Function\n"), false); | ||
| 76 | break; | ||
| 77 | default: | ||
| 78 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 79 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 80 | } | ||
| 81 | |||
| 82 | // Host Keyboard LED Status | ||
| 83 | led_t led_state = host_keyboard_led_state(); | ||
| 84 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 85 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 86 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 87 | } | ||
| 88 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk new file mode 100644 index 000000000..b595964f7 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| OLED_DRIVER_ENABLE = no | |||
diff --git a/keyboards/tkc/tkc1800/rules.mk b/keyboards/tkc/tkc1800/rules.mk new file mode 100644 index 000000000..fa90e9980 --- /dev/null +++ b/keyboards/tkc/tkc1800/rules.mk | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = at90usb1286 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = qmk-dfu | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | |||
| 18 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 19 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 20 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 21 | CONSOLE_ENABLE = no # Console for debug | ||
| 22 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 25 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 26 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 27 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
| 28 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 29 | MIDI_ENABLE = no # MIDI controls | ||
| 30 | UNICODE_ENABLE = no # Unicode | ||
| 31 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 32 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 33 | OLED_DRIVER_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c new file mode 100644 index 000000000..4232c97d5 --- /dev/null +++ b/keyboards/tkc/tkc1800/tkc1800.c | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "tkc1800.h" | ||
| 17 | #include "led.h" | ||
| 18 | |||
| 19 | void keyboard_pre_init_kb(void) { | ||
| 20 | setPinInputHigh(D0); | ||
| 21 | setPinInputHigh(D1); | ||
| 22 | |||
| 23 | keyboard_pre_init_user(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_init_kb(void) { | ||
| 27 | // put your keyboard start-up code here | ||
| 28 | // runs once when the firmware starts up | ||
| 29 | led_init_ports(); | ||
| 30 | matrix_init_user(); | ||
| 31 | } | ||
| 32 | |||
| 33 | void matrix_scan_kb(void) { | ||
| 34 | // put your looping keyboard code here | ||
| 35 | // runs every cycle (a lot) | ||
| 36 | |||
| 37 | matrix_scan_user(); | ||
| 38 | } | ||
| 39 | |||
| 40 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 41 | // put your per-action keyboard code here | ||
| 42 | // runs for every action, just before processing by the firmware | ||
| 43 | |||
| 44 | return process_record_user(keycode, record); | ||
| 45 | } | ||
| 46 | |||
| 47 | void led_init_ports(void) { | ||
| 48 | DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT | ||
| 49 | DDRB |= (1<<7); // OUT | ||
| 50 | PORTB |= (1<<7); | ||
| 51 | } | ||
| 52 | |||
| 53 | void led_set_kb(uint8_t usb_led) { | ||
| 54 | // led_set_user(usb_led); | ||
| 55 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
| 56 | // Turn numlock on | ||
| 57 | PORTD |= (1<<2); | ||
| 58 | } else { | ||
| 59 | // Turn numlock off | ||
| 60 | PORTD &= ~(1<<2); | ||
| 61 | } | ||
| 62 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 63 | // Turn capslock on | ||
| 64 | PORTD |= (1<<3); | ||
| 65 | } else { | ||
| 66 | // Turn capslock off | ||
| 67 | PORTD &= ~(1<<3); | ||
| 68 | } | ||
| 69 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
| 70 | // Turn scrolllock on | ||
| 71 | PORTD |= (1<<4); | ||
| 72 | } else { | ||
| 73 | // Turn scrolllock off | ||
| 74 | PORTD &= ~(1<<4); | ||
| 75 | } | ||
| 76 | } \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/tkc1800.h b/keyboards/tkc/tkc1800/tkc1800.h new file mode 100644 index 000000000..4d1686cf1 --- /dev/null +++ b/keyboards/tkc/tkc1800/tkc1800.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT( \ | ||
| 21 | K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, K0G, K0H, K0I, \ | ||
| 22 | K1F, K1G, K1H, K1I, \ | ||
| 23 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \ | ||
| 24 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ | ||
| 25 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ | ||
| 26 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ | ||
| 27 | K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ | ||
| 28 | ) { \ | ||
| 29 | { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ | ||
| 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 }, \ | ||
| 31 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ | ||
| 32 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ | ||
| 33 | { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ | ||
| 34 | { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ | ||
| 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 } \ | ||
| 36 | } | ||
