aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ktec
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2021-08-21 22:53:49 -0500
committerGitHub <noreply@github.com>2021-08-22 13:53:49 +1000
commit78ccd9c201199444bc06161b05ee8d7ba9c31613 (patch)
tree726d9e55d8cde510fe72bc1fb9bb2a7dabdbecc2 /keyboards/ktec
parentc70abc8d047319830e369ae4e14cd43bae3bd3b8 (diff)
downloadqmk_firmware-78ccd9c201199444bc06161b05ee8d7ba9c31613.tar.gz
qmk_firmware-78ccd9c201199444bc06161b05ee8d7ba9c31613.zip
Organize KPrepublic, K.T.E.C, xiudi boards into directories (#12159)
* reset; redoing my steps; and recommit * include xd002/.noci
Diffstat (limited to 'keyboards/ktec')
-rw-r--r--keyboards/ktec/daisy/config.h202
-rw-r--r--keyboards/ktec/daisy/daisy.c17
-rw-r--r--keyboards/ktec/daisy/daisy.h51
-rw-r--r--keyboards/ktec/daisy/info.json107
-rw-r--r--keyboards/ktec/daisy/keymaps/default/keymap.c83
-rw-r--r--keyboards/ktec/daisy/keymaps/default/readme.md1
-rw-r--r--keyboards/ktec/daisy/keymaps/via/keymap.c102
-rw-r--r--keyboards/ktec/daisy/keymaps/via/readme.md1
-rw-r--r--keyboards/ktec/daisy/keymaps/via/rules.mk1
-rw-r--r--keyboards/ktec/daisy/readme.md15
-rw-r--r--keyboards/ktec/daisy/rules.mk29
-rw-r--r--keyboards/ktec/ergodone/config.h81
-rw-r--r--keyboards/ktec/ergodone/ergodone.c54
-rw-r--r--keyboards/ktec/ergodone/ergodone.h182
-rw-r--r--keyboards/ktec/ergodone/expander.c120
-rw-r--r--keyboards/ktec/ergodone/expander.h48
-rw-r--r--keyboards/ktec/ergodone/i2cmaster.h178
-rw-r--r--keyboards/ktec/ergodone/info.json107
-rw-r--r--keyboards/ktec/ergodone/keymaps/art/keymap.c446
-rw-r--r--keyboards/ktec/ergodone/keymaps/default/keymap.c199
-rw-r--r--keyboards/ktec/ergodone/keymaps/default/readme.md15
-rw-r--r--keyboards/ktec/ergodone/keymaps/eozaki/keymap.c201
-rw-r--r--keyboards/ktec/ergodone/keymaps/eozaki/readme.md13
-rw-r--r--keyboards/ktec/ergodone/keymaps/erovia/config.h3
-rw-r--r--keyboards/ktec/ergodone/keymaps/erovia/keymap.c229
-rw-r--r--keyboards/ktec/ergodone/keymaps/erovia/readme.md76
-rw-r--r--keyboards/ktec/ergodone/keymaps/erovia/rules.mk1
-rw-r--r--keyboards/ktec/ergodone/keymaps/kloki/keymap.c219
-rw-r--r--keyboards/ktec/ergodone/keymaps/kloki/readme.md7
-rw-r--r--keyboards/ktec/ergodone/keymaps/vega/keymap.c555
-rw-r--r--keyboards/ktec/ergodone/keymaps/vega/rules.mk2
-rw-r--r--keyboards/ktec/ergodone/keymaps/via/config.h18
-rw-r--r--keyboards/ktec/ergodone/keymaps/via/keymap.c196
-rw-r--r--keyboards/ktec/ergodone/keymaps/via/readme.md5
-rw-r--r--keyboards/ktec/ergodone/keymaps/via/rules.mk2
-rw-r--r--keyboards/ktec/ergodone/matrix.c256
-rw-r--r--keyboards/ktec/ergodone/readme.md33
-rw-r--r--keyboards/ktec/ergodone/rules.mk37
-rw-r--r--keyboards/ktec/ergodone/twimaster.c208
-rw-r--r--keyboards/ktec/staryu/backlight_staryu.h30
-rwxr-xr-xkeyboards/ktec/staryu/config.h73
-rw-r--r--keyboards/ktec/staryu/info.json12
-rw-r--r--keyboards/ktec/staryu/keymaps/default/README.md3
-rwxr-xr-xkeyboards/ktec/staryu/keymaps/default/keymap.c104
-rw-r--r--keyboards/ktec/staryu/keymaps/default/rules.mk1
-rw-r--r--keyboards/ktec/staryu/keymaps/krusli/README.md9
-rw-r--r--keyboards/ktec/staryu/keymaps/krusli/keymap.c84
-rw-r--r--keyboards/ktec/staryu/readme.md15
-rwxr-xr-xkeyboards/ktec/staryu/rules.mk30
-rwxr-xr-xkeyboards/ktec/staryu/staryu.c17
-rwxr-xr-xkeyboards/ktec/staryu/staryu.h28
51 files changed, 4506 insertions, 0 deletions
diff --git a/keyboards/ktec/daisy/config.h b/keyboards/ktec/daisy/config.h
new file mode 100644
index 000000000..bf5210c0d
--- /dev/null
+++ b/keyboards/ktec/daisy/config.h
@@ -0,0 +1,202 @@
1/*
2Copyright 2020
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x4B50
24#define PRODUCT_ID 0xD7DC
25#define DEVICE_VER 0x0501
26#define MANUFACTURER KTEC
27#define PRODUCT Daisy
28
29/* key matrix size */
30#define MATRIX_ROWS 4
31#define MATRIX_COLS 11
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42*/
43#define MATRIX_ROW_PINS { D2, D3, D5, B7 }
44#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 }
45#define UNUSED_PINS
46
47/* COL2ROW, ROW2COL*/
48#define DIODE_DIRECTION COL2ROW
49
50/*
51 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
52 */
53//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
54
55#define LED_CAPS_LOCK_PIN C6
56#define LED_PIN_ON_STATE 0
57
58#define BACKLIGHT_PIN D0
59// #define BACKLIGHT_BREATHING
60#define BACKLIGHT_LEVELS 6
61
62#define RGB_DI_PIN C7
63#ifdef RGB_DI_PIN
64# define RGBLED_NUM 8
65# define RGBLIGHT_HUE_STEP 12
66# define RGBLIGHT_SAT_STEP 25
67# define RGBLIGHT_VAL_STEP 12
68// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
69// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
70// /*== all animations enable ==*/
71# define RGBLIGHT_ANIMATIONS
72// /*== or choose animations ==*/
73// #define RGBLIGHT_EFFECT_BREATHING
74// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
75// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
76// #define RGBLIGHT_EFFECT_SNAKE
77// #define RGBLIGHT_EFFECT_KNIGHT
78// #define RGBLIGHT_EFFECT_CHRISTMAS
79// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
80// #define RGBLIGHT_EFFECT_RGB_TEST
81// #define RGBLIGHT_EFFECT_ALTERNATING
82// /*== customize breathing effect ==*/
83// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
84// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
85// /*==== use exp() and sin() ====*/
86// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
87// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
88#endif
89
90/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
91#define DEBOUNCE 5
92
93/* define if matrix has ghost (lacks anti-ghosting diodes) */
94//#define MATRIX_HAS_GHOST
95
96/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
97#define LOCKING_SUPPORT_ENABLE
98/* Locking resynchronize hack */
99#define LOCKING_RESYNC_ENABLE
100
101/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
102 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
103 */
104// #define GRAVE_ESC_CTRL_OVERRIDE
105
106/*
107 * Force NKRO
108 *
109 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
110 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
111 * makefile for this to work.)
112 *
113 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
114 * until the next keyboard reset.
115 *
116 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
117 * fully operational during normal computer usage.
118 *
119 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
120 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
121 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
122 * power-up.
123 *
124 */
125//#define FORCE_NKRO
126
127/*
128 * Magic Key Options
129 *
130 * Magic keys are hotkey commands that allow control over firmware functions of
131 * the keyboard. They are best used in combination with the HID Listen program,
132 * found here: https://www.pjrc.com/teensy/hid_listen.html
133 *
134 * The options below allow the magic key functionality to be changed. This is
135 * useful if your keyboard/keypad is missing keys and you want magic key support.
136 *
137 */
138
139/* key combination for magic key command */
140/* defined by default; to change, uncomment and set to the combination you want */
141// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
142
143/* control how magic key switches layers */
144//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
145//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
146//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
147
148/* override magic key keymap */
149//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
150//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
151//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
152//#define MAGIC_KEY_HELP H
153//#define MAGIC_KEY_HELP_ALT SLASH
154//#define MAGIC_KEY_DEBUG D
155//#define MAGIC_KEY_DEBUG_MATRIX X
156//#define MAGIC_KEY_DEBUG_KBD K
157//#define MAGIC_KEY_DEBUG_MOUSE M
158//#define MAGIC_KEY_VERSION V
159//#define MAGIC_KEY_STATUS S
160//#define MAGIC_KEY_CONSOLE C
161//#define MAGIC_KEY_LAYER0 0
162//#define MAGIC_KEY_LAYER0_ALT GRAVE
163//#define MAGIC_KEY_LAYER1 1
164//#define MAGIC_KEY_LAYER2 2
165//#define MAGIC_KEY_LAYER3 3
166//#define MAGIC_KEY_LAYER4 4
167//#define MAGIC_KEY_LAYER5 5
168//#define MAGIC_KEY_LAYER6 6
169//#define MAGIC_KEY_LAYER7 7
170//#define MAGIC_KEY_LAYER8 8
171//#define MAGIC_KEY_LAYER9 9
172//#define MAGIC_KEY_BOOTLOADER B
173//#define MAGIC_KEY_BOOTLOADER_ALT ESC
174//#define MAGIC_KEY_LOCK CAPS
175//#define MAGIC_KEY_EEPROM E
176//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
177//#define MAGIC_KEY_NKRO N
178//#define MAGIC_KEY_SLEEP_LED Z
179
180/*
181 * Feature disable options
182 * These options are also useful to firmware size reduction.
183 */
184
185/* disable debug print */
186//#define NO_DEBUG
187
188/* disable print */
189//#define NO_PRINT
190
191/* disable action features */
192//#define NO_ACTION_LAYER
193//#define NO_ACTION_TAPPING
194//#define NO_ACTION_ONESHOT
195
196/* disable these deprecated features by default */
197#define NO_ACTION_MACRO
198#define NO_ACTION_FUNCTION
199
200/* Bootmagic Lite key configuration */
201// #define BOOTMAGIC_LITE_ROW 0
202// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/ktec/daisy/daisy.c b/keyboards/ktec/daisy/daisy.c
new file mode 100644
index 000000000..98b7ac84b
--- /dev/null
+++ b/keyboards/ktec/daisy/daisy.c
@@ -0,0 +1,17 @@
1/* Copyright 2020
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 "daisy.h"
diff --git a/keyboards/ktec/daisy/daisy.h b/keyboards/ktec/daisy/daisy.h
new file mode 100644
index 000000000..b78c60464
--- /dev/null
+++ b/keyboards/ktec/daisy/daisy.h
@@ -0,0 +1,51 @@
1/* Copyright 2020
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#pragma once
18
19#include "quantum.h"
20
21/* This is a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT( \
30 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
31 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
32 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
33 K30, K31, K32, K34, K35, K37, K38, K39 \
34) { \
35 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
36 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
37 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
38 { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
39}
40
41#define LAYOUT_625_space( \
42 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
43 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
44 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
45 K30, K31, K32, K35, K38, K39 \
46) { \
47 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
48 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
49 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
50 { K30, K31, K32, KC_NO, KC_NO, K35, KC_NO, KC_NO, K38, K39, K3A } \
51}
diff --git a/keyboards/ktec/daisy/info.json b/keyboards/ktec/daisy/info.json
new file mode 100644
index 000000000..fcc7cd9fa
--- /dev/null
+++ b/keyboards/ktec/daisy/info.json
@@ -0,0 +1,107 @@
1{
2 "keyboard_name": "Daisy",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 12,
6 "height": 4,
7 "layouts": {
8 "LAYOUT": {
9 "key_count": 42,
10 "layout": [
11 {"x": 0, "y": 0},
12 {"x": 1, "y": 0},
13 {"x": 2, "y": 0},
14 {"x": 3, "y": 0},
15 {"x": 4, "y": 0},
16 {"x": 5, "y": 0},
17 {"x": 6, "y": 0},
18 {"x": 7, "y": 0},
19 {"x": 8, "y": 0},
20 {"x": 9, "y": 0},
21 {"x": 10, "y": 0},
22 {"x": 11, "y": 0},
23
24 {"x": 0, "y": 1, "w": 1.25},
25 {"x": 1.25, "y": 1},
26 {"x": 2.25, "y": 1},
27 {"x": 3.25, "y": 1},
28 {"x": 4.25, "y": 1},
29 {"x": 5.25, "y": 1},
30 {"x": 6.25, "y": 1},
31 {"x": 7.25, "y": 1},
32 {"x": 8.25, "y": 1},
33 {"x": 9.25, "y": 1},
34 {"x": 10.25, "y": 1, "w": 1.75},
35
36 {"x": 0, "y": 2, "w": 1.75},
37 {"x": 1.75, "y": 2},
38 {"x": 2.75, "y": 2},
39 {"x": 3.75, "y": 2},
40 {"x": 4.75, "y": 2},
41 {"x": 5.75, "y": 2},
42 {"x": 6.75, "y": 2},
43 {"x": 7.75, "y": 2},
44 {"x": 8.75, "y": 2},
45 {"x": 9.75, "y": 2},
46 {"x": 10.75, "y": 2, "w": 1.25},
47
48 {"x": 0, "y": 3, "w": 1.25},
49 {"x": 1.25, "y": 3},
50 {"x": 2.25, "y": 3, "w": 1.25},
51 {"x": 3.5, "y": 3, "w": 2.25},
52 {"x": 5.75, "y": 3, "w": 2.75},
53 {"x": 8.5, "y": 3, "w": 1.25},
54 {"x": 9.75, "y": 3},
55 {"x": 10.75, "y": 3, "w": 1.25}
56 ]
57 },
58 "LAYOUT_625_space": {
59 "key_count": 40,
60 "layout": [
61 {"x": 0, "y": 0},
62 {"x": 1, "y": 0},
63 {"x": 2, "y": 0},
64 {"x": 3, "y": 0},
65 {"x": 4, "y": 0},
66 {"x": 5, "y": 0},
67 {"x": 6, "y": 0},
68 {"x": 7, "y": 0},
69 {"x": 8, "y": 0},
70 {"x": 9, "y": 0},
71 {"x": 10, "y": 0},
72 {"x": 11, "y": 0},
73
74 {"x": 0, "y": 1, "w": 1.25},
75 {"x": 1.25, "y": 1},
76 {"x": 2.25, "y": 1},
77 {"x": 3.25, "y": 1},
78 {"x": 4.25, "y": 1},
79 {"x": 5.25, "y": 1},
80 {"x": 6.25, "y": 1},
81 {"x": 7.25, "y": 1},
82 {"x": 8.25, "y": 1},
83 {"x": 9.25, "y": 1},
84 {"x": 10.25, "y": 1, "w": 1.75},
85
86 {"x": 0, "y": 2, "w": 1.75},
87 {"x": 1.75, "y": 2},
88 {"x": 2.75, "y": 2},
89 {"x": 3.75, "y": 2},
90 {"x": 4.75, "y": 2},
91 {"x": 5.75, "y": 2},
92 {"x": 6.75, "y": 2},
93 {"x": 7.75, "y": 2},
94 {"x": 8.75, "y": 2},
95 {"x": 9.75, "y": 2},
96 {"x": 10.75, "y": 2, "w": 1.25},
97
98 {"x": 0, "y": 3, "w": 1.25},
99 {"x": 1.25, "y": 3},
100 {"x": 2.25, "y": 3},
101 {"x": 3.25, "y": 3, "w": 6.25},
102 {"x": 9.5, "y": 3, "w": 1.25},
103 {"x": 10.75, "y": 3, "w": 1.25}
104 ]
105 }
106 }
107}
diff --git a/keyboards/ktec/daisy/keymaps/default/keymap.c b/keyboards/ktec/daisy/keymaps/default/keymap.c
new file mode 100644
index 000000000..10f571041
--- /dev/null
+++ b/keyboards/ktec/daisy/keymaps/default/keymap.c
@@ -0,0 +1,83 @@
1/* Copyright 2020
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// Defines names for use in layer keycodes and the keymap
20enum layer_names {
21 _BL,
22 _LW,
23 _RS
24};
25
26#define LOWER MO(_LW)
27#define RAISE MO(_RS)
28
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30 /* Base Layer
31 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
32 * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
33 * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
34 * │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
35 * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
36 * │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │
37 * ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
38 * │Ctrl│GUI│Alt │ │ Backspace│Lowr│Rse│ Alt│
39 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
40 */
41 [_BL] = LAYOUT(
42 KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
43 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
44 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
45 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
46 ),
47
48 /* Function Layer 1 (Lower)
49 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
50 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
51 * └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
52 * │ │ = │ ▴ │ │ │ │ [ │ ] │ ; │ ' │ │
53 * ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
54 * │ │ ◂ │ ▾ │ ▸ │ │ │ │ │ │ │ │
55 * ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
56 * │ │ │ │ │ Delete │ │ │ │
57 * └────┴───┴────┴────────└──────────┘────┴───┴────┘
58 */
59 [_LW] = LAYOUT(
60 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
61 _______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
62 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
63 _______, _______, _______, _______, KC_DEL, _______, _______, _______
64 ),
65
66 /* Function Layer 2 (Raise)
67 * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
68 * │Rst│F1 │F2 │F3 │F4 │F5 │F6 │ │Hom│PgU│ │ │
69 * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
70 * │ │F7 │F8 │F9 │F10│F11│F12│ │ ; │ ' │ │
71 * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
72 * │ │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│ │
73 * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
74 * │ │ │ │ │ │ │ │ │
75 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
76 */
77 [_RS] = LAYOUT(
78 RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
79 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
80 _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
81 _______, _______, _______, _______, _______, _______, _______, _______
82 )
83};
diff --git a/keyboards/ktec/daisy/keymaps/default/readme.md b/keyboards/ktec/daisy/keymaps/default/readme.md
new file mode 100644
index 000000000..b8c7d17f2
--- /dev/null
+++ b/keyboards/ktec/daisy/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for Daisy
diff --git a/keyboards/ktec/daisy/keymaps/via/keymap.c b/keyboards/ktec/daisy/keymaps/via/keymap.c
new file mode 100644
index 000000000..102657116
--- /dev/null
+++ b/keyboards/ktec/daisy/keymaps/via/keymap.c
@@ -0,0 +1,102 @@
1/* Copyright 2020
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// Defines names for use in layer keycodes and the keymap
20enum layer_names {
21 _BL,
22 _LW,
23 _RS,
24 _EM
25};
26
27#define LOWER MO(_LW)
28#define RAISE MO(_RS)
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 /* Base Layer
32 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
33 * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
34 * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
35 * │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
36 * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
37 * │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │
38 * ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
39 * │Ctrl│GUI│Alt │ │ Backspace│Lowr│Rse│ Alt│
40 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
41 */
42 [_BL] = LAYOUT(
43 KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
44 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
45 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
46 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
47 ),
48
49 /* Function Layer 1 (Lower)
50 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
51 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
52 * └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
53 * │ │ = │ ▴ │ │ │ │ [ │ ] │ ; │ ' │ │
54 * ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
55 * │ │ ◂ │ ▾ │ ▸ │ │ │ │ │ │ │ │
56 * ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
57 * │ │ │ │ │ Delete │ │ │ │
58 * └────┴───┴────┴────────└──────────┘────┴───┴────┘
59 */
60 [_LW] = LAYOUT(
61 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
62 _______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
63 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
64 _______, _______, _______, _______, KC_DEL, _______, _______, _______
65 ),
66
67 /* Function Layer 2 (Raise)
68 * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
69 * │Rst│F1 │F2 │F3 │F4 │F5 │F6 │ │Hom│PgU│ │ │
70 * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
71 * │ │F7 │F8 │F9 │F10│F11│F12│ │ ; │ ' │ │
72 * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
73 * │ │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│ │
74 * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
75 * │ │ │ │ │ │ │ │ │
76 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
77 */
78 [_RS] = LAYOUT(
79 RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
80 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
81 _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
82 _______, _______, _______, _______, _______, _______, _______, _______
83 ),
84
85 /* Empty 4th layer for VIA
86 * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
87 * | | | | | | | | | | | | |
88 * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
89 * │ │ │ │ │ │ │ │ │ │ │ │
90 * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
91 * │ │ │ │ │ │ │ │ │ │ │ │
92 * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
93 * │ │ │ │ │ │ │ │ │
94 * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
95 */
96 [_EM] = LAYOUT(
97 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
98 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
99 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
100 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
101 )
102};
diff --git a/keyboards/ktec/daisy/keymaps/via/readme.md b/keyboards/ktec/daisy/keymaps/via/readme.md
new file mode 100644
index 000000000..9345124a3
--- /dev/null
+++ b/keyboards/ktec/daisy/keymaps/via/readme.md
@@ -0,0 +1 @@
# VIA keymap for Daisy
diff --git a/keyboards/ktec/daisy/keymaps/via/rules.mk b/keyboards/ktec/daisy/keymaps/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/ktec/daisy/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/ktec/daisy/readme.md b/keyboards/ktec/daisy/readme.md
new file mode 100644
index 000000000..a8a93bf79
--- /dev/null
+++ b/keyboards/ktec/daisy/readme.md
@@ -0,0 +1,15 @@
1# Daisy
2
3![Daisy PCB](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1Pj1UggMPMeJjy1Xcq6xpppXa7_1024x1024.jpg)
4
5A 40% keyboard kit sold by KPrepublic.
6
7* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot)
8* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
9* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make daisy:default
14
15See 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/ktec/daisy/rules.mk b/keyboards/ktec/daisy/rules.mk
new file mode 100644
index 000000000..487c91915
--- /dev/null
+++ b/keyboards/ktec/daisy/rules.mk
@@ -0,0 +1,29 @@
1# MCU name
2MCU = atmega32u4
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
12BOOTLOADER = atmel-dfu
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
18MOUSEKEY_ENABLE = no # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = no # USB Nkey Rollover
26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
28BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
29AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/ktec/ergodone/config.h b/keyboards/ktec/ergodone/config.h
new file mode 100644
index 000000000..39e0ae8c7
--- /dev/null
+++ b/keyboards/ktec/ergodone/config.h
@@ -0,0 +1,81 @@
1#ifndef ERGODOX_ERGODONE_CONFIG_H
2#define ERGODOX_ERGODONE_CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define VENDOR_ID 0x1209
8#define PRODUCT_ID 0x2328
9// The official ErgoDone VID and PID are documented at http://pid.codes/1209/2328/.
10#define DEVICE_VER 0x0001
11#define MANUFACTURER K.T.E.C.
12#define PRODUCT ErgoDone
13
14/* key matrix size */
15#define MATRIX_ROWS 6
16#define MATRIX_COLS 14
17
18#define MOUSEKEY_INTERVAL 20
19#define MOUSEKEY_DELAY 0
20#define MOUSEKEY_TIME_TO_MAX 60
21#define MOUSEKEY_MAX_SPEED 7
22#define MOUSEKEY_WHEEL_DELAY 0
23
24#define TAPPING_TOGGLE 1
25
26/* define if matrix has ghost */
27//#define MATRIX_HAS_GHOST
28
29#define TAPPING_TERM 200
30#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
31
32/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
33#define LOCKING_SUPPORT_ENABLE
34/* Locking resynchronize hack */
35#define LOCKING_RESYNC_ENABLE
36
37/* key combination for command */
38#define IS_COMMAND() ( \
39 get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
40 get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
41)
42
43/* number of backlight levels */
44#define BACKLIGHT_LEVELS 3
45
46#define LED_BRIGHTNESS_LO 15
47#define LED_BRIGHTNESS_HI 255
48
49/* fix space cadet rollover issue */
50#define DISABLE_SPACE_CADET_ROLLOVER
51
52/* Set 0 if debouncing isn't needed */
53#define DEBOUNCE 5
54
55#define USB_MAX_POWER_CONSUMPTION 500
56
57/* NKRO */
58#ifndef FORCE_NKRO
59 #define FORCE_NKRO // Depends on NKRO_ENABLE.
60#endif
61
62/*
63 * Feature disable options
64 * These options are also useful to firmware size reduction.
65 */
66
67/* disable debug print */
68// #define NO_DEBUG
69
70/* disable print */
71// #define NO_PRINT
72
73/* disable action features */
74//#define NO_ACTION_LAYER
75//#define NO_ACTION_TAPPING
76//#define NO_ACTION_ONESHOT
77//#define NO_ACTION_MACRO
78//#define NO_ACTION_FUNCTION
79//#define DEBUG_MATRIX_SCAN_RATE
80
81#endif
diff --git a/keyboards/ktec/ergodone/ergodone.c b/keyboards/ktec/ergodone/ergodone.c
new file mode 100644
index 000000000..e0579408e
--- /dev/null
+++ b/keyboards/ktec/ergodone/ergodone.c
@@ -0,0 +1,54 @@
1#include "ergodone.h"
2
3extern inline void ergodox_board_led_on(void);
4extern inline void ergodox_right_led_1_on(void);
5extern inline void ergodox_right_led_2_on(void);
6extern inline void ergodox_right_led_3_on(void);
7extern inline void ergodox_right_led_on(uint8_t led);
8
9extern inline void ergodox_board_led_off(void);
10extern inline void ergodox_right_led_1_off(void);
11extern inline void ergodox_right_led_2_off(void);
12extern inline void ergodox_right_led_3_off(void);
13extern inline void ergodox_right_led_off(uint8_t led);
14
15extern inline void ergodox_led_all_off(void);
16
17void ergodox_led_init(void);
18void ergodox_blink_all_leds(void);
19
20void matrix_init_kb(void) {
21 ergodox_led_init();
22 ergodox_blink_all_leds();
23 matrix_init_user();
24}
25
26void ergodox_led_init(void)
27 {
28 DDRB |= (1<<PB5 | 1<<PB6 | 1<<PB3);
29 PORTB &= ~(1<<PB5 | 1<<PB6 | 1<<PB3);
30 DDRB |= (1<<PB0);
31 PORTB |= (1<<PB0);
32 DDRD |= (1<<PB5);
33 PORTD |= (1<<PB5);
34}
35
36void ergodox_blink_all_leds(void)
37{
38 ergodox_led_all_off();
39 ergodox_led_all_set(LED_BRIGHTNESS_HI);
40 ergodox_right_led_1_on();
41 _delay_ms(50);
42 ergodox_right_led_2_on();
43 _delay_ms(50);
44 ergodox_right_led_3_on();
45 _delay_ms(50);
46 ergodox_right_led_1_off();
47 _delay_ms(50);
48 ergodox_right_led_2_off();
49 _delay_ms(50);
50 ergodox_right_led_3_off();
51 //ergodox_led_all_on();
52 //_delay_ms(333);
53 ergodox_led_all_off();
54}
diff --git a/keyboards/ktec/ergodone/ergodone.h b/keyboards/ktec/ergodone/ergodone.h
new file mode 100644
index 000000000..f88280fa2
--- /dev/null
+++ b/keyboards/ktec/ergodone/ergodone.h
@@ -0,0 +1,182 @@
1#ifndef ERGODOX_ERGODONE_H
2#define ERGODOX_ERGODONE_H
3
4#include "quantum.h"
5#include <stdint.h>
6#include <stdbool.h>
7
8#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
9#define CPU_16MHz 0x00
10
11void init_ergodox(void);
12
13inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<PB5); PORTB &= ~(1<<PB5); }
14inline void ergodox_right_led_1_on(void) { DDRB |= (1<<PB5); PORTB |= (1<<PB5); }
15inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<PB6); PORTB &= ~(1<<PB6); }
16inline void ergodox_right_led_2_on(void) { DDRB |= (1<<PB6); PORTB |= (1<<PB6); }
17inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<PB3); PORTB &= ~(1<<PB3); }
18inline void ergodox_right_led_3_on(void) { DDRB |= (1<<PB3); PORTB |= (1<<PB3); }
19inline void ergodox_right_led_on(uint8_t l) {
20 switch (l) {
21 case 1:
22 ergodox_right_led_1_on();
23 break;
24 case 2:
25 ergodox_right_led_2_on();
26 break;
27 case 3:
28 ergodox_right_led_3_on();
29 break;
30 default:
31 break;
32 }
33}
34
35inline void ergodox_right_led_off(uint8_t l) {
36 switch (l) {
37 case 1:
38 ergodox_right_led_1_off();
39 break;
40 case 2:
41 ergodox_right_led_2_off();
42 break;
43 case 3:
44 ergodox_right_led_3_off();
45 break;
46 default:
47 break;
48 }
49}
50inline void ergodox_board_led_off(void) { DDRB &= ~(1<<PB0); PORTB |= (1<<PB0); }
51inline void ergodox_board_led_on(void) { DDRB |= (1<<PB0); PORTB &= ~(1<<PB0); }
52inline void ergodox_led_all_on(void) {
53 ergodox_right_led_1_on();
54 ergodox_right_led_2_on();
55 ergodox_right_led_3_on();
56 ergodox_board_led_on();
57}
58inline void ergodox_led_all_off(void) {
59 ergodox_right_led_1_off();
60 ergodox_right_led_2_off();
61 ergodox_right_led_3_off();
62 ergodox_board_led_off();
63}
64inline void ergodox_right_led_1_set(uint8_t n) {}
65inline void ergodox_right_led_2_set(uint8_t n) {}
66inline void ergodox_right_led_3_set(uint8_t n) {}
67inline void ergodox_right_led_set(uint8_t l, uint8_t n) {}
68inline void ergodox_led_all_set(uint8_t n) {}
69
70/*
71 * LEFT HAND: LINES 76-83
72 * RIGHT HAND: LINES 85-92
73 */
74#define LAYOUT_ergodox( \
75 \
76 k00,k01,k02,k03,k04,k05,k06, \
77 k10,k11,k12,k13,k14,k15,k16, \
78 k20,k21,k22,k23,k24,k25, \
79 k30,k31,k32,k33,k34,k35,k36, \
80 k40,k41,k42,k43,k44, \
81 k55,k56, \
82 k54, \
83 k53,k52,k51, \
84 \
85 k07,k08,k09,k0A,k0B,k0C,k0D, \
86 k17,k18,k19,k1A,k1B,k1C,k1D, \
87 k28,k29,k2A,k2B,k2C,k2D, \
88 k37,k38,k39,k3A,k3B,k3C,k3D, \
89 k49,k4A,k4B,k4C,k4D, \
90 k57,k58, \
91 k59, \
92 k5C,k5B,k5A ) \
93 \
94 /* matrix positions */ \
95 { \
96 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
97 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
98 { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \
99 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
100 { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \
101 { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \
102 }
103
104/*
105 * LEFT HAND: LINES 110-117
106 * RIGHT HAND: LINES 119-126
107 */
108#define LAYOUT_ergodox_80( \
109 \
110 k00,k01,k02,k03,k04,k05,k06, \
111 k10,k11,k12,k13,k14,k15,k16, \
112 k20,k21,k22,k23,k24,k25, \
113 k30,k31,k32,k33,k34,k35,k36, \
114 k40,k41,k42,k43,k44, \
115 k55,k56, \
116 k45,k46,k54, \
117 k53,k52,k51, \
118 \
119 k07,k08,k09,k0A,k0B,k0C,k0D, \
120 k17,k18,k19,k1A,k1B,k1C,k1D, \
121 k28,k29,k2A,k2B,k2C,k2D, \
122 k37,k38,k39,k3A,k3B,k3C,k3D, \
123 k49,k4A,k4B,k4C,k4D, \
124 k57,k58, \
125 k59,k47,k48, \
126 k5C,k5B,k5A ) \
127 \
128 /* matrix positions */ \
129 { \
130 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
131 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
132 { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \
133 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
134 { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \
135 { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \
136 }
137
138/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
139#define LAYOUT_ergodox_pretty( \
140 \
141 L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
142 L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
143 L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
144 L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
145 L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
146 L55,L56, R50,R51, \
147 L54, R52, \
148 L53,L52,L51, R55,R54,R53 ) \
149 \
150 /* matrix positions */ \
151 { \
152 { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \
153 { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \
154 { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \
155 { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \
156 { L40,L41,L42,L43,L44,KC_NO,KC_NO, KC_NO,KC_NO,R42,R43,R44,R45,R46 }, \
157 { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \
158 }
159
160/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
161#define LAYOUT_ergodox_pretty_80( \
162 \
163 L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
164 L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
165 L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
166 L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
167 L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
168 L55,L56, R50,R51, \
169 L45,L46,L54, R52,R40,R41, \
170 L53,L52,L51, R55,R54,R53 ) \
171 \
172 /* matrix positions */ \
173 { \
174 { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \
175 { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \
176 { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \
177 { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \
178 { L40,L41,L42,L43,L44,L45,L46, R40,R41,R42,R43,R44,R45,R46 }, \
179 { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \
180 }
181
182#endif
diff --git a/keyboards/ktec/ergodone/expander.c b/keyboards/ktec/ergodone/expander.c
new file mode 100644
index 000000000..0c8a2289c
--- /dev/null
+++ b/keyboards/ktec/ergodone/expander.c
@@ -0,0 +1,120 @@
1#include <stdbool.h>
2#include "action.h"
3#include "i2cmaster.h"
4#include "expander.h"
5#include "debug.h"
6
7static uint8_t expander_status = 0;
8static uint8_t expander_input = 0;
9
10void expander_config(void);
11uint8_t expander_write(uint8_t reg, uint8_t data);
12uint8_t expander_read(uint8_t reg, uint8_t *data);
13
14void expander_init(void)
15{
16 i2c_init();
17 expander_scan();
18}
19
20void expander_scan(void)
21{
22 dprintf("expander status: %d ... ", expander_status);
23 uint8_t ret = i2c_start(EXPANDER_ADDR | I2C_WRITE);
24 if (ret == 0) {
25 i2c_stop();
26 if (expander_status == 0) {
27 dprintf("attached\n");
28 expander_status = 1;
29 expander_config();
30 clear_keyboard();
31 }
32 }
33 else {
34 if (expander_status == 1) {
35 dprintf("detached\n");
36 expander_status = 0;
37 clear_keyboard();
38 }
39 }
40 dprintf("%d\n", expander_status);
41}
42
43void expander_read_cols(void)
44{
45 expander_read(EXPANDER_REG_GPIOA, &expander_input);
46}
47
48uint8_t expander_get_col(uint8_t col)
49{
50 if (col > 4) {
51 col++;
52 }
53 return expander_input & (1<<col) ? 1 : 0;
54}
55
56matrix_row_t expander_read_row(void)
57{
58 expander_read_cols();
59
60 /* make cols */
61 matrix_row_t cols = 0;
62 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
63 if (expander_get_col(col)) {
64 cols |= (1UL << (MATRIX_COLS - 1 - col));
65 }
66 }
67
68 return cols;
69}
70
71void expander_unselect_rows(void)
72{
73 expander_write(EXPANDER_REG_IODIRB, 0xFF);
74}
75
76void expander_select_row(uint8_t row)
77{
78 expander_write(EXPANDER_REG_IODIRB, ~(1<<(row+1)));
79}
80
81void expander_config(void)
82{
83 expander_write(EXPANDER_REG_IPOLA, 0xFF);
84 expander_write(EXPANDER_REG_GPPUA, 0xFF);
85 expander_write(EXPANDER_REG_IODIRB, 0xFF);
86}
87
88uint8_t expander_write(uint8_t reg, uint8_t data)
89{
90 if (expander_status == 0) {
91 return 0;
92 }
93 uint8_t ret;
94 ret = i2c_start(EXPANDER_ADDR | I2C_WRITE);
95 if (ret) goto stop;
96 ret = i2c_write(reg);
97 if (ret) goto stop;
98 ret = i2c_write(data);
99 stop:
100 i2c_stop();
101 return ret;
102}
103
104uint8_t expander_read(uint8_t reg, uint8_t *data)
105{
106 if (expander_status == 0) {
107 return 0;
108 }
109 uint8_t ret;
110 ret = i2c_start(EXPANDER_ADDR | I2C_WRITE);
111 if (ret) goto stop;
112 ret = i2c_write(reg);
113 if (ret) goto stop;
114 ret = i2c_rep_start(EXPANDER_ADDR | I2C_READ);
115 if (ret) goto stop;
116 *data = i2c_readNak();
117 stop:
118 i2c_stop();
119 return ret;
120}
diff --git a/keyboards/ktec/ergodone/expander.h b/keyboards/ktec/ergodone/expander.h
new file mode 100644
index 000000000..8676fed69
--- /dev/null
+++ b/keyboards/ktec/ergodone/expander.h
@@ -0,0 +1,48 @@
1#ifndef EXPANDER_H
2#define EXPANDER_H
3
4#include <stdint.h>
5#include "matrix.h"
6
7#define MCP23017
8#define MCP23017_A0 0
9#define MCP23017_A1 0
10#define MCP23017_A2 0
11
12#ifdef MCP23017
13#define EXPANDER_ADDR ((0x20|(MCP23017_A0<<0)|(MCP23017_A1<<1)|(MCP23017_A2<<2)) << 1)
14enum EXPANDER_REG_BANK0 {
15 EXPANDER_REG_IODIRA = 0,
16 EXPANDER_REG_IODIRB,
17 EXPANDER_REG_IPOLA,
18 EXPANDER_REG_IPOLB,
19 EXPANDER_REG_GPINTENA,
20 EXPANDER_REG_GPINTENB,
21 EXPANDER_REG_DEFVALA,
22 EXPANDER_REG_DEFVALB,
23 EXPANDER_REG_INTCONA,
24 EXPANDER_REG_INTCONB,
25 EXPANDER_REG_IOCONA,
26 EXPANDER_REG_IOCONB,
27 EXPANDER_REG_GPPUA,
28 EXPANDER_REG_GPPUB,
29 EXPANDER_REG_INTFA,
30 EXPANDER_REG_INTFB,
31 EXPANDER_REG_INTCAPA,
32 EXPANDER_REG_INTCAPB,
33 EXPANDER_REG_GPIOA,
34 EXPANDER_REG_GPIOB,
35 EXPANDER_REG_OLATA,
36 EXPANDER_REG_OLATB
37};
38#endif
39
40void expander_init(void);
41void expander_scan(void);
42void expander_read_cols(void);
43uint8_t expander_get_col(uint8_t col);
44matrix_row_t expander_read_row(void);
45void expander_unselect_rows(void);
46void expander_select_row(uint8_t row);
47
48#endif
diff --git a/keyboards/ktec/ergodone/i2cmaster.h b/keyboards/ktec/ergodone/i2cmaster.h
new file mode 100644
index 000000000..3917b9e6c
--- /dev/null
+++ b/keyboards/ktec/ergodone/i2cmaster.h
@@ -0,0 +1,178 @@
1#ifndef _I2CMASTER_H
2#define _I2CMASTER_H 1
3/*************************************************************************
4* Title: C include file for the I2C master interface
5* (i2cmaster.S or twimaster.c)
6* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
7* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $
8* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
9* Target: any AVR device
10* Usage: see Doxygen manual
11**************************************************************************/
12
13#ifdef DOXYGEN
14/**
15 @defgroup pfleury_ic2master I2C Master library
16 @code #include <i2cmaster.h> @endcode
17
18 @brief I2C (TWI) Master Software Library
19
20 Basic routines for communicating with I2C slave devices. This single master
21 implementation is limited to one bus master on the I2C bus.
22
23 This I2c library is implemented as a compact assembler software implementation of the I2C protocol
24 which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c).
25 Since the API for these two implementations is exactly the same, an application can be linked either against the
26 software I2C implementation or the hardware I2C implementation.
27
28 Use 4.7k pull-up resistor on the SDA and SCL pin.
29
30 Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module
31 i2cmaster.S to your target when using the software I2C implementation !
32
33 Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion.
34
35 @note
36 The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted
37 to GNU assembler and AVR-GCC C call interface.
38 Replaced the incorrect quarter period delays found in AVR300 with
39 half period delays.
40
41 @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury
42
43 @par API Usage Example
44 The following code shows typical usage of this library, see example test_i2cmaster.c
45
46 @code
47
48 #include <i2cmaster.h>
49
50
51 #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet
52
53 int main(void)
54 {
55 unsigned char ret;
56
57 i2c_init(); // initialize I2C library
58
59 // write 0x75 to EEPROM address 5 (Byte Write)
60 i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
61 i2c_write(0x05); // write address = 5
62 i2c_write(0x75); // write value 0x75 to EEPROM
63 i2c_stop(); // set stop conditon = release bus
64
65
66 // read previously written value back from EEPROM address 5
67 i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
68
69 i2c_write(0x05); // write address = 5
70 i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode
71
72 ret = i2c_readNak(); // read one byte from EEPROM
73 i2c_stop();
74
75 for(;;);
76 }
77 @endcode
78
79*/
80#endif /* DOXYGEN */
81
82/**@{*/
83
84#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
85#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
86#endif
87
88#include <avr/io.h>
89
90/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
91#define I2C_READ 1
92
93/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
94#define I2C_WRITE 0
95
96
97/**
98 @brief initialize the I2C master interace. Need to be called only once
99 @param void
100 @return none
101 */
102extern void i2c_init(void);
103
104
105/**
106 @brief Terminates the data transfer and releases the I2C bus
107 @param void
108 @return none
109 */
110extern void i2c_stop(void);
111
112
113/**
114 @brief Issues a start condition and sends address and transfer direction
115
116 @param addr address and transfer direction of I2C device
117 @retval 0 device accessible
118 @retval 1 failed to access device
119 */
120extern unsigned char i2c_start(unsigned char addr);
121
122
123/**
124 @brief Issues a repeated start condition and sends address and transfer direction
125
126 @param addr address and transfer direction of I2C device
127 @retval 0 device accessible
128 @retval 1 failed to access device
129 */
130extern unsigned char i2c_rep_start(unsigned char addr);
131
132
133/**
134 @brief Issues a start condition and sends address and transfer direction
135
136 If device is busy, use ack polling to wait until device ready
137 @param addr address and transfer direction of I2C device
138 @return none
139 */
140extern void i2c_start_wait(unsigned char addr);
141
142
143/**
144 @brief Send one byte to I2C device
145 @param data byte to be transfered
146 @retval 0 write successful
147 @retval 1 write failed
148 */
149extern unsigned char i2c_write(unsigned char data);
150
151
152/**
153 @brief read one byte from the I2C device, request more data from device
154 @return byte read from I2C device
155 */
156extern unsigned char i2c_readAck(void);
157
158/**
159 @brief read one byte from the I2C device, read is followed by a stop condition
160 @return byte read from I2C device
161 */
162extern unsigned char i2c_readNak(void);
163
164/**
165 @brief read one byte from the I2C device
166
167 Implemented as a macro, which calls either i2c_readAck or i2c_readNak
168
169 @param ack 1 send ack, request more data from device<br>
170 0 send nak, read is followed by a stop condition
171 @return byte read from I2C device
172 */
173extern unsigned char i2c_read(unsigned char ack);
174#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
175
176
177/**@}*/
178#endif
diff --git a/keyboards/ktec/ergodone/info.json b/keyboards/ktec/ergodone/info.json
new file mode 100644
index 000000000..33128758a
--- /dev/null
+++ b/keyboards/ktec/ergodone/info.json
@@ -0,0 +1,107 @@
1{
2 "keyboard_name": "Ergodone",
3 "maintainer": "Yu He",
4 "width": 17,
5 "height": 8,
6
7 "layouts": {
8 "LAYOUT_ergodox": {
9
10 "layout": [
11 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
12 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
13 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
14 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
15 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
16
17 {"x":6, "y":5}, {"x":7, "y":5},
18 {"x":7, "y":6},
19 {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7},
20
21
22 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
23 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
24 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
25 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
26 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
27
28
29 {"x":9, "y":5}, {"x":10, "y":5},
30 {"x":9, "y":6},
31 {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
32 ]
33 },
34 "LAYOUT_ergodox_pretty": {
35 "layout": [
36 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
37 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
38
39 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
40 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
41
42 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
43 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
44
45 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
46 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
47
48 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
49 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
50
51 {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
52 {"x":7, "y":6}, {"x":9, "y":6},
53 {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
54 ]
55 },
56 "LAYOUT_ergodox_80": {
57
58 "layout": [
59 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
60 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
61 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
62 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
63 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
64
65 {"x":6, "y":5}, {"x":7, "y":5},
66
67 {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6},
68 {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7},
69
70
71 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
72 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
73 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
74 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
75 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
76
77
78 {"x":9, "y":5}, {"x":10, "y":5},
79 {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
80 {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
81 ]
82 },
83 "LAYOUT_ergodox_pretty_80": {
84
85 "layout": [
86 {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
87 {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
88
89 {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
90 {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
91
92 {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
93 {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
94
95 {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
96 {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
97
98 {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
99 {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
100
101 {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
102 {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
103 {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
104 ]
105 }
106 }
107}
diff --git a/keyboards/ktec/ergodone/keymaps/art/keymap.c b/keyboards/ktec/ergodone/keymaps/art/keymap.c
new file mode 100644
index 000000000..7fcbd5b61
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/art/keymap.c
@@ -0,0 +1,446 @@
1#include "art.h"
2#include "sendstring_workman_zxcvm.h"
3
4bool is_win = true;
5
6enum custom_keycodes {
7 keyboardSpecificKeyCode = NEW_SAFE_RANGE //not used
8};
9
10void led_show_current_os(void) {
11 if (is_win) {
12 ergodox_right_led_1_on();
13 wait_ms(50);
14 ergodox_right_led_1_off();
15 wait_ms(50);
16 ergodox_right_led_1_on();
17 wait_ms(50);
18 ergodox_right_led_1_off();
19 wait_ms(50);
20 ergodox_right_led_1_on();
21 wait_ms(50);
22 ergodox_right_led_1_off();
23 wait_ms(50);
24 } else {
25 ergodox_right_led_3_on();
26 wait_ms(50);
27 ergodox_right_led_3_off();
28 wait_ms(50);
29 ergodox_right_led_3_on();
30 wait_ms(50);
31 ergodox_right_led_3_off();
32 wait_ms(50);
33 ergodox_right_led_3_on();
34 wait_ms(50);
35 ergodox_right_led_3_off();
36 wait_ms(50);
37 }
38}
39
40void matrix_init_user(void) {
41 led_show_current_os();
42}
43
44void led_set_user(uint8_t usb_led) {
45 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
46 ergodox_right_led_2_on();
47 } else {
48 ergodox_right_led_2_off();
49 }
50}
51
52
53
54layer_state_t layer_state_set_user(layer_state_t state) {
55 ergodox_board_led_off();
56 ergodox_right_led_1_off();
57 ergodox_right_led_3_off();
58 switch (get_highest_layer(state)) {
59 case NAV:
60 case CTRL_NAV:
61 case SHIFT_NAV:
62 ergodox_right_led_1_on();
63 break;
64 case FKEYS:
65 ergodox_right_led_3_on();
66 break;
67 }
68 return state;
69};
70
71const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
72/* Base qwerty layer
73 *
74 * ,--------------------------------------------------. ,--------------------------------------------------.
75 * | ` ~ | 1 | 2 | 3 | 4 | 5 | ESC | | - _ | 6 | 7 | 8 | 9 | 0 | ] |
76 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
77 * | Tab | Q | W | E | R | T | ??? | | = | Y | U | I | O | P | [ |
78 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
79 * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
80 * |--------+------+------+------+------+------| FKEYS| | FKEYS|------+------+------+------+------+--------|
81 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / git| RShift |
82 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
83 * |LCtrl |Media\| Win |Alt | NAV | | Home | End |Workmn| | RCtrl|
84 * `----------------------------------' `----------------------------------'
85 * ,-------------. ,---------------.
86 * | Del | Ins | | Left | Right |
87 * ,------|------|------| |------+--------+------.
88 * | | | PgUp | |SFT_NV| | |
89 * | Space|BSpace|------| |------| NAV |Enter |
90 * | | | PgDn | |CTR_NV| | |
91 * `--------------------' `----------------------'
92 */
93[QWERTY] = LAYOUT_ergodox(
94 // -----------------------------------------------------left hand-----------------------------------------------------
95 KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESCAPE,
96 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX,
97 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
98 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, TT(FKEYS),
99 KC_LCTRL, LT(MEDIA, KC_BSLASH), KC_LWIN, KC_LALT, LT(NAV, KC_RIGHT),
100
101 KC_DEL, KC_INS,
102 KC_PGUP,
103 KC_SPC, LT(COMBOS,KC_BSPC), KC_PGDOWN,
104
105 // -----------------------------------------------------right hand-----------------------------------------------------
106 KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC,
107 KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
108 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
109 TT(FKEYS), KC_N, KC_M, KC_COMM, KC_DOT, LT(GIT,KC_SLSH), KC_RSFT,
110 KC_HOME, KC_END, DF(WORKMAN), KC_RALT, KC_RCTRL,
111
112 KC_LEFT, KC_RIGHT,
113 LT(SHIFT_NAV, KC_UP),
114 LT(CTRL_NAV, KC_DOWN), MO(NAV), KC_ENT
115),
116 /* Workman
117 *
118 * ,--------------------------------------------------. ,--------------------------------------------------.
119 * | | | | | | | | | | | | | | | |
120 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
121 * | | Q | D | R | W | B | | | | J | F | U | P | ; | |
122 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
123 * | | A | S | H | T | G |------| |------| Y | N | E | O | I | |
124 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
125 * | | Z | X | C | V | M | | | | K | L | , | . | / | |
126 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
127 * | | | | | | | | |QWERTY| | |
128 * `----------------------------------' `----------------------------------'
129 * ,-------------. ,---------------.
130 * | | | | | |
131 * ,------|------|------| |------+--------+------.
132 * | | | | | | | |
133 * | | |------| |------| | |
134 * | | | | | | | |
135 * `--------------------' `----------------------'
136 */
137[WORKMAN] = LAYOUT_ergodox(
138 // -----------------------------------------------------left hand-----------------------------------------------------
139 _______, _______, _______, _______, _______, _______, _______,
140 _______, KC_Q, KC_D, KC_R, KC_W, KC_B, _______,
141 _______, KC_A, KC_S, KC_H, KC_T, KC_G,
142 _______, KC_Z, KC_X, KC_C, KC_V, KC_M, _______,
143 _______, _______, _______, _______, _______,
144
145 _______, _______,
146 _______,
147 _______, _______, _______,
148
149 // -----------------------------------------------------right hand-----------------------------------------------------
150 _______, _______, _______, _______, _______, _______, _______,
151 _______, KC_J, KC_F, KC_U, KC_P, KC_SCLN, _______,
152 KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
153 _______, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
154 _______, _______, DF(QWERTY), _______, _______,
155
156 _______, _______,
157 _______,
158 _______, _______, _______
159),
160
161[FKEYS] = LAYOUT_ergodox(
162 // -----------------------------------------------------left hand-----------------------------------------------------
163 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
164 _______, _______, _______, _______, _______, _______, _______,
165 _______, _______, _______, _______, _______, _______,
166 _______, _______, _______, _______, _______, _______, _______,
167 _______, _______, _______, _______, _______,
168
169 _______, _______,
170 _______,
171 _______, _______, _______,
172 // -----------------------------------------------------right hand-----------------------------------------------------
173 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
174 _______, _______, _______, _______, _______, _______, KC_F12,
175 _______, _______, _______, _______, _______, KC_PSCREEN,
176 _______, _______, _______, _______, _______, _______, _______,
177 _______, _______, _______, _______, _______,
178
179 _______, _______,
180 _______,
181 _______, _______, _______
182),
183
184[NAV] = LAYOUT_ergodox(
185 // -----------------------------------------------------left hand-----------------------------------------------------
186 _______, LALT(KC_F1), LALT(KC_F2), LALT(KC_F3), LALT(KC_F4), LALT(KC_F5), _______,
187 _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______,
188 _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDOWN,
189 _______, _______, _______, _______, KC_LALT, _______, _______,
190 _______, _______, _______, _______, _______,
191
192 _______, _______,
193 _______,
194 _______, KC_DEL, _______,
195 // -----------------------------------------------------right hand-----------------------------------------------------
196 _______, LALT(KC_F6), LALT(KC_F7), LALT(KC_F8), LALT(KC_F9), LALT(KC_F10), LALT(KC_F11),
197 _______, _______, _______, _______, _______, _______, LALT(KC_F12),
198 _______, CTR_ALT, KC_RSFT, _______, _______, _______,
199 _______, _______, _______, _______, _______, _______, _______,
200 _______, _______, _______, _______, _______,
201
202 _______, _______,
203 _______,
204 _______, _______, _______
205),
206
207[CTRL_NAV] = LAYOUT_ergodox(
208 // -----------------------------------------------------left hand-----------------------------------------------------
209 _______, _______, _______, _______, _______, _______, _______,
210 _______, _______, CTL_ALT(KC_HOME), CTL_ALT(KC_UP), CTL_ALT(KC_END), CTL_ALT(KC_PGUP), _______,
211 _______, _______, CTL_ALT(KC_LEFT), CTL_ALT(KC_DOWN), CTL_ALT(KC_RIGHT),CTL_ALT(KC_PGDOWN),
212 _______, _______, CTL_ALT(KC_X), CTL_ALT(KC_C), CTL_ALT(KC_V), _______, _______,
213 _______, _______, _______, _______, _______,
214
215 CTL_ALT(KC_DEL), _______,
216 _______,
217 _______, CTL_ALT(KC_BSPC), CTL_ALT(KC_DEL),
218 // -----------------------------------------------------right hand-----------------------------------------------------
219 _______, _______, _______, _______, _______, _______, _______,
220 _______, _______, _______, _______, _______, _______, _______,
221 _______, _______, _______, _______, _______, _______,
222 _______, _______, _______, _______, _______, _______, _______,
223 CTL_ALT(KC_HOME), CTL_ALT(KC_END), _______, _______, _______,
224
225 CTL_ALT(KC_LEFT), CTL_ALT(KC_RIGHT),
226 KC_RSFT,
227 _______, _______, _______
228),
229
230[SHIFT_NAV] = LAYOUT_ergodox(
231 // -----------------------------------------------------left hand-----------------------------------------------------
232 _______, _______, _______, _______, _______, _______, _______,
233 _______, _______, LSFT(KC_HOME), LSFT(KC_UP), LSFT(KC_END), LSFT(KC_PGUP), _______,
234 _______, _______, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RIGHT), LSFT(KC_PGDOWN),
235 _______, _______, _______, _______, _______, _______, _______,
236 _______, _______, _______, _______, _______,
237
238 _______, _______,
239 _______,
240 _______, _______, _______,
241
242
243 // -----------------------------------------------------right hand-----------------------------------------------------
244 _______, _______, _______, _______, _______, _______, _______,
245 _______, _______, _______, _______, _______, _______, _______,
246 _______, _______, _______, _______, _______, _______,
247 _______, _______, _______, _______, _______, _______, _______,
248 LSFT(KC_HOME), LSFT(KC_END), _______, _______, _______,
249
250 LSFT(KC_LEFT), LSFT(KC_RIGHT),
251 _______,
252 CTR_ALT, _______, _______
253),
254
255[COMBOS] = LAYOUT_ergodox(
256 // -----------------------------------------------------left hand-----------------------------------------------------
257 TILD_BLOCK, PRESCRIPTION, _______, _______, FOURS, _______, _______,
258 _______, _______, _______, _______, _______, _______, _______,
259 _______, ADMINS, SARCASM, _______, CTRL_CTV, _______,
260 _______, _______, _______, _______, _______, _______, _______,
261 _______, _______, _______, _______, _______,
262
263 _______, _______,
264 _______,
265 _______, _______, _______,
266
267 // -----------------------------------------------------right hand-----------------------------------------------------
268 _______, _______, _______, _______, _______, _______, _______,
269 _______, _______, _______, _______, _______, _______, _______,
270 _______, _______, _______, _______, _______, _______,
271 _______, _______, CTRL_LCTV, _______, _______, _______, _______,
272 _______, _______, _______, _______, _______,
273
274 _______, _______,
275 _______,
276 _______, _______, _______
277),
278
279// [STRINGS] = LAYOUT_ergodox(
280// // -----------------------------------------------------left hand-----------------------------------------------------
281// _______, _______, _______, _______, _______, _______, _______,
282// _______, _______, _______, _______, _______, _______, _______,
283// _______, _______, _______, _______, _______, _______,
284// _______, _______, _______, _______, _______, _______, _______,
285// _______, _______, _______, _______, _______,
286
287// _______, _______,
288// _______,
289// _______, _______, _______,
290
291// // -----------------------------------------------------right hand-----------------------------------------------------
292// _______, _______, _______, _______, _______, _______, _______,
293// _______, _______, _______, _______, _______, _______, _______,
294// _______, _______, _______, _______, _______, _______,
295// _______, _______, _______, _______, _______, _______, _______,
296// _______, _______, _______, _______, _______,
297
298// _______, _______,
299// _______,
300// _______, _______, _______
301// ),
302
303[MEDIA] = LAYOUT_ergodox(
304 // -----------------------------------------------------left hand-----------------------------------------------------
305 _______, _______, _______, _______, _______, _______, _______,
306 _______, _______, KC_MPRV, KC_VOLU, KC_MNXT, _______, _______,
307 _______, _______, _______, KC_VOLD, _______, _______,
308 _______, _______, _______, KC_MUTE, KC_MPLY, _______, _______,
309 _______, _______, _______, _______, _______,
310
311 _______, _______,
312 _______,
313 _______, _______, _______,
314
315 // -----------------------------------------------------right hand-----------------------------------------------------
316 _______, _______, _______, _______, _______, _______, _______,
317 _______, _______, _______, _______, _______, _______, _______,
318 _______, _______, _______, TOG_OS, _______, _______,
319 _______, _______, _______, _______, _______, _______, _______,
320 _______, _______, _______, _______, _______,
321
322 _______, _______,
323 _______,
324 _______, _______, _______
325),
326
327[GIT] = LAYOUT_ergodox(
328 // -----------------------------------------------------left hand-----------------------------------------------------
329 _______, _______, _______, _______, _______, _______, _______,
330 _______, _______, G_DIFF, G_RST, _______, G_BRCH, _______,
331 _______, G_ADD, G_S, _______, _______, _______,
332 _______, _______, _______, G_C, _______, G_MERG, _______,
333 _______, _______, _______, _______, _______,
334
335 _______, _______,
336 _______,
337 _______, _______, _______,
338
339 // -----------------------------------------------------right hand-----------------------------------------------------
340 _______, _______, _______, _______, _______, _______, _______,
341 _______, _______, G_FTCH, _______, G_P, _______, _______,
342 _______, _______, _______, _______, _______, _______,
343 _______, _______, G_LOG, _______, G_DEV, _______, _______,
344 _______, _______, _______, _______, _______,
345
346 _______, _______,
347 _______,
348 _______, _______, _______
349),
350
351[GIT_C] = LAYOUT_ergodox(
352 // -----------------------------------------------------left hand-----------------------------------------------------
353 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
354 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
355 XXXXXXX, XXXXXXX, XXXXXXX, G_CHEC, XXXXXXX, XXXXXXX,
356 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
357 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
358
359 XXXXXXX, XXXXXXX,
360 XXXXXXX,
361 XXXXXXX, KC_BSPC, XXXXXXX,
362
363 // -----------------------------------------------------right hand-----------------------------------------------------
364 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
365 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
366 XXXXXXX, XXXXXXX, XXXXXXX, G_COMM, XXXXXXX, XXXXXXX,
367 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
368 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
369
370 XXXXXXX, XXXXXXX,
371 XXXXXXX,
372 XXXXXXX, XXXXXXX, XXXXXXX
373),
374
375[GIT_S] = LAYOUT_ergodox(
376 // -----------------------------------------------------left hand-----------------------------------------------------
377 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
378 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
379 XXXXXXX, XXXXXXX, G_STSH, G_SHOW, G_STAT, XXXXXXX,
380 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
381 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
382
383 XXXXXXX, XXXXXXX,
384 XXXXXXX,
385 XXXXXXX, KC_BSPC, XXXXXXX,
386
387 // -----------------------------------------------------right hand-----------------------------------------------------
388 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
389 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
390 XXXXXXX, XXXXXXX, XXXXXXX, G_COMM, XXXXXXX, XXXXXXX,
391 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
392 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
393
394 XXXXXXX, XXXXXXX,
395 XXXXXXX,
396 XXXXXXX, XXXXXXX, XXXXXXX
397),
398
399
400/* Numpad
401 *
402 * ,--------------------------------------------------.
403 * | | | | | | / | |
404 * |------+------+------+------+------+------+--------|
405 * | | | 7 | 8 | 9 | * | |
406 * | |------+------+------+------+------+--------|
407 * |------| | 4 | 5 | 6 | - | Enter |
408 * | |------+------+------+------+------+--------|
409 * | | | 1 | 2 | 3 | + | Enter |
410 * `-------------+------+------+------+------+--------'
411 * | | 0 | . | Calc | Calc |
412 * `----------------------------------'
413 */
414
415// [] = LAYOUT_ergodox(
416// // -----------------------------------------------------left hand-----------------------------------------------------
417// _______, _______, _______, _______, _______, _______, _______,
418// _______, _______, _______, _______, _______, _______, _______,
419// _______, _______, _______, _______, _______, _______,
420// _______, _______, _______, _______, _______, _______, _______,
421// _______, _______, _______, _______, _______,
422
423// _______, _______,
424// _______,
425// _______, _______, _______,
426
427// // -----------------------------------------------------right hand-----------------------------------------------------
428// _______, _______, _______, _______, _______, _______, _______,
429// _______, _______, _______, _______, _______, _______, _______,
430// _______, _______, _______, _______, _______, _______,
431// _______, _______, _______, _______, _______, _______, _______,
432// _______, _______, _______, _______, _______,
433
434// _______, _______,
435// _______,
436// _______, _______, _______
437// ),
438
439};
440
441bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
442 switch (keycode) {
443
444 }
445 return true;
446}
diff --git a/keyboards/ktec/ergodone/keymaps/default/keymap.c b/keyboards/ktec/ergodone/keymaps/default/keymap.c
new file mode 100644
index 000000000..2fc534401
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/default/keymap.c
@@ -0,0 +1,199 @@
1#include QMK_KEYBOARD_H
2#include "version.h"
3
4#define BASE 0 // default layer
5#define SYMB 1 // symbols
6#define MDIA 2 // media keys
7
8enum custom_keycodes {
9 PLACEHOLDER = SAFE_RANGE, // can always be here
10 EPRM,
11 VRSN,
12 RGB_SLD
13};
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16/* Keymap 0: Basic layer
17 *
18 * ,--------------------------------------------------. ,--------------------------------------------------.
19 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
20 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
21 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
22 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
23 * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
24 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
25 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
26 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
27 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
28 * `----------------------------------' `----------------------------------'
29 * ,-------------. ,-------------.
30 * | App | LGui | | Alt |Ctrl/Esc|
31 * ,------|------|------| |------+--------+------.
32 * | | | Home | | PgUp | | |
33 * | Space|Backsp|------| |------| Tab |Enter |
34 * | |ace | End | | PgDn | | |
35 * `--------------------' `----------------------'
36 */
37// If it accepts an argument (i.e, is a function), it doesn't need KC_.
38// Otherwise, it needs KC_*
39[BASE] = LAYOUT_ergodox( // layer 0 : default
40 // left hand
41 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
42 KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
43 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
44 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
45 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
46 ALT_T(KC_APP), KC_LGUI,
47 KC_HOME,
48 KC_SPC,KC_BSPC,KC_END,
49 // right hand
50 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
51 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
52 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
53 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
54 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB),
55 KC_LALT, CTL_T(KC_ESC),
56 KC_PGUP,
57 KC_PGDN,KC_TAB, KC_ENT
58 ),
59/* Keymap 1: Symbol Layer
60 *
61 * ,---------------------------------------------------. ,--------------------------------------------------.
62 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
63 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
64 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
65 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
66 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
67 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
68 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
69 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
70 * | EPRM | | | | | | | . | 0 | = | |
71 * `-----------------------------------' `----------------------------------'
72 * ,-------------. ,-------------.
73 * |Animat| | |Toggle|Solid |
74 * ,------|------|------| |------+------+------.
75 * |Bright|Bright| | | |Hue- |Hue+ |
76 * |ness- |ness+ |------| |------| | |
77 * | | | | | | | |
78 * `--------------------' `--------------------'
79 */
80// SYMBOLS
81[SYMB] = LAYOUT_ergodox(
82 // left hand
83 VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
84 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
85 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
86 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
87 EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
88 RGB_MOD,KC_TRNS,
89 KC_TRNS,
90 RGB_VAD,RGB_VAI,KC_TRNS,
91 // right hand
92 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
93 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
94 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
95 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
96 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
97 RGB_TOG, RGB_SLD,
98 KC_TRNS,
99 KC_TRNS, RGB_HUD, RGB_HUI
100),
101/* Keymap 2: Media and mouse keys
102 *
103 * ,--------------------------------------------------. ,--------------------------------------------------.
104 * | | | | | | | | | | | | | | | |
105 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
106 * | | | | MsUp | | | | | | | | | | | |
107 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
108 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
109 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
110 * | | | | | | | | | | | | Prev | Next | | |
111 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
112 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
113 * `----------------------------------' `----------------------------------'
114 * ,-------------. ,-------------.
115 * | | | | | |
116 * ,------|------|------| |------+------+------.
117 * | | | | | | |Brwser|
118 * | | |------| |------| |Back |
119 * | | | | | | | |
120 * `--------------------' `--------------------'
121 */
122// MEDIA AND MOUSE
123[MDIA] = LAYOUT_ergodox(
124 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
126 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
128 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
129 KC_TRNS, KC_TRNS,
130 KC_TRNS,
131 KC_TRNS, KC_TRNS, KC_TRNS,
132 // right hand
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
134 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
136 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
137 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
138 KC_TRNS, KC_TRNS,
139 KC_TRNS,
140 KC_TRNS, KC_TRNS, KC_WBAK
141),
142};
143
144bool process_record_user(uint16_t keycode, keyrecord_t *record) {
145 switch (keycode) {
146 // dynamically generate these.
147 case EPRM:
148 if (record->event.pressed) {
149 eeconfig_init();
150 }
151 return false;
152 break;
153 case VRSN:
154 if (record->event.pressed) {
155 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
156 }
157 return false;
158 break;
159 case RGB_SLD:
160 if (record->event.pressed) {
161 #ifdef RGBLIGHT_ENABLE
162 rgblight_mode(1);
163 #endif
164 }
165 return false;
166 break;
167 }
168 return true;
169}
170
171// Runs just one time when the keyboard initializes.
172void matrix_init_user(void) {
173
174};
175
176
177// Runs constantly in the background, in a loop.
178void matrix_scan_user(void) {
179
180 uint8_t layer = biton32(layer_state);
181
182 ergodox_board_led_off();
183 ergodox_right_led_1_off();
184 ergodox_right_led_2_off();
185 ergodox_right_led_3_off();
186 switch (layer) {
187 // TODO: Make this relevant to the ErgoDox EZ.
188 case 1:
189 ergodox_right_led_1_on();
190 break;
191 case 2:
192 ergodox_right_led_2_on();
193 break;
194 default:
195 // none
196 break;
197 }
198
199};
diff --git a/keyboards/ktec/ergodone/keymaps/default/readme.md b/keyboards/ktec/ergodone/keymaps/default/readme.md
new file mode 100644
index 000000000..1150a4f70
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/default/readme.md
@@ -0,0 +1,15 @@
1# ErgoDox EZ Default Configuration
2
3## Changelog
4
5* Dec 2016:
6 * Added LED keys
7 * Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
8* Sep 22, 2016:
9 * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
10* Feb 2, 2016 (V1.1):
11 * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
12
13This is what we ship with out of the factory. :) The image says it all:
14
15![Default](https://i.imgur.com/Be53jH7.png) \ No newline at end of file
diff --git a/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c b/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c
new file mode 100644
index 000000000..09854ee89
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c
@@ -0,0 +1,201 @@
1#include QMK_KEYBOARD_H
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6#define BASE 0 // default layer
7#define SYMB 1 // symbols
8#define MDIA 2 // media keys
9
10enum custom_keycodes {
11 PLACEHOLDER = SAFE_RANGE, // can always be here
12 EPRM,
13 VRSN,
14 RGB_SLD
15};
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18/* Keymap 0: Basic layer
19 *
20 * ,--------------------------------------------------. ,--------------------------------------------------.
21 * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | ' | 6 | 7 | 8 | 9 | 0 | = |
22 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
23 * | Del | Q | W | E | R | T | ~ | | " | Y | U | I | O | P | - |
24 * |--------+------+------+------+------+------| ` | | |------+------+------+------+------+--------|
25 * | Ctrl | A | S | D | F | G |------| |------| H | J | K | L | ; | \ |
26 * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
27 * | LAlt | Z | X | C | V | B | [ | | ] | N | M | , | . | / | LShift |
28 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
29 * | LT-1 | F4 | F5 | F6 | F11 | | Left | Down | Up | Right| RAlt |
30 * `----------------------------------' `----------------------------------'
31 * ,-------------. ,-------------.
32 * | L1 | Prev | | Vol+ | L2 |
33 * ,------|------|------| |------+--------+------.
34 * | | | Play | | Vol- | | |
35 * | Space|Backsp|------| |------| Tab |Enter |
36 * | |ace | Next | | Mute | | |
37 * `--------------------' `----------------------'
38 */
39// If it accepts an argument (i.e, is a function), it doesn't need KC_.
40// Otherwise, it needs KC_*
41[BASE] = LAYOUT_ergodox( // layer 0 : default
42 // left hand
43 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV),
44 KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV,
45 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
46 KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
47 LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11,
48 TG(SYMB), KC_MPRV,
49 KC_MPLY,
50 KC_SPC,KC_BSPC,KC_MNXT,
51 // right hand
52 KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
53 LSFT(KC_QUOT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
54 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS,
55 KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_LSFT,
56 KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_RALT,
57 KC_VOLU, TG(MDIA),
58 KC_VOLD,
59 KC_MUTE,KC_TAB, KC_ENT
60 ),
61/* Keymap 1: Symbol Layer
62 *
63 * ,---------------------------------------------------. ,--------------------------------------------------.
64 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
65 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
66 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
67 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
68 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
69 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
70 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
71 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
72 * | EPRM | | | | | | | . | 0 | = | |
73 * `-----------------------------------' `----------------------------------'
74 * ,-------------. ,-------------.
75 * |Animat| | |Toggle|Solid |
76 * ,------|------|------| |------+------+------.
77 * |Bright|Bright| | | |Hue- |Hue+ |
78 * |ness- |ness+ |------| |------| | |
79 * | | | | | | | |
80 * `--------------------' `--------------------'
81 */
82// SYMBOLS
83[SYMB] = LAYOUT_ergodox(
84 // left hand
85 VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
86 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
87 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
88 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
89 EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
90 RGB_MOD,KC_TRNS,
91 KC_TRNS,
92 RGB_VAD,RGB_VAI,KC_TRNS,
93 // right hand
94 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
95 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
96 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
97 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
98 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
99 RGB_TOG, RGB_SLD,
100 KC_TRNS,
101 KC_TRNS, RGB_HUD, RGB_HUI
102),
103/* Keymap 2: Media and mouse keys
104 *
105 * ,--------------------------------------------------. ,--------------------------------------------------.
106 * | | | | | | | | | | | | | | | |
107 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
108 * | | | | MsUp | | | | | | | | | | | |
109 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
110 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
111 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
112 * | | | | | | | | | | | | Prev | Next | | |
113 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
114 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
115 * `----------------------------------' `----------------------------------'
116 * ,-------------. ,-------------.
117 * | | | | | |
118 * ,------|------|------| |------+------+------.
119 * | | | | | | |Brwser|
120 * | | |------| |------| |Back |
121 * | | | | | | | |
122 * `--------------------' `--------------------'
123 */
124// MEDIA AND MOUSE
125[MDIA] = LAYOUT_ergodox(
126 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
128 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
129 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
131 KC_TRNS, KC_TRNS,
132 KC_TRNS,
133 KC_TRNS, KC_TRNS, KC_TRNS,
134 // right hand
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
136 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
137 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
138 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
139 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
140 KC_TRNS, KC_TRNS,
141 KC_TRNS,
142 KC_TRNS, KC_TRNS, KC_WBAK
143),
144};
145
146bool process_record_user(uint16_t keycode, keyrecord_t *record) {
147 switch (keycode) {
148 // dynamically generate these.
149 case EPRM:
150 if (record->event.pressed) {
151 eeconfig_init();
152 }
153 return false;
154 break;
155 case VRSN:
156 if (record->event.pressed) {
157 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
158 }
159 return false;
160 break;
161 case RGB_SLD:
162 if (record->event.pressed) {
163 #ifdef RGBLIGHT_ENABLE
164 rgblight_mode(1);
165 #endif
166 }
167 return false;
168 break;
169 }
170 return true;
171}
172
173// Runs just one time when the keyboard initializes.
174void matrix_init_user(void) {
175
176};
177
178
179// Runs constantly in the background, in a loop.
180void matrix_scan_user(void) {
181
182 uint8_t layer = biton32(layer_state);
183
184 ergodox_board_led_off();
185 ergodox_right_led_1_off();
186 ergodox_right_led_2_off();
187 ergodox_right_led_3_off();
188 switch (layer) {
189 // TODO: Make this relevant to the ErgoDox EZ.
190 case 1:
191 ergodox_right_led_1_on();
192 break;
193 case 2:
194 ergodox_right_led_2_on();
195 break;
196 default:
197 // none
198 break;
199 }
200
201};
diff --git a/keyboards/ktec/ergodone/keymaps/eozaki/readme.md b/keyboards/ktec/ergodone/keymaps/eozaki/readme.md
new file mode 100644
index 000000000..bfde2b2c8
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/eozaki/readme.md
@@ -0,0 +1,13 @@
1# ErgoDox EZ Based Configuration
2
3## Changelog
4
5* Aug 2018:
6 * New custom L0 layout.
7* Dec 2016:
8 * Added LED keys
9 * Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
10* Sep 22, 2016:
11 * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
12* Feb 2, 2016 (V1.1):
13 * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
diff --git a/keyboards/ktec/ergodone/keymaps/erovia/config.h b/keyboards/ktec/ergodone/keymaps/erovia/config.h
new file mode 100644
index 000000000..60c6ad4a1
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/erovia/config.h
@@ -0,0 +1,3 @@
1#pragma once
2
3#define DISABLE_SPACE_CADET_ROLLOVER
diff --git a/keyboards/ktec/ergodone/keymaps/erovia/keymap.c b/keyboards/ktec/ergodone/keymaps/erovia/keymap.c
new file mode 100644
index 000000000..279c8a57c
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/erovia/keymap.c
@@ -0,0 +1,229 @@
1#include QMK_KEYBOARD_H
2#include "version.h"
3#include "bootmagic.h"
4
5#define QWERTY 0 // qwerty layer
6#define COLEMAK 1 // colemak layer
7#define FN 2 // function layer
8
9enum custom_keycodes {
10 QWRTY = SAFE_RANGE, // can always be here
11 CLMK,
12 VRSN,
13 FNCTN
14};
15
16/* false: Caps Lock LED is off
17 true: Caps Lock LED is on */
18bool CAPS_LED = false;
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21/* Keymap 0: Qwerty layer
22 *
23 * ,--------------------------------------------------. ,--------------------------------------------------.
24 * | ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep |
25 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
26 * | Tab | Q | W | E | R | T | Mute | | { | Y | U | I | O | P | \ |
27 * |--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------|
28 * | Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
29 * |--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------|
30 * | LShift | Z | X | C | V | B | | | ] | N | M | , | . | / | RShift |
31 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
32 * |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl |
33 * `----------------------------------' `----------------------------------'
34 * ,-------------. ,-------------.
35 * | Caps | LGui | | Ins | Del |
36 * ,------|------|------| |------+--------+------.
37 * | | | Home | | PgUp | | |
38 * | Space|Backsp|------| |------| Tab |Enter |
39 * | |ace | End | | PgDn | | |
40 * `--------------------' `----------------------'
41 */
42// If it accepts an argument (i.e, is a function), it doesn't need KC_.
43// Otherwise, it needs KC_*
44[QWERTY] = LAYOUT_ergodox( // layer 0 : qwerty
45 // left hand
46 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY,
47 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE,
48 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
49 KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TT(FN),
50 KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT,
51 KC_CAPS, KC_LGUI,
52 KC_HOME,
53 KC_SPC, KC_BSPC, KC_END,
54 // right hand
55 KC_PASTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLEP,
56 KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
57 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE,
58 KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
59 KC_DOWN, KC_UP, KC_MINS, KC_EQL, KC_RCTL,
60 KC_INS, KC_DEL,
61 KC_PGUP,
62 KC_PGDN, KC_TAB, KC_ENT
63),
64/* Keymap 1: Colemak layer
65 *
66 * ,--------------------------------------------------. ,--------------------------------------------------.
67 * | ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep |
68 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
69 * | Tab | Q | W | F | P | B | Mute | | { | J | L | U | Y | ; | \ |
70 * |--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------|
71 * | Esc | A | R | S | T | G |------| |------| M | N | E | I | O | ' |
72 * |--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------|
73 * | LShift | Z | X | C | D | V | | | ] | K | H | , | . | / | RShift |
74 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
75 * |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl |
76 * `----------------------------------' `----------------------------------'
77 * ,-------------. ,-------------.
78 * | Caps | LGui | | Ins | Del |
79 * ,------|------|------| |------+--------+------.
80 * | | | Home | | PgUp | | |
81 * | Space|Backsp|------| |------| Tab |Enter |
82 * | |ace | End | | PgDn | | |
83 * `--------------------' `----------------------'
84 */
85[COLEMAK] = LAYOUT_ergodox( // layer 1 : colemak
86 // left hand
87 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY,
88 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_MUTE,
89 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G,
90 KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, TT(FN),
91 KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT,
92 KC_CAPS, KC_LGUI,
93 KC_HOME,
94 KC_SPC, KC_BSPC, KC_END,
95 // right hand
96 KC_PASTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLEP,
97 KC_LBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
98 KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOTE,
99 KC_RBRC, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
100 KC_DOWN, KC_UP, KC_MINS, KC_EQL, KC_RCTL,
101 KC_INS, KC_DEL,
102 KC_PGUP,
103 KC_PGDN, KC_TAB, KC_ENT
104),
105/* Keymap 2: Function Layer
106 *
107 * ,---------------------------------------------------. ,--------------------------------------------------.
108 * |Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
109 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
110 * | | | | Prev | Play | Next | | | | | | | | | |
111 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
112 * | | | | |VolDn | VolUp|------| |------| |QWRTY | CLMK | | | |
113 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
114 * | | | | | | | | | | | | | | | |
115 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
116 * | | | | | | | | | | | |
117 * `-----------------------------------' `----------------------------------'
118 * ,-------------. ,-------------.
119 * | | | | | |
120 * ,------|------|------| |------+------+------.
121 * | | | | | | | |
122 * | | |------| |------| | |
123 * | | | | | | | |
124 * `--------------------' `--------------------'
125 */
126// Functions
127[FN] = LAYOUT_ergodox(
128 // left hand
129 VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS,
131 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU,
132 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
134 KC_TRNS, KC_TRNS,
135 KC_TRNS,
136 KC_TRNS, KC_TRNS, KC_TRNS,
137 // right hand
138 KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
140 KC_TRNS, QWRTY, CLMK, KC_TRNS, KC_TRNS, KC_TRNS,
141 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
142 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
143 KC_TRNS, KC_TRNS,
144 KC_TRNS,
145 KC_TRNS, KC_TRNS, KC_TRNS
146),
147};
148
149bool process_record_user(uint16_t keycode, keyrecord_t *record) {
150 switch (keycode) {
151 case VRSN:
152 if (record->event.pressed) {
153 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
154 }
155 return false;
156 break;
157 case QWRTY:
158 if (record->event.pressed) {
159 set_single_persistent_default_layer(QWERTY);
160 }
161 return false;
162 break;
163 case CLMK:
164 if (record->event.pressed) {
165 set_single_persistent_default_layer(COLEMAK);
166 }
167 return false;
168 break;
169 case KC_CAPS:
170 if (record->event.pressed) {
171 // Turn LED1 On/Off for Caps Lock
172 if (CAPS_LED) {
173 ergodox_right_led_1_off();
174 CAPS_LED = false;
175 } else {
176 ergodox_right_led_1_on();
177 CAPS_LED = true;
178 }
179 }
180 return true;
181 break;
182 }
183 return true;
184};
185
186// Set LED according to the default layer
187void default_layer_led_set(void) {
188 switch (biton32(eeconfig_read_default_layer())) {
189 case COLEMAK:
190 // LED2 for COLEMAK
191 ergodox_right_led_2_on();
192 break;
193 case QWERTY:
194 // LED3 for QWERTY
195 ergodox_right_led_3_on();
196 break;
197 };
198};
199
200// Runs just one time when the keyboard initializes.
201void matrix_init_user(void) {
202 default_layer_led_set();
203};
204
205layer_state_t layer_state_set_user(layer_state_t state) {
206 ergodox_led_all_off();
207 switch (biton32(state)) {
208 case FN:
209 // Red led on Pro Micro for Fn layer
210 ergodox_board_led_on();
211 break;
212 };
213
214 if (CAPS_LED) {
215 ergodox_right_led_1_on();
216 }
217
218 default_layer_led_set();
219
220 return state;
221};
222
223void suspend_power_down_user(void) {
224 ergodox_led_all_off();
225};
226
227void suspend_wakeup_init_user(void) {
228 default_layer_led_set();
229};
diff --git a/keyboards/ktec/ergodone/keymaps/erovia/readme.md b/keyboards/ktec/ergodone/keymaps/erovia/readme.md
new file mode 100644
index 000000000..160c87598
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/erovia/readme.md
@@ -0,0 +1,76 @@
1# Erovia's ErdoDone Keymap
2
3My personal ErgoDone keymap based on the *default* keymap.
4
5**Features**
6
7* Qwerty and Colemak Mod-DH support
8* Space Cadet Shift
9* LED indicator for: active layout, CapsLock, Function layer
10
11## QWERTY (Normal) Layer
12```
13,--------------------------------------------------. ,--------------------------------------------------.
14| ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep |
15|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
16| Tab | Q | W | E | R | T | Mute | | { | Y | U | I | O | P | \ |
17|--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------|
18| Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
19|--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------|
20| LShift | Z | X | C | V | B | | | ] | N | M | , | . | / | RShift |
21`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
22 |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl |
23 `----------------------------------' `----------------------------------'
24 ,-------------. ,-------------.
25 | Caps | LGui | | Ins | Del |
26 ,------|------|------| |------+--------+------.
27 | | | Home | | PgUp | | |
28 | Space|Backsp|------| |------| Tab |Enter |
29 | |ace | End | | PgDn | | |
30 `--------------------' `----------------------'
31```
32
33## Colemak Layer
34Switch from `Fn1` layer.
35```
36,--------------------------------------------------. ,--------------------------------------------------.
37| ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep |
38|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
39| Tab | Q | W | F | P | B | Mute | | { | J | L | U | Y | ; | \ |
40|--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------|
41| Esc | A | R | S | T | G |------| |------| M | N | E | I | O | ' |
42|--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------|
43| LShift | Z | X | C | D | V | | | ] | K | H | , | . | / | RShift |
44`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
45 |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl |
46 `----------------------------------' `----------------------------------'
47 ,-------------. ,-------------.
48 | Caps | LGui | | Ins | Del |
49 ,------|------|------| |------+--------+------.
50 | | | Home | | PgUp | | |
51 | Space|Backsp|------| |------| Tab |Enter |
52 | |ace | End | | PgDn | | |
53 `--------------------' `----------------------'
54```
55
56## Function Layer
57```
58,---------------------------------------------------. ,--------------------------------------------------.
59|Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
60|---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
61| | | | Prev | Play | Next | | | | | | | | | |
62|---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
63| | | | |VolDn | VolUp|------| |------| |QWRTY | CLMK | | | |
64|---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
65| | | | | | | | | | | | | | | |
66`---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
67 | | | | | | | | | | | |
68 `-----------------------------------' `----------------------------------'
69 ,-------------. ,-------------.
70 | | | | | |
71 ,------|------|------| |------+------+------.
72 | | | | | | | |
73 | | |------| |------| | |
74 | | | | | | | |
75 `--------------------' `--------------------'
76```
diff --git a/keyboards/ktec/ergodone/keymaps/erovia/rules.mk b/keyboards/ktec/ergodone/keymaps/erovia/rules.mk
new file mode 100644
index 000000000..f7b7da719
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/erovia/rules.mk
@@ -0,0 +1 @@
COMMAND_ENABLE = no # Commands for debug and configuration
diff --git a/keyboards/ktec/ergodone/keymaps/kloki/keymap.c b/keyboards/ktec/ergodone/keymaps/kloki/keymap.c
new file mode 100644
index 000000000..87e96d20f
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/kloki/keymap.c
@@ -0,0 +1,219 @@
1#include QMK_KEYBOARD_H
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5
6#define BASE 0 // default layer
7#define QW 1 // qwerty
8#define SYMB 2 // symbols
9#define NUM 3 // media keys
10
11enum custom_keycodes {
12 PLACEHOLDER = SAFE_RANGE, // can always be here
13 EPRM,
14 VRSN,
15 RGB_SLD
16};
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19/* Keymap 0: Basic layer
20 *
21 * ,--------------------------------------------------. ,--------------------------------------------------.
22 * | Esc | 1 | 2 | 3 | 4 | 5 | SHIFT| | SYM | 6 | 7 | 8 | 9 | 0 | Bck |
23 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
24 * | Tab | Q | D | R | W | B | `~ | | "' | J | F | U | P | : | \ | |
25 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
26 * | Ctr/Es | A | S | H | T | G |------| |------| Y | N | E | O | I | Enter |
27 * |--------+------+------+------+------+------| = + | | -_ |------+------+------+------+------+--------|
28 * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | RShift |
29 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
30 * |MEH | Gui |AltShf| Left | Right| | DOWN | UP | [ | ] | ~SYM |
31 * `----------------------------------' `----------------------------------'
32 * ,-------------. ,-------------.
33 * | ESC |Home | | PgUp | QW |
34 * ,------|------|------| |------+--------+------.
35 * | | ENT | End | | PgDn | | |
36 * | Space| WIN |------| |------| Tab |Back |
37 * | SYM | | SCTR | | SALT | SYM | |
38 * `--------------------' `----------------------'
39 */
40
41[BASE] = LAYOUT_ergodox( // layer 0 : default
42 // left hand
43 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSFT,
44 KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_GRV,
45 CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G,
46 KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_EQL,
47 KC_MEH, KC_LGUI, KC_LALT, KC_LEFT,KC_RGHT,
48 KC_ESC, KC_HOME,
49 KC_END,
50 LT(SYMB, KC_SPC), LGUI_T(KC_ENT), S(KC_LGUI),
51 // right hand
52 TG(NUM), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
53 KC_QUOT, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
54 KC_Y, KC_N, KC_E, KC_O, KC_I , KC_ENT,
55 KC_MINS, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
56 KC_DOWN,KC_UP, KC_LBRC,KC_RBRC, MO(SYMB),
57 KC_PGUP, TG(QW),
58 KC_PGDN,
59 S(KC_LALT),LT(SYMB, KC_TAB), KC_BSPC
60 ),
61
62[QW] = LAYOUT_ergodox(
63 _______, _______, _______, _______, _______, _______, _______,
64 _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______,
65 _______, KC_A, KC_S, KC_D, KC_F, KC_G,
66 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______,
67 _______, _______, _______, _______, _______,
68 _______, _______,
69 _______,
70 _______, _______, _______,
71 // right hand
72 _______, _______, _______, _______, _______, _______, _______,
73 _______, KC_Y, KC_U, KC_I , KC_O, KC_P, _______,
74 KC_H, KC_J, KC_K , KC_L, KC_SCLN, _______,
75 _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
76 _______, _______, _______, _______, _______,
77 _______, _______,
78 _______,
79 _______, _______, _______
80),
81/* Keymap 1: Symbol Layer
82 *
83 * ,---------------------------------------------------. ,--------------------------------------------------.
84 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL |
85 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
86 * | | ! | @ | { | } | * | | | | < | H | U | PU | * | |
87 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
88 * | | # | $ | ( | ) | ` |------| |------| > | L | D | R | + | |
89 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
90 * | | % | ^ | [ | ] | ~ | | | | & | E | D | PD | \ | |
91 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
92 * | | | | | | | | | | | |
93 * `-----------------------------------' `----------------------------------'
94 * ,-------------. ,-------------.
95 * | | | | | |
96 * ,------|------|------| |------+------+------.
97 * | | | | | | | |
98 * | | |------| |------| | |
99 * | | | | | | | |
100 * `--------------------' `--------------------'
101 */
102// SYMBOLS
103[SYMB] = LAYOUT_ergodox(
104 // left hand
105 _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
106 _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_ASTR,_______,
107 _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
108 _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______,
109 _______,_______,_______,_______,_______,
110 _______,_______,
111 _______,
112 _______,_______,_______,
113 // right hand
114 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
115 _______, KC_LABK, KC_HOME, KC_UP, KC_PGUP, KC_ASTR, _______,
116 KC_RABK, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PLUS, _______,
117 _______, KC_AMPR, KC_END, KC_DOWN, KC_PGDN, KC_BSLS, _______,
118 _______, _______, _______, _______, _______,
119 _______, _______,
120 _______,
121 _______, _______, _______
122),
123/* Keymap 2: Media and mouse keys
124 *
125 * ,--------------------------------------------------. ,--------------------------------------------------.
126 * | | | | | | | | | | | | | | | |
127 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
128 * | | | L | MsUp | R | | | | | | 4 | 5 | 6 | | TAB |
129 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
130 * | | |MsLeft|MsDown|MsRght| |------| |------| | 1 | 2 | 3 | | |
131 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
132 * | | | | | | | | | | | | 0 | 0 | | |
133 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
134 * | | | | | | | | | | | |
135 * `----------------------------------' `----------------------------------'
136 * ,-------------. ,-------------.
137 * | | | | | |
138 * ,------|------|------| |------+------+------.
139 * | | | | | | | |
140 * | | |------| |------| | |
141 * | | | | | | | |
142 * `--------------------' `--------------------'
143 */
144[NUM] = LAYOUT_ergodox(
145 _______, _______, _______, _______, _______, _______, _______,
146 _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,
147 _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______,
148 _______, _______, _______, _______, _______, _______, _______,
149 _______, _______, _______, _______, _______,
150 _______, _______,
151 _______,
152 _______, _______, _______,
153 // right hand
154 _______, _______, _______, _______, _______, _______, _______,
155 _______, _______, KC_4, KC_5 , KC_6, _______, KC_TAB,
156 _______, KC_1, KC_2 , KC_3, _______, _______,
157 _______, _______, _______, KC_0, KC_0, _______, _______,
158 _______, _______, _______, _______, _______,
159 _______, _______,
160 _______,
161 _______, _______, _______
162),
163};
164
165bool process_record_user(uint16_t keycode, keyrecord_t *record) {
166 switch (keycode) {
167 // dynamically generate these.
168 case EPRM:
169 if (record->event.pressed) {
170 eeconfig_init();
171 }
172 return false;
173 break;
174 case VRSN:
175 if (record->event.pressed) {
176 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
177 }
178 return false;
179 break;
180 case RGB_SLD:
181 if (record->event.pressed) {
182 #ifdef RGBLIGHT_ENABLE
183 rgblight_mode(1);
184 #endif
185 }
186 return false;
187 break;
188 }
189 return true;
190}
191
192// Runs just one time when the keyboard initializes.
193void matrix_init_user(void) {
194
195};
196
197
198// Runs constantly in the background, in a loop.
199void matrix_scan_user(void) {
200
201 uint8_t layer = biton32(layer_state);
202
203 ergodox_board_led_off();
204 ergodox_right_led_1_off();
205 ergodox_right_led_2_off();
206 ergodox_right_led_3_off();
207 switch (layer) {
208 case 1:
209 ergodox_board_led_on();
210 break;
211 case 3:
212 ergodox_board_led_on();
213 break;
214 default:
215 // none
216 break;
217 }
218
219};
diff --git a/keyboards/ktec/ergodone/keymaps/kloki/readme.md b/keyboards/ktec/ergodone/keymaps/kloki/readme.md
new file mode 100644
index 000000000..a9ebaba67
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/kloki/readme.md
@@ -0,0 +1,7 @@
1# Kloki's ergodone layout
2
3-workman
4-qwerty layer
5-num layer
6-overloaded modifier
7-a lot of duplicated keys to make common shortcuts work \ No newline at end of file
diff --git a/keyboards/ktec/ergodone/keymaps/vega/keymap.c b/keyboards/ktec/ergodone/keymaps/vega/keymap.c
new file mode 100644
index 000000000..ee6c56bf9
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/vega/keymap.c
@@ -0,0 +1,555 @@
1#include QMK_KEYBOARD_H
2
3enum layer_names {
4 BASE,
5 GREL,
6 GREU,
7 SYMB,
8 MATH,
9 QWER,
10 FNLR
11};
12
13enum unicode_names {
14 //MATH
15 neq, //≠
16 intgrl, //∫
17 angl, //∠
18 imply, //⇒
19 equiv, //⇔
20 porp, //∝
21 exists, //∃
22 nexists, //∄
23 forall, //∀
24 and, //∧
25 or, //∨
26 xor, //⊕
27 apeql, //≅
28 root, //√
29 not, //¬
30 sum, //∑
31 plsminus, //±
32 infin, //∞
33 emtyset, //∅
34 Mn, //ℕ
35 Mz, //ℤ
36 Mq, //ℚ
37 Mr, //ℝ
38 Mc, //ℂ
39 eleof, //∈
40 member, //∋
41 neleof, //∉
42 nmember, //∌
43 subsetof, //⊂
44 suprsetof, //⊃
45 intersection, //∩
46 Munion, //∪
47
48 //SYMB
49 arwl,
50 arwu,
51 arwr,
52 arwd,
53
54 uxclm,
55 cent,
56 degree,
57 trade,
58 copy,
59 numero,
60 sect,
61 mdot,
62 rang,
63
64
65 lshade,
66 mshade,
67 dshade,
68
69 fire,
70 water,
71 cleft,
72 baster,
73 neteen,
74 floppy,
75
76 boxemp,
77 boxchk,
78 boxX,
79
80 bbstr,
81 bbstl,
82 bbml,
83 bbmr,
84 bbmb,
85 bbrtr,
86 bbrbr,
87 bbrtl,
88 bbrbl,
89 bbsbr,
90 bbsbl,
91 bbmbr,
92 bbmbl,
93
94 Agrave,
95 Aacute,
96 Acircm,
97 Atilde,
98 Abreve,
99 Adiaer,
100 Adacut,
101
102 // not all ogham letters, as I
103 // actually intend to use them for hex
104 OS,
105 Oa,
106 Ob,
107 Oc,
108 Od,
109 Oe,
110 Of,
111 Og,
112 Oh,
113 Oi,
114 OA,
115 OB,
116 OC,
117 OD,
118 OE,
119 OF,
120 Os,
121 OED,
122 Ox,
123 gnd,
124 sqr,
125 sine,
126 opt,
127
128 geq,
129 leq,
130 brkup,
131 brkdn,
132 perup,
133 perdn,
134
135 //GREEL
136 rone, // 1:: ⅰ
137 rtwo,
138 rthree,
139 rfour, // 4:: ⅳ
140 rfive, // 5:: ⅴ
141 rsix, // 6:: ⅵ
142 rseven, // 7:: ⅶ
143 reight, // 8:: ⅷ
144 rnine, // 9:: ⅸ
145 rten, // 0:: ⅹ
146 gq, // q:: θ
147 gw, // w:: ω
148 ge, // e:: ε
149 gr, // r:: ρ
150 gt, // t:: τ
151 gy, // y:: ψ
152 gu, // u:: υ
153 gi, // i:: ι
154 go, // o:: ο
155 gp, // p:: π
156 ga, // a:: α
157 gs, // s:: σ
158 gd, // d:: δ
159 gf, // f:: φ
160 gg, // g:: γ
161 gh, // h:: η
162 gj, // j:: ϑ
163 gk, // k:: κ
164 gl, // l:: λ
165 gz, // z:: ζ
166 gx, // x:: ξ
167 gc, // c:: χ
168 gv, // v:: ς
169 gb, // b:: β
170 gn, // n:: ν
171 gm, // m:: μ
172
173 //GREEU
174 Rone, // 1:: Ⅰ
175 Rtwo, // 2:: Ⅱ
176 Rthree, // 3:: Ⅲ
177 Rfour, // 4:: Ⅳ
178 Rfive, // 5:: Ⅴ
179 Rsix, // 6:: Ⅵ
180 Rseven, // 7:: Ⅶ
181 Reight, // 8:: Ⅷ
182 Rnine, // 9:: Ⅸ
183 Rten,
184 Gq, // Q:: Θ
185 Gw, // W:: Ω
186 Ge, // E:: Ε
187 Gr, // R:: Ρ
188 Gt, // T:: Τ
189 Gy, // Y:: Ψ
190 Gu, // U:: Υ
191 Gi, // I:: Ι
192 Go, // O:: Ο
193 Gp, // P:: Π
194 Ga, // A:: Α
195 Gs, // S:: Σ
196 Gd, // D:: Δ
197 Gf, // F:: Φ
198 Gg, // G:: Γ
199 Gh, // H:: Η
200 Gj, // J:: J
201 Gk, // K:: Κ
202 Gl, // L:: Λ
203 Gz, // Z:: Ζ
204 Gx, // X:: Ξ
205 Gc, // C:: Χ
206 Gv, // V:: V
207 Gb, // B:: Β
208 Gn, // N:: Ν
209 Gm, // M:: Μ
210};
211
212const uint32_t PROGMEM unicode_map[] = {
213 //MATH
214 [neq] = 0x2260, //≠
215 [intgrl] = 0x222B, //∫
216 [angl] = 0x2220, //∠
217 [imply] = 0x21D2, //⇒
218 [equiv] = 0x21D4, //⇔
219 [porp] = 0x221D, //∝
220 [exists] = 0x2203, //∃
221 [nexists] = 0x2204, //∄
222 [forall] = 0x2200, //∀
223 [and] = 0x2227, //∧
224 [or] = 0x2228, //∨
225 [xor] = 0x2295, //⊕
226 [apeql] = 0x2245, //≅
227 [root] = 0x221A, //√
228 [not] = 0x00AC, //¬
229 [sum] = 0x2211, //∑
230 [plsminus] = 0x00B1, //±
231 [infin] = 0x221E, //∞
232 [emtyset] = 0x2205, //∅
233 [Mn] = 0x2115, //ℕ
234 [Mz] = 0x2124, //ℤ
235 [Mq] = 0x211A, //ℚ
236 [Mr] = 0x211D, //ℝ
237 [Mc] = 0x2102, //ℂ
238 [eleof] = 0x2208, //∈
239 [member] = 0x220B, //∋
240 [neleof] = 0x2209, //∉
241 [nmember] = 0x220C, //∌
242 [subsetof] = 0x2282, //⊂
243 [suprsetof] = 0x2283, //
244 [intersection] = 0x2229, //∩
245 [Munion] = 0x222A, //∪
246 //Symbol
247 [arwl] = 0x2190, //←
248 [arwu] = 0x2191, //↑
249 [arwr] = 0x2192, //→
250 [arwd] = 0x2193, //↓
251
252 [uxclm] = 0x00A1, //¡
253 [cent] = 0x00A2, //¢
254 [degree] = 0x00B0, //°
255 [trade] = 0x2122, //™
256 [copy] = 0x00A9, //©
257 [numero] = 0x2116, //№
258 [sect] = 0x00A7, //§
259 [mdot] = 0x00B7, //·
260 [rang] = 0x299C, //⦜
261
262
263 [lshade] = 0x2591,//░
264 [mshade] = 0x2592,//▒
265 [dshade] = 0x2593,//▓
266
267 [fire] = 0x1F525, //🔥
268 [water] = 0x1F322, //🌢
269 [cleft] = 0x1F12F, //🄯
270 [baster] = 0x1F7BC, //🞼
271 [neteen] = 0x1F51E, //🔞
272 [floppy] = 0x1F5AB, //🖫
273
274 [boxemp] = 0x2610, //☐
275 [boxchk] = 0x2611, //☑
276 [boxX] = 0x2612, //☒
277
278 [bbstr] = 0x23A1, //⎡
279 [bbstl] = 0x23A4, //⎤
280 [bbml] = 0x23A8, //⎨
281 [bbmr] = 0x23AC, //⎬
282 [bbmb] = 0x23AA, //⎪
283 [bbrtr] = 0x23A7, //⎧
284 [bbrbr] = 0x23A9, //⎩
285 [bbrtl] = 0x23AB, //⎫
286 [bbrbl] = 0x23AD, //⎭
287 [bbsbr] = 0x23A3, //⎣
288 [bbsbl] = 0x23A6, //⎦
289 [bbmbr] = 0x23A5, //⎥
290 [bbmbl] = 0x23A2, //⎢
291
292 [Agrave] = 0x0300,//è //above [wtf] = 0x1242A, //𒐪
293 [Aacute] = 0x0301,//é //1st
294 [Acircm] = 0x0302,//ê //2nd
295 [Atilde] = 0x0303,//ẽ //5th
296 [Abreve] = 0x0306,//ĕ //4th
297 [Adiaer] = 0x0308,//ë //3rd
298 [Adacut] = 0x030B,//e̋
299
300 // not all ogham letters, as I
301 // actually intend to use them for hex
302 [OS] = 0x1680,//space
303 [Oa] = 0x1681,//1
304 [Ob] = 0x1682,//2
305 [Oc] = 0x1683,//3
306 [Od] = 0x1684,//4
307 [Oe] = 0x1685,//5
308 [Of] = 0x1686,//6
309 [Og] = 0x1687,//7
310 [Oh] = 0x1688,//8
311 [Oi] = 0x1689,//9
312 [OA] = 0x168A,//A
313 [OB] = 0x168B,//B
314 [OC] = 0x168C,//C
315 [OD] = 0x168D,//D
316 [OE] = 0x168E,//E
317 [OF] = 0x168F,//F
318 [Os] = 0x169B,//Start
319 [OED] = 0x169C,//End
320 [Ox] = 0x1695,//X
321
322 [gnd] = 0x23DA,//⏚
323 [sqr] = 0x238D,//⎍, actually monostable
324 [sine] = 0x223F,//∿
325 [opt] = 0x2325,//⌥, actually option used for switch
326
327 [geq] = 0x2264, //≤
328 [leq] = 0x2265, //≥
329 [brkup] = 0xFE38, //︸
330 [brkdn] = 0xFE37, //︷
331 [perup] = 0xFE35, //︵
332 [perdn] = 0xFE36, //︶
333 //GREEKL
334 [rone] = 0x2170, // 1:: ⅰ
335 [rtwo] = 0x2171, // 2:: ⅱ
336 [rthree] = 0x2172, // 3:: ⅲ
337 [rfour] = 0x2173, // 4:: ⅳ
338 [rfive] = 0x2174, // 5:: ⅴ
339 [rsix] = 0x2175, // 6:: ⅵ
340 [rseven] = 0x2176, // 7:: ⅶ
341 [reight] = 0x2177, // 8:: ⅷ
342 [rnine] = 0x2178, // 9:: ⅸ
343 [rten] = 0x2179, // 0:: ⅹ
344 [gq] = 0x03B8, // q:: θ
345 [gw] = 0x03C9, // w:: ω
346 [ge] = 0x03B5, // e:: ε
347 [gr] = 0x03C1, // r:: ρ
348 [gt] = 0x03C4, // t:: τ
349 [gy] = 0x03C8, // y:: ψ
350 [gu] = 0x03C5, // u:: υ
351 [gi] = 0x03B9, // i:: ι
352 [go] = 0x03BF, // o:: ο
353 [gp] = 0x03C0, // p:: π
354 [ga] = 0x03B1, // a:: α
355 [gs] = 0x03C3, // s:: σ
356 [gd] = 0x03B4, // d:: δ
357 [gf] = 0x03C6, // f:: φ
358 [gg] = 0x03B3, // g:: γ
359 [gh] = 0x03B7, // h:: η
360 [gj] = 0x03D1, // j:: ϑ
361 [gk] = 0x03BA, // k:: κ
362 [gl] = 0x03BB, // l:: λ
363 [gz] = 0x03B6, // z:: ζ
364 [gx] = 0x03BE, // x:: ξ
365 [gc] = 0x03C7, // c:: χ
366 [gv] = 0x03C2, // v:: ς
367 [gb] = 0x03B2, // b:: β
368 [gn] = 0x03BD, // n:: ν
369 [gm] = 0x03BC, // m:: μ
370 //GREEKU
371 [Rone] = 0x2160, // 1:: Ⅰ
372 [Rtwo] = 0x2161, // 2:: Ⅱ
373 [Rthree] = 0x2162, // 3:: Ⅲ
374 [Rfour] = 0x2163, // 4:: Ⅳ
375 [Rfive] = 0x2164, // 5:: Ⅴ
376 [Rsix] = 0x2165, // 6:: Ⅵ
377 [Rseven] = 0x2166, // 7:: Ⅶ
378 [Reight] = 0x2167, // 8:: Ⅷ
379 [Rnine] = 0x2168, // 9:: Ⅸ
380 [Rten] = 0x2169, // 0:: Ⅹ
381 [Gq] = 0x0398, // Q:: Θ
382 [Gw] = 0x03A9, // W:: Ω
383 [Ge] = 0x0395, // E:: Ε
384 [Gr] = 0x03A1, // R:: Ρ
385 [Gt] = 0x03A4, // T:: Τ
386 [Gy] = 0x03A8, // Y:: Ψ
387 [Gu] = 0x03A5, // U:: Υ
388 [Gi] = 0x0399, // I:: Ι
389 [Go] = 0x039F, // O:: Ο
390 [Gp] = 0x03A0, // P:: Π
391 [Ga] = 0x0391, // A:: Α
392 [Gs] = 0x03A3, // S:: Σ
393 [Gd] = 0x0394, // D:: Δ
394 [Gf] = 0x03A6, // F:: Φ
395 [Gg] = 0x0393, // G:: Γ
396 [Gh] = 0x0397, // H:: Η
397 [Gj] = 0x004A, // J:: J
398 [Gk] = 0x039A, // K:: Κ
399 [Gl] = 0x039B, // L:: Λ
400 [Gz] = 0x0396, // Z:: Ζ
401 [Gx] = 0x039E, // X:: Ξ
402 [Gc] = 0x03A7, // C:: Χ
403 [Gv] = 0x0056, // V:: V
404 [Gb] = 0x0392, // B:: Β
405 [Gn] = 0x039D, // N:: Ν
406 [Gm] = 0x039C, // M:: Μ
407};
408
409const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
410
411[BASE] = LAYOUT_ergodox( // layer 0 : default
412 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV,
413 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSLS,
414 KC_EQL, KC_A, KC_O, KC_E, KC_U, KC_I,
415 KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_AMPR,
416 OSL(FNLR), TT(GREL), TT(MATH), KC_UP, KC_DOWN,
417 KC_LBRC, KC_HOME, KC_INS, KC_SPC, KC_LGUI, KC_DEL,
418
419 OSL(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
420 KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
421 KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
422 KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC,
423 KC_LEFT, KC_RIGHT, KC_RALT, TT(SYMB), TT(QWER),
424 KC_END, KC_RBRC, KC_PSCR, KC_RALT, KC_RCTL, KC_ENT
425),
426
427[FNLR] = LAYOUT_ergodox(
428 // left hand
429 UC_M_LN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO,
430 UC_M_WC,KC_F11, KC_F12, KC_F13,KC_F14, KC_F15, KC_NO,
431 KC_NO,KC_F21, KC_F22, KC_F23,KC_F24, KC_NO,
432 KC_NO,KC_PAUSE,KC_PSCR,KC_SLCK,KC_NO,KC_NO,KC_NO,
433 EEP_RST,TO(BASE),TO(BASE),TO(BASE),TO(BASE),
434 KC_NO,KC_NO,
435 KC_NO,
436 KC_NO,KC_NO,KC_NO,
437 // right hand
438 TO(BASE), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, UC_M_LN,
439 KC_NO, KC_F16, KC_F17,KC_F18, KC_F19, KC_F20, UC_M_WI,
440 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
441 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
442 KC_NO,KC_NO, KC_NO, KC_NO, KC_NO,
443 KC_NO, KC_NO,
444 KC_NO,
445 KC_NO, KC_RCTL, KC_NO
446),
447
448[QWER] = LAYOUT_ergodox(
449 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV,
450 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLS,
451 KC_AMPR, KC_A, KC_S, KC_D, KC_F, KC_G,
452 KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_QUOT,
453 KC_BSLS, KC_LCTL, KC_LGUI, KC_RALT, KC_APP,
454 KC_LBRC, KC_HOME, KC_PGUP, KC_SPC, KC_LSFT, KC_PGDN,
455
456 OSL(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
457 KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH,
458 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
459 KC_EQL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
460 KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, TO(BASE),
461 KC_END, KC_INS, KC_DEL, KC_RGHT, KC_ENT, KC_SPC
462),
463
464[MATH] = LAYOUT_ergodox(
465 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV,
466 KC_TAB, X(Mc), X(Munion), X(arwl), X(or), X(exists), KC_BSLASH,
467 X(arwr), X(root), X(and), X(imply), X(nexists), X(forall),
468 KC_LSPO, KC_SCLN, X(intgrl), X(Mn), X(Mz), X(member), X(arwl),
469 KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL,
470 KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN,
471
472 TT(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
473 KC_PGUP, X(plsminus), X(infin), X(neleof), X(equiv), X(Mq), KC_EQL,
474 X(sum), X(emtyset), X(porp), X(suprsetof), X(not), X(neq),
475 KC_PGDN, X(subsetof), X(intersection), X(angl), X(nmember), X(eleof), KC_RSPC,
476 KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE),
477 KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC
478),
479
480[SYMB] = LAYOUT_ergodox(
481 X(Os), X(Oa), X(Ob), X(Oc), X(Od), X(Oe), X(mdot),
482 X(boxemp), X(bbstr), X(bbrtr), X(bbrtl), X(bbstl), X(degree), X(brkdn),
483 X(boxchk), X(bbmbl), X(bbml), X(bbmr), X(bbmbr), X(neteen),
484 X(boxX), X(bbsbr), X(bbrbr), X(bbrbl), X(bbsbl), X(uxclm), X(brkup),
485 X(floppy), TO(BASE), TO(BASE), X(arwu), X(arwd),
486 X(fire), X(lshade), X(mshade), KC_SPC, X(OS), X(dshade),
487
488 X(Ox), X(Of), X(Og), X(Oh), X(Oi), X(OA), X(OB),
489 X(numero), X(trade), X(copy), X(cleft), X(cent), X(OED), X(OC),
490 X(Agrave), X(gnd), X(sqr), X(sine), X(opt), X(OD),
491 X(sect), X(Aacute), X(Acircm), X(Adiaer), X(Abreve), X(Atilde), X(OE),
492 X(arwl), X(arwr), X(geq), X(leq), X(OF),
493 X(rang), X(water), X(perup), X(perdn), X(baster), KC_ENT
494),
495
496[GREL] = LAYOUT_ergodox(
497 KC_ESC, X(Rone), X(Rtwo), X(Rthree), X(Rfour), X(Rfive), KC_GRV,
498 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(gp), X(gy), KC_SLSH,
499 KC_SLSH, X(ga), X(go), X(ge), X(gu), X(gi),
500 MO(GREU), KC_SCLN, X(gq), X(gj), X(gk), X(gx), KC_AMPR,
501 KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL,
502 KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN,
503
504 TO(BASE), X(Rsix), X(Rseven), X(Reight), X(Rnine), X(Rten), KC_BSPC,
505 KC_PGUP, X(gf), X(gg), X(gc), X(gr), X(gl), KC_EQL,
506 X(gd), X(gh), X(gt), X(gn), X(gs), KC_MINS,
507 KC_PGDN, X(gb), X(gm), X(gw), X(gv), X(gz), MO(GREU),
508 KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE),
509 KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC
510),
511
512[GREU] = LAYOUT_ergodox(
513 KC_ESC, X(Rone), X(Rtwo), X(Rthree), X(Rfour), X(Rfive), KC_GRV,
514 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(Gp), X(Gy), KC_SLSH,
515 KC_SLSH, X(Ga), X(Go), X(Ge), X(Gu), X(Gi),
516 KC_TRNS, KC_SCLN, X(Gq), X(Gj), X(Gk), X(Gx), KC_AMPR,
517 KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL,
518 KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN,
519
520 TO(BASE), X(Rsix), X(Rseven), X(Reight), X(Rnine), X(Rten), KC_BSPC,
521 KC_PGUP, X(Gf), X(Gg), X(Gc), X(Gr), X(Gl), KC_EQL,
522 X(Gd), X(Gh), X(Gt), X(Gn), X(Gs), KC_MINS,
523 KC_PGDN, X(Gb), X(Gm), X(Gw), X(Gv), X(Gz), KC_TRNS,
524 KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE),
525 KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC
526),
527
528};
529
530// Runs just one time when the keyboard initializes.
531void matrix_init_user(void) {
532
533};
534
535// Runs constantly in the background, in a loop.
536void matrix_scan_user(void) {
537 uint8_t layer = biton32(layer_state);
538
539 ergodox_board_led_off();
540 ergodox_right_led_1_off();
541 ergodox_right_led_2_off();
542 ergodox_right_led_3_off();
543 switch (layer) {
544 // TODO: Make this relevant to the ErgoDox EZ.
545 case 1:
546 ergodox_right_led_1_on();
547 break;
548 case 2:
549 ergodox_right_led_2_on();
550 break;
551 default:
552 // none
553 break;
554 }
555};
diff --git a/keyboards/ktec/ergodone/keymaps/vega/rules.mk b/keyboards/ktec/ergodone/keymaps/vega/rules.mk
new file mode 100644
index 000000000..d4b854722
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/vega/rules.mk
@@ -0,0 +1,2 @@
1UNICODE_ENABLE = no # Unicode
2UNICODEMAP_ENABLE = yes
diff --git a/keyboards/ktec/ergodone/keymaps/via/config.h b/keyboards/ktec/ergodone/keymaps/via/config.h
new file mode 100644
index 000000000..fc7744c76
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/via/config.h
@@ -0,0 +1,18 @@
1 /* Copyright HarshitGoel96 2021
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 //Keymap specific config.h
17#pragma once
18#define DYNAMIC_KEYMAP_LAYER_COUNT 4 \ No newline at end of file
diff --git a/keyboards/ktec/ergodone/keymaps/via/keymap.c b/keyboards/ktec/ergodone/keymaps/via/keymap.c
new file mode 100644
index 000000000..f155a4b51
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/via/keymap.c
@@ -0,0 +1,196 @@
1 /* Copyright HarshitGoel96 2021
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
18enum layer_names {
19 QRTY, // qwerty above workman to make sure transparent does not catch unwanted keycode
20 SYMB, // symbols
21 MDIA, // media keys
22 EXTRA, // added extra layer for via
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26/* Keymap 0: Basic layer
27 *
28 * ,--------------------------------------------------. ,--------------------------------------------------.
29 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
30 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
31 * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
32 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
33 * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
34 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
35 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
36 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
37 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
38 * `----------------------------------' `----------------------------------'
39 * ,-------------. ,-------------.
40 * | App | LGui | | Alt |Ctrl/Esc|
41 * ,------|------|------| |------+--------+------.
42 * | | | Home | | PgUp | | |
43 * | Space|Backsp|------| |------| Tab |Enter |
44 * | |ace | End | | PgDn | | |
45 * `--------------------' `----------------------'
46 */
47// If it accepts an argument (i.e, is a function), it doesn't need KC_.
48// Otherwise, it needs KC_*
49
50[QRTY] = LAYOUT_ergodox( // layer 0 : default
51 // left hand
52 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
53 KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
54 KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
55 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
56 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
57 ALT_T(KC_APP), KC_LGUI,
58 KC_HOME,
59 KC_SPC,KC_BSPC,KC_END,
60 // right hand
61 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
62 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
63 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
64 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
65 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB),
66 KC_LALT, CTL_T(KC_ESC),
67 KC_PGUP,
68 KC_PGDN,KC_TAB, KC_ENT
69 ),
70/* Keymap 1: Symbol Layer
71 *
72 * ,---------------------------------------------------. ,--------------------------------------------------.
73 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
74 * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
75 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
76 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
77 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
78 * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
79 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
80 * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
81 * | EEP_RST | | | | | | | . | 0 | = | |
82 * `-----------------------------------' `----------------------------------'
83 * ,-------------. ,-------------.
84 * |Animat| | |Toggle|Solid |
85 * ,------|------|------| |------+------+------.
86 * |Bright|Bright| | | |Hue- |Hue+ |
87 * |ness- |ness+ |------| |------| | |
88 * | | | | | | | |
89 * `--------------------' `--------------------'
90 */
91// SYMBOLS
92[SYMB] = LAYOUT_ergodox(
93 // left hand
94 KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
95 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
96 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
97 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
98 EEP_RST ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
99 RGB_MOD,KC_TRNS,
100 KC_TRNS,
101 RGB_VAD,RGB_VAI,KC_TRNS,
102 // right hand
103 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
104 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
105 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
106 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
107 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
108 RGB_TOG, RGB_M_P ,
109 KC_TRNS,
110 KC_TRNS, RGB_HUD, RGB_HUI
111),
112/* Keymap 2: Media and mouse keys
113 *
114 * ,--------------------------------------------------. ,--------------------------------------------------.
115 * | | | | | | | | | | | | | | | |
116 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
117 * | | | | MsUp | | | | | | | | | | | |
118 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
119 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
120 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
121 * | | | | | | | | | | | | Prev | Next | | |
122 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
123 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
124 * `----------------------------------' `----------------------------------'
125 * ,-------------. ,-------------.
126 * | | | | | |
127 * ,------|------|------| |------+------+------.
128 * | | | | | | |Brwser|
129 * | | |------| |------| |Back |
130 * | | | | | | | |
131 * `--------------------' `--------------------'
132 */
133// MEDIA AND MOUSE
134[MDIA] = LAYOUT_ergodox(
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
136 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
137 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
138 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
140 KC_TRNS, KC_TRNS,
141 KC_TRNS,
142 KC_TRNS, KC_TRNS, KC_TRNS,
143 // right hand
144 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
145 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
146 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
147 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
148 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
149 KC_TRNS, KC_TRNS,
150 KC_TRNS,
151 KC_TRNS, KC_TRNS, KC_WBAK
152),
153[EXTRA] = LAYOUT_ergodox(
154 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
155 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
156 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
157 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
158 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
159 KC_TRNS, KC_TRNS,
160 KC_TRNS,
161 KC_TRNS, KC_TRNS, KC_TRNS,
162 // right hand
163 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
164 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
165 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
166 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
167 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
168 KC_TRNS, KC_TRNS,
169 KC_TRNS,
170 KC_TRNS, KC_TRNS, KC_WBAK
171)
172};
173
174// Runs constantly in the background, in a loop.
175
176layer_state_t layer_state_set_user(layer_state_t state) {
177 ergodox_board_led_off();
178 ergodox_right_led_1_off();
179 ergodox_right_led_2_off();
180 ergodox_right_led_3_off();
181 switch (get_highest_layer(state)) {
182 case 1:
183 ergodox_right_led_1_on();
184 break;
185 case 2:
186 ergodox_right_led_2_on();
187 break;
188 case 3:
189 ergodox_right_led_3_on();
190 break;
191 default:
192 // none
193 break;
194 }
195 return state;
196}
diff --git a/keyboards/ktec/ergodone/keymaps/via/readme.md b/keyboards/ktec/ergodone/keymaps/via/readme.md
new file mode 100644
index 000000000..223cb892b
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/via/readme.md
@@ -0,0 +1,5 @@
1
2## Changelog
3HarshitGoel96
4
5I love my ergodone, but it needed via, so here it is. Flash using HIDBOOTLOADER as described in keyboard root read.md and enjoy via on ergodone. \ No newline at end of file
diff --git a/keyboards/ktec/ergodone/keymaps/via/rules.mk b/keyboards/ktec/ergodone/keymaps/via/rules.mk
new file mode 100644
index 000000000..43061db1d
--- /dev/null
+++ b/keyboards/ktec/ergodone/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/ktec/ergodone/matrix.c b/keyboards/ktec/ergodone/matrix.c
new file mode 100644
index 000000000..3973ff348
--- /dev/null
+++ b/keyboards/ktec/ergodone/matrix.c
@@ -0,0 +1,256 @@
1#include <stdint.h>
2#include <stdbool.h>
3#include <avr/io.h>
4#include "wait.h"
5#include "action_layer.h"
6#include "print.h"
7#include "debug.h"
8#include "util.h"
9#include "matrix.h"
10#include "ergodone.h"
11#include "expander.h"
12
13/*
14 * This constant define not debouncing time in msecs, but amount of matrix
15 * scan loops which should be made to get stable debounced results.
16 *
17 * On Ergodox matrix scan rate is relatively low, because of slow I2C.
18 * Now it's only 317 scans/second, or about 3.15 msec/scan.
19 * According to Cherry specs, debouncing time is 5 msec.
20 *
21 * And so, there is no sense to have DEBOUNCE higher than 2.
22 */
23
24#ifndef DEBOUNCE
25# define DEBOUNCE 5
26#endif
27
28/* matrix state(1:on, 0:off) */
29static matrix_row_t matrix[MATRIX_ROWS];
30
31// Debouncing: store for each key the number of scans until it's eligible to
32// change. When scanning the matrix, ignore any changes in keys that have
33// already changed in the last DEBOUNCE scans.
34static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
35
36static matrix_row_t read_cols(uint8_t row);
37static void init_cols(void);
38static void unselect_rows(void);
39static void select_row(uint8_t row);
40
41__attribute__ ((weak))
42void matrix_init_user(void) {}
43
44__attribute__ ((weak))
45void matrix_scan_user(void) {}
46
47__attribute__ ((weak))
48void matrix_init_kb(void) {
49 matrix_init_user();
50}
51
52__attribute__ ((weak))
53void matrix_scan_kb(void) {
54 matrix_scan_user();
55}
56
57inline
58uint8_t matrix_rows(void)
59{
60 return MATRIX_ROWS;
61}
62
63inline
64uint8_t matrix_cols(void)
65{
66 return MATRIX_COLS;
67}
68
69void matrix_init(void)
70{
71 unselect_rows();
72 init_cols();
73
74 // initialize matrix state: all keys off
75 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
76 matrix[i] = 0;
77 for (uint8_t j=0; j < MATRIX_COLS; ++j) {
78 debounce_matrix[i * MATRIX_COLS + j] = 0;
79 }
80 }
81
82 matrix_init_quantum();
83}
84
85void matrix_power_up(void) {
86 unselect_rows();
87 init_cols();
88
89 // initialize matrix state: all keys off
90 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
91 matrix[i] = 0;
92 }
93}
94
95// Returns a matrix_row_t whose bits are set if the corresponding key should be
96// eligible to change in this scan.
97matrix_row_t debounce_mask(uint8_t row) {
98 matrix_row_t result = 0;
99 for (uint8_t j=0; j < MATRIX_COLS; ++j) {
100 if (debounce_matrix[row * MATRIX_COLS + j]) {
101 --debounce_matrix[row * MATRIX_COLS + j];
102 } else {
103 result |= (1 << j);
104 }
105 }
106 return result;
107}
108
109// Report changed keys in the given row. Resets the debounce countdowns
110// corresponding to each set bit in 'change' to DEBOUNCE.
111void debounce_report(matrix_row_t change, uint8_t row) {
112 for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
113 if (change & (1 << i)) {
114 debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
115 }
116 }
117}
118
119uint8_t matrix_scan(void)
120{
121 expander_scan();
122
123 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
124 select_row(i);
125 wait_us(30); // without this wait read unstable value.
126 matrix_row_t mask = debounce_mask(i);
127 matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask);
128 debounce_report(cols ^ matrix[i], i);
129 matrix[i] = cols;
130
131 unselect_rows();
132 }
133
134 matrix_scan_quantum();
135
136 return 1;
137}
138
139inline
140bool matrix_is_on(uint8_t row, uint8_t col)
141{
142 return (matrix[row] & ((matrix_row_t)1<<col));
143}
144
145inline
146matrix_row_t matrix_get_row(uint8_t row)
147{
148 return matrix[row];
149}
150
151void matrix_print(void)
152{
153 print("\nr/c 0123456789ABCDEF\n");
154 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
155 print_hex8(row); print(": ");
156 print_bin_reverse16(matrix_get_row(row));
157 print("\n");
158 }
159}
160
161uint8_t matrix_key_count(void)
162{
163 uint8_t count = 0;
164 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
165 count += bitpop16(matrix[i]);
166 }
167 return count;
168}
169
170/* Column pin configuration
171 *
172 * Pro Micro: 6 5 4 3 2 1 0
173 * PD3 PD2 PD4 PC6 PD7 PE6 PB4
174 *
175 * Expander: 13 12 11 10 9 8 7
176 */
177static void init_cols(void)
178{
179 // Pro Micro
180 DDRE &= ~(1<<PE6);
181 PORTE |= (1<<PE6);
182 DDRD &= ~(1<<PD2 | 1<<PD3 | 1<<PD4 | 1<<PD7);
183 PORTD |= (1<<PD2 | 1<<PD3 | 1<<PD4 | 1<<PD7);
184 DDRC &= ~(1<<PC6);
185 PORTC |= (1<<PC6);
186 DDRB &= ~(1<<PB4);
187 PORTB |= (1<<PB4);
188
189 // MCP23017
190 expander_init();
191}
192
193static matrix_row_t read_cols(uint8_t row)
194{
195 return expander_read_row() |
196 (PIND&(1<<PD3) ? 0 : (1<<6)) |
197 (PIND&(1<<PD2) ? 0 : (1<<5)) |
198 (PIND&(1<<PD4) ? 0 : (1<<4)) |
199 (PINC&(1<<PC6) ? 0 : (1<<3)) |
200 (PIND&(1<<PD7) ? 0 : (1<<2)) |
201 (PINE&(1<<PE6) ? 0 : (1<<1)) |
202 (PINB&(1<<PB4) ? 0 : (1<<0)) ;
203}
204
205/* Row pin configuration
206 *
207 * Pro Micro: 0 1 2 3 4 5
208 * F4 F5 F6 F7 B1 B2
209 *
210 * Expander: 0 1 2 3 4 5
211 */
212static void unselect_rows(void)
213{
214 // Pro Micro
215 DDRF &= ~(1<<PF4 | 1<<PF5 | 1<<PF6 | 1<<PF7);
216 PORTF &= ~(1<<PF4 | 1<<PF5 | 1<<PF6 | 1<<PF7);
217 DDRB &= ~(1<<PB1 | 1<<PB2);
218 PORTB &= ~(1<<PB1 | 1<<PB2);
219
220 // Expander
221 expander_unselect_rows();
222}
223
224static void select_row(uint8_t row)
225{
226 // Pro Micro
227 switch (row) {
228 case 0:
229 DDRF |= (1<<PF4);
230 PORTF &= ~(1<<PF4);
231 break;
232 case 1:
233 DDRF |= (1<<PF5);
234 PORTF &= ~(1<<PF5);
235 break;
236 case 2:
237 DDRF |= (1<<PF6);
238 PORTF &= ~(1<<PF6);
239 break;
240 case 3:
241 DDRF |= (1<<PF7);
242 PORTF &= ~(1<<PF7);
243 break;
244 case 4:
245 DDRB |= (1<<PB1);
246 PORTB &= ~(1<<PB1);
247 break;
248 case 5:
249 DDRB |= (1<<PB2);
250 PORTB &= ~(1<<PB2);
251 break;
252 }
253
254 expander_select_row(row);
255}
256
diff --git a/keyboards/ktec/ergodone/readme.md b/keyboards/ktec/ergodone/readme.md
new file mode 100644
index 000000000..82c1043da
--- /dev/null
+++ b/keyboards/ktec/ergodone/readme.md
@@ -0,0 +1,33 @@
1ErgoDone
2========
3
4![ErgoDone](https://i.imgur.com/QERsQGQ.jpg)
5
6The ErgoDone is a modified version of the ErgoDox, made by K.T.E.C., with pre-soldered components. It has different wiring and uses a SparkFun Pro Micro instead of Teensy.
7
8- Keyboard maintainer: [Yu He](http://github.com/yuhe00)
9- Hardware supported:
10 - ErgoDone v1.3 (tested)
11- Hardware availability:
12 - [AliExpress](https://www.aliexpress.com/store/product/ergodone-Custom-Mechanical-Keyboard-TKG-TOOLS-PCB-programmed-Ergonomic-Keyboard-Kit-similar-with-infinity-ergodox/3034003_32830050940.html)
13 - [KBDfans](https://kbdfans.myshopify.com/collections/pcb/products/ergodone-keyboard-pcb-1pcs-free-shipping)
14
15# Building the firmware
16
17[Install the build tools.](https://docs.qmk.fm/#/getting_started_build_tools)
18
19In the root directory of the repository, build the firmware with a command like:
20
21 make ergodone:default
22
23For more information on the layout option and other ones, see the [`make` guide](https://docs.qmk.fm/#/getting_started_make_guide).
24
25# Flashing the firmware onto the keyboard
26
27The ErgoDone uses a customized HID bootloader rather than the Teensy one. It doesn't need an OS driver, and the required actions before flashing are a little different than with an ErgoDox.
28
291. To enter flash mode, disconnect the keyboard first. Then, on the left-hand device, in the top row, press and hold the two rightmost keys while reconnecting the keyboard.
30![Ergodone Flash Mode](https://i.imgur.com/sNivAnr.jpg)
312. To flash the .hex file, use the `hid_bootloader_cli` utlity from the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) (as of 2017-10-03, only [this old version](https://github.com/kairyu/tkg-toolkit/blob/b14c67ca8bc84c07e5fc6b2e01ae4002b808243a/windows/bin/hid_bootloader_cli.exe) works under Windows):
32
33 hid_bootloader_cli -mmcu=atmega32u4 ergodone_default.hex
diff --git a/keyboards/ktec/ergodone/rules.mk b/keyboards/ktec/ergodone/rules.mk
new file mode 100644
index 000000000..7b88a1419
--- /dev/null
+++ b/keyboards/ktec/ergodone/rules.mk
@@ -0,0 +1,37 @@
1# MCU name
2MCU = atmega32u4
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
12BOOTLOADER = caterina
13
14# Build Options
15# comment out to disable the options.
16#
17CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone
18UNICODE_ENABLE = yes # Unicode
19BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
20MOUSEKEY_ENABLE = yes # Mouse keys
21EXTRAKEY_ENABLE = yes # Audio control and System control
22CONSOLE_ENABLE = no # Console for debug
23COMMAND_ENABLE = no # Commands for debug and configuration
24SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
25NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
26USB_6KRO_ENABLE = no # USB 6key Rollover
27BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
28SWAP_HANDS_ENABLE = no # Disable Onehand
29RGBLIGHT_ENABLE = no
30
31# project specific files
32SRC = \
33 twimaster.c \
34 matrix.c \
35 expander.c \
36
37LAYOUTS = ergodox
diff --git a/keyboards/ktec/ergodone/twimaster.c b/keyboards/ktec/ergodone/twimaster.c
new file mode 100644
index 000000000..d6f3f7840
--- /dev/null
+++ b/keyboards/ktec/ergodone/twimaster.c
@@ -0,0 +1,208 @@
1/*************************************************************************
2* Title: I2C master library using hardware TWI interface
3* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
4* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $
5* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
6* Target: any AVR device with hardware TWI
7* Usage: API compatible with I2C Software Library i2cmaster.h
8**************************************************************************/
9#include <inttypes.h>
10#include <compat/twi.h>
11
12#include "i2cmaster.h"
13
14
15/* define CPU frequency in Mhz here if not defined in Makefile */
16#ifndef F_CPU
17#define F_CPU 16000000UL
18#endif
19
20/* I2C clock in Hz */
21#define SCL_CLOCK 400000L
22
23
24/*************************************************************************
25 Initialization of the I2C bus interface. Need to be called only once
26*************************************************************************/
27void i2c_init(void)
28{
29 /* initialize TWI clock
30 * minimal values in Bit Rate Register (TWBR) and minimal Prescaler
31 * bits in the TWI Status Register should give us maximal possible
32 * I2C bus speed - about 444 kHz
33 *
34 * for more details, see 20.5.2 in ATmega16/32 secification
35 */
36
37 TWSR = 0; /* no prescaler */
38 TWBR = 10; /* must be >= 10 for stable operation */
39
40}/* i2c_init */
41
42
43/*************************************************************************
44 Issues a start condition and sends address and transfer direction.
45 return 0 = device accessible, 1= failed to access device
46*************************************************************************/
47unsigned char i2c_start(unsigned char address)
48{
49 uint8_t twst;
50
51 // send START condition
52 TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
53
54 // wait until transmission completed
55 while(!(TWCR & (1<<TWINT)));
56
57 // check value of TWI Status Register. Mask prescaler bits.
58 twst = TW_STATUS & 0xF8;
59 if ( (twst != TW_START) && (twst != TW_REP_START)) return 1;
60
61 // send device address
62 TWDR = address;
63 TWCR = (1<<TWINT) | (1<<TWEN);
64
65 // wail until transmission completed and ACK/NACK has been received
66 while(!(TWCR & (1<<TWINT)));
67
68 // check value of TWI Status Register. Mask prescaler bits.
69 twst = TW_STATUS & 0xF8;
70 if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1;
71
72 return 0;
73
74}/* i2c_start */
75
76
77/*************************************************************************
78 Issues a start condition and sends address and transfer direction.
79 If device is busy, use ack polling to wait until device is ready
80
81 Input: address and transfer direction of I2C device
82*************************************************************************/
83void i2c_start_wait(unsigned char address)
84{
85 uint8_t twst;
86
87
88 while ( 1 )
89 {
90 // send START condition
91 TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
92
93 // wait until transmission completed
94 while(!(TWCR & (1<<TWINT)));
95
96 // check value of TWI Status Register. Mask prescaler bits.
97 twst = TW_STATUS & 0xF8;
98 if ( (twst != TW_START) && (twst != TW_REP_START)) continue;
99
100 // send device address
101 TWDR = address;
102 TWCR = (1<<TWINT) | (1<<TWEN);
103
104 // wail until transmission completed
105 while(!(TWCR & (1<<TWINT)));
106
107 // check value of TWI Status Register. Mask prescaler bits.
108 twst = TW_STATUS & 0xF8;
109 if ( (twst == TW_MT_SLA_NACK )||(twst ==TW_MR_DATA_NACK) )
110 {
111 /* device busy, send stop condition to terminate write operation */
112 TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
113
114 // wait until stop condition is executed and bus released
115 while(TWCR & (1<<TWSTO));
116
117 continue;
118 }
119 //if( twst != TW_MT_SLA_ACK) return 1;
120 break;
121 }
122
123}/* i2c_start_wait */
124
125
126/*************************************************************************
127 Issues a repeated start condition and sends address and transfer direction
128
129 Input: address and transfer direction of I2C device
130
131 Return: 0 device accessible
132 1 failed to access device
133*************************************************************************/
134unsigned char i2c_rep_start(unsigned char address)
135{
136 return i2c_start( address );
137
138}/* i2c_rep_start */
139
140
141/*************************************************************************
142 Terminates the data transfer and releases the I2C bus
143*************************************************************************/
144void i2c_stop(void)
145{
146 /* send stop condition */
147 TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
148
149 // wait until stop condition is executed and bus released
150 while(TWCR & (1<<TWSTO));
151
152}/* i2c_stop */
153
154
155/*************************************************************************
156 Send one byte to I2C device
157
158 Input: byte to be transfered
159 Return: 0 write successful
160 1 write failed
161*************************************************************************/
162unsigned char i2c_write( unsigned char data )
163{
164 uint8_t twst;
165
166 // send data to the previously addressed device
167 TWDR = data;
168 TWCR = (1<<TWINT) | (1<<TWEN);
169
170 // wait until transmission completed
171 while(!(TWCR & (1<<TWINT)));
172
173 // check value of TWI Status Register. Mask prescaler bits
174 twst = TW_STATUS & 0xF8;
175 if( twst != TW_MT_DATA_ACK) return 1;
176 return 0;
177
178}/* i2c_write */
179
180
181/*************************************************************************
182 Read one byte from the I2C device, request more data from device
183
184 Return: byte read from I2C device
185*************************************************************************/
186unsigned char i2c_readAck(void)
187{
188 TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
189 while(!(TWCR & (1<<TWINT)));
190
191 return TWDR;
192
193}/* i2c_readAck */
194
195
196/*************************************************************************
197 Read one byte from the I2C device, read is followed by a stop condition
198
199 Return: byte read from I2C device
200*************************************************************************/
201unsigned char i2c_readNak(void)
202{
203 TWCR = (1<<TWINT) | (1<<TWEN);
204 while(!(TWCR & (1<<TWINT)));
205
206 return TWDR;
207
208}/* i2c_readNak */
diff --git a/keyboards/ktec/staryu/backlight_staryu.h b/keyboards/ktec/staryu/backlight_staryu.h
new file mode 100644
index 000000000..b90350e28
--- /dev/null
+++ b/keyboards/ktec/staryu/backlight_staryu.h
@@ -0,0 +1,30 @@
1/*
2Copyright 2019
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#pragma once
18
19// Add backwards compatibility for existing keymaps
20static inline void backlight_set_value(uint8_t index, uint8_t level) {
21 static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PINS;
22 if (level) {
23 setPinOutput(backlight_pins[index]);
24 } else {
25 setPinInput(backlight_pins[index]);
26 }
27}
28
29#define backlight_led_off(i) backlight_set_value(i, 0)
30#define backlight_led_on(i) backlight_set_value(i, 1)
diff --git a/keyboards/ktec/staryu/config.h b/keyboards/ktec/staryu/config.h
new file mode 100755
index 000000000..db48e0ea5
--- /dev/null
+++ b/keyboards/ktec/staryu/config.h
@@ -0,0 +1,73 @@
1/*
2Copyright 2018 Cole Markham
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x1209
23#define PRODUCT_ID 0x2328
24#define DEVICE_VER 0x0205
25#define MANUFACTURER K.T.E.C.
26#define PRODUCT Staryu
27
28/* key matrix size */
29#define MATRIX_ROWS 2
30#define MATRIX_COLS 3
31
32/* key matrix pins */
33#define DIRECT_PINS { \
34 { NO_PIN, D0, D1 }, \
35 { D4, D3, D2 }, \
36}
37#define UNUSED_PINS
38
39#define RGB_DI_PIN C6
40#define RGBLED_NUM 1 // Number of LEDs
41#define RGBLIGHT_ANIMATIONS
42#define RGBLIGHT_LIMIT_VAL 200
43// #ifdef RGB_DI_PIN
44// #define RGBLIGHT_HUE_STEP 8
45// #define RGBLIGHT_SAT_STEP 8
46// #define RGBLIGHT_VAL_STEP 8
47// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
48// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
49// /*== all animations enable ==*/
50// #define RGBLIGHT_ANIMATIONS
51// /*== or choose animations ==*/
52// #define RGBLIGHT_EFFECT_BREATHING
53// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
54// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
55// #define RGBLIGHT_EFFECT_SNAKE
56// #define RGBLIGHT_EFFECT_KNIGHT
57// #define RGBLIGHT_EFFECT_CHRISTMAS
58// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
59// #define RGBLIGHT_EFFECT_RGB_TEST
60// #define RGBLIGHT_EFFECT_ALTERNATING
61// #endif
62
63#undef BACKLIGHT_PIN
64#define BACKLIGHT_PINS { C2, C7, D5, D6, B0 }
65#define BACKLIGHT_LED_COUNT 5
66#define BACKLIGHT_LEVELS 10
67
68/* Set 0 if debouncing isn't needed */
69#define DEBOUNCE 5
70
71/* Bootmagic Lite key configuration */
72#define BOOTMAGIC_LITE_ROW 0
73#define BOOTMAGIC_LITE_COLUMN 1
diff --git a/keyboards/ktec/staryu/info.json b/keyboards/ktec/staryu/info.json
new file mode 100644
index 000000000..baac7dfc2
--- /dev/null
+++ b/keyboards/ktec/staryu/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "staryu",
3 "url": "",
4 "maintainer": "qmk",
5 "width": 3,
6 "height": 2,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}]
10 }
11 }
12}
diff --git a/keyboards/ktec/staryu/keymaps/default/README.md b/keyboards/ktec/staryu/keymaps/default/README.md
new file mode 100644
index 000000000..836d3ab4d
--- /dev/null
+++ b/keyboards/ktec/staryu/keymaps/default/README.md
@@ -0,0 +1,3 @@
1# Default keymap
2
3Default keymap for the Staryu macropad, adapted from [kairyu's repo](https://github.com/kairyu/tmk_keyboard_custom/blob/master/keyboard/staryu/keymap_default.c).
diff --git a/keyboards/ktec/staryu/keymaps/default/keymap.c b/keyboards/ktec/staryu/keymaps/default/keymap.c
new file mode 100755
index 000000000..c41c436f9
--- /dev/null
+++ b/keyboards/ktec/staryu/keymaps/default/keymap.c
@@ -0,0 +1,104 @@
1/*
2Copyright 2018 Kenneth Aloysius
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include QMK_KEYBOARD_H
18
19enum layers {
20 _LAYER0,
21 _LAYER1,
22 _LAYER2,
23 _LAYER3,
24 _LAYER4
25};
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28
29 [_LAYER0] = LAYOUT(
30/* ┌─────────┬─────────┬─────────┐ */
31 KC_UP, TO(_LAYER1),
32/* ├─────────┼─────────┼─────────┤ */
33 KC_LEFT, KC_DOWN, KC_RIGHT
34/* └─────────┴─────────┴─────────┘ */
35 ),
36
37 [_LAYER1] = LAYOUT(
38/* ┌─────────┬─────────┬─────────┐ */
39 KC_PGUP, TO(_LAYER2),
40/* ├─────────┼─────────┼─────────┤ */
41 KC_HOME, KC_PGDN, KC_END
42/* └─────────┴─────────┴─────────┘ */
43 ),
44
45 [_LAYER2] = LAYOUT(
46/* ┌─────────┬─────────┬─────────┐ */
47 KC_MSEL, TO(_LAYER3),
48/* ├─────────┼─────────┼─────────┤ */
49 KC_MPRV, KC_MPLY, KC_MNXT
50/* └─────────┴─────────┴─────────┘ */
51 ),
52
53 [_LAYER3] = LAYOUT(
54/* ┌─────────┬─────────┬─────────┐ */
55 KC_MS_U, TO(_LAYER4),
56/* ├─────────┼─────────┼─────────┤ */
57 KC_MS_L, KC_MS_D, KC_MS_R
58/* └─────────┴─────────┴─────────┘ */
59 ),
60
61 [_LAYER4] = LAYOUT(
62/* ┌─────────┬─────────┬─────────┐ */
63 XXXXXXX, TO(_LAYER0),
64/* ├─────────┼─────────┼─────────┤ */
65 RGB_TOG, BL_TOGG, BL_STEP
66/* └─────────┴─────────┴─────────┘ */
67 ),
68
69};
70
71void eeconfig_init_user(void) {
72 // use the non noeeprom versions, to write these values to EEPROM too
73 rgblight_enable();
74 rgblight_mode(RGBLIGHT_MODE_BREATHING+1);
75
76 backlight_enable();
77}
78
79void keyboard_post_init_user(void) {
80 //layer_state_set_user is not called for inital state - set it here
81 rgblight_sethsv_noeeprom_white();
82}
83
84layer_state_t layer_state_set_user(layer_state_t state) {
85 switch (get_highest_layer(state)) {
86 case _LAYER1:
87 rgblight_sethsv_noeeprom_cyan();
88 break;
89 case _LAYER2:
90 rgblight_sethsv_noeeprom_magenta();
91 break;
92 case _LAYER3:
93 rgblight_sethsv_noeeprom_red();
94 break;
95 case _LAYER4:
96 rgblight_sethsv_noeeprom_orange();
97 break;
98 case _LAYER0:
99 default: // for any other layers, or the default layer
100 rgblight_sethsv_noeeprom_white();
101 break;
102 }
103 return state;
104}
diff --git a/keyboards/ktec/staryu/keymaps/default/rules.mk b/keyboards/ktec/staryu/keymaps/default/rules.mk
new file mode 100644
index 000000000..6c605daec
--- /dev/null
+++ b/keyboards/ktec/staryu/keymaps/default/rules.mk
@@ -0,0 +1 @@
MOUSEKEY_ENABLE = yes
diff --git a/keyboards/ktec/staryu/keymaps/krusli/README.md b/keyboards/ktec/staryu/keymaps/krusli/README.md
new file mode 100644
index 000000000..66a097907
--- /dev/null
+++ b/keyboards/ktec/staryu/keymaps/krusli/README.md
@@ -0,0 +1,9 @@
1# krusli's RAMA M6-A Layout
2
3Personal keymap for the RAMA M6-A.
4
5Top-right button acts as a "toggle between layers" button. Layer 0 -> Layer 1 -> Layer 2 -> Layer 0 -> ...
6
7- Layer 0: Osu! gamepad layer
8- Layer 1: Git commands
9- Layer 2 and 3: RGB controls
diff --git a/keyboards/ktec/staryu/keymaps/krusli/keymap.c b/keyboards/ktec/staryu/keymaps/krusli/keymap.c
new file mode 100644
index 000000000..9cd1cf829
--- /dev/null
+++ b/keyboards/ktec/staryu/keymaps/krusli/keymap.c
@@ -0,0 +1,84 @@
1/*
2Copyright 2018 Kenneth Aloysius
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include QMK_KEYBOARD_H
18#include "action_layer.h"
19
20#include "../../backlight_staryu.h"
21
22enum layers {
23 _LAYER0,
24 _LAYER1,
25 _LAYER2,
26 _LAYER3
27};
28
29enum custom_keycodes {
30 GIT_ADD = SAFE_RANGE,
31 GIT_COMMIT,
32 GIT_PUSH,
33 MUTE,
34 DEAFEN
35};
36
37bool process_record_user(uint16_t keycode, keyrecord_t *record) {
38 if (record->event.pressed) {
39 switch(keycode) {
40 case GIT_ADD:
41 SEND_STRING("git add ."SS_TAP(X_ENTER));
42 break;
43 case GIT_COMMIT:
44 SEND_STRING("git commit -m "SS_DOWN(X_LSHIFT)SS_TAP(X_QUOTE)SS_UP(X_LSHIFT));
45 break;
46 case GIT_PUSH:
47 SEND_STRING("git push"SS_TAP(X_ENTER));
48 break;
49 case MUTE:
50 SEND_STRING(SS_LGUI(SS_LSFT("M")));
51 break;
52 case DEAFEN:
53 SEND_STRING(SS_LGUI(SS_LSFT("D")));
54 break;
55 return false;
56 }
57 }
58 return true;
59};
60
61const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62 [_LAYER0] = LAYOUT( \
63 KC_ESC, TO(_LAYER1), \
64 KC_Z, KC_X, KC_ENT \
65 ),
66 [_LAYER1] = LAYOUT( \
67 MUTE, TO(_LAYER2), \
68 GIT_ADD, GIT_COMMIT, GIT_PUSH \
69 ),
70 [_LAYER2] = LAYOUT( \
71 RGB_MOD, TO(_LAYER3), \
72 RGB_TOG, RGB_HUD, RGB_HUI \
73 ),
74 [_LAYER3] = LAYOUT( \
75 RGB_VAI, TO(_LAYER0), \
76 RGB_SAD, RGB_VAD, RGB_SAI \
77 )
78};
79
80void matrix_init_user(void) {
81 for (int i=0; i<5; i++) {
82 backlight_led_on(i);
83 }
84}
diff --git a/keyboards/ktec/staryu/readme.md b/keyboards/ktec/staryu/readme.md
new file mode 100644
index 000000000..1b2f9e8f5
--- /dev/null
+++ b/keyboards/ktec/staryu/readme.md
@@ -0,0 +1,15 @@
1# Staryu
2
3![Staryu](https://i.imgur.com/obcCpZN.jpg)
4
5A 5 key macropad, designed by Kai and sold by KPRepublic.
6
7Keyboard Maintainer: QMK Community
8Hardware Supported: Staryu (only the non-lite version has been tested)
9Hardware Availability: [AliExpress](https://www.aliexpress.com/item/Staryu-Mini-Macro-Pad-custom-keyboard-by-tkg-kai-Mini-macro-pad-mechanical-keyboard-5-keys/32817560746.html)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make staryu:default
14
15See [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.
diff --git a/keyboards/ktec/staryu/rules.mk b/keyboards/ktec/staryu/rules.mk
new file mode 100755
index 000000000..697a58ff7
--- /dev/null
+++ b/keyboards/ktec/staryu/rules.mk
@@ -0,0 +1,30 @@
1# MCU name
2MCU = atmega32u2
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
12BOOTLOADER = lufa-dfu
13
14# Build Options
15# comment out to disable the options.
16#
17BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
18MOUSEKEY_ENABLE = no # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = no # USB Nkey Rollover
26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
27RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
28UNICODE_ENABLE = no # Unicode
29BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
30AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/ktec/staryu/staryu.c b/keyboards/ktec/staryu/staryu.c
new file mode 100755
index 000000000..4adadf201
--- /dev/null
+++ b/keyboards/ktec/staryu/staryu.c
@@ -0,0 +1,17 @@
1/*
2Copyright 2018 Cole Markham
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "staryu.h"
diff --git a/keyboards/ktec/staryu/staryu.h b/keyboards/ktec/staryu/staryu.h
new file mode 100755
index 000000000..bdce5806f
--- /dev/null
+++ b/keyboards/ktec/staryu/staryu.h
@@ -0,0 +1,28 @@
1/*
2Copyright 2018 Cole Markham
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#pragma once
18
19#include "quantum.h"
20#define ___ KC_NO
21
22#define LAYOUT( \
23 K01, K02, \
24 K10, K11, K12 \
25) { \
26 { ___, K01, K02 }, \
27 { K10, K11, K12 } \
28}