aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjshuf <44121348+jshuf@users.noreply.github.com>2018-10-29 13:33:07 -0400
committerDrashna Jaelre <drashna@live.com>2018-10-29 10:33:07 -0700
commit6a629e5d0d4ed5903afa361568da8daeddc1b090 (patch)
tree63f004d9ba6007ed44fa536cbaf5116baa85a5ad
parentcd23984afcee9a8dd2b1b44876b77141d692de45 (diff)
downloadqmk_firmware-6a629e5d0d4ed5903afa361568da8daeddc1b090.tar.gz
qmk_firmware-6a629e5d0d4ed5903afa361568da8daeddc1b090.zip
Keyboard: add support for kbd19x (#4272)
* 60_ansi keymap for DZ60 * 60_ansi keymap for DZ60 Amend author * 60_ansi keymap for DZ60 * Merge new phantom layout from dev branch * Initial util/new_project files * Progress checkpoint (compiles, but untested) * Progress snapshot, still working on layout graphics * Add layer images * Tidy up formatting * First cut at info.json for kbd19x default layout * Add default keymap * add all-keys layout * clean up documentation * Update keyboards/kbd19x/info.json Co-Authored-By: jshuf <44121348+jshuf@users.noreply.github.com> * Update keyboards/kbd19x/rules.mk Co-Authored-By: jshuf <44121348+jshuf@users.noreply.github.com> * Change layout name from default to ansi
-rw-r--r--keyboards/kbd19x/config.h224
-rw-r--r--keyboards/kbd19x/info.json218
-rw-r--r--keyboards/kbd19x/kbd19x.c63
-rw-r--r--keyboards/kbd19x/kbd19x.h103
-rw-r--r--keyboards/kbd19x/keymaps/default/config.h20
-rw-r--r--keyboards/kbd19x/keymaps/default/keymap.c52
-rw-r--r--keyboards/kbd19x/keymaps/default/readme.md13
-rw-r--r--keyboards/kbd19x/readme.md19
-rw-r--r--keyboards/kbd19x/rules.mk80
9 files changed, 792 insertions, 0 deletions
diff --git a/keyboards/kbd19x/config.h b/keyboards/kbd19x/config.h
new file mode 100644
index 000000000..47cfd7484
--- /dev/null
+++ b/keyboards/kbd19x/config.h
@@ -0,0 +1,224 @@
1/*
2Copyright 2018 Jeff Shufelt <jshuf@puppyfish.com> @jshuf
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 0xFEED
24#define PRODUCT_ID 0x0000
25#define DEVICE_VER 0x0001
26#define MANUFACTURER KBDFans
27#define PRODUCT kbd19x
28#define DESCRIPTION A compact-1800 keyboard kit.
29
30/* key matrix size */
31#define MATRIX_ROWS 8
32#define MATRIX_COLS 13
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43*/
44#define MATRIX_ROW_PINS { B7, B3, E6, F0, D5, D4, D6, C7 }
45#define MATRIX_COL_PINS { C6, F1, F4, F5, F6, F7, D7, B4, B5, D0, D1, D2, D3 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49#define DIODE_DIRECTION COL2ROW
50
51#define BACKLIGHT_PIN B6
52// #define BACKLIGHT_BREATHING
53#define BACKLIGHT_LEVELS 3
54
55#define RGB_DI_PIN E2
56#ifdef RGB_DI_PIN
57#define RGBLIGHT_ANIMATIONS
58#define RGBLED_NUM 18
59#define RGBLIGHT_HUE_STEP 8
60#define RGBLIGHT_SAT_STEP 8
61#define RGBLIGHT_VAL_STEP 8
62#endif
63
64/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
65#define DEBOUNCING_DELAY 5
66
67/* define if matrix has ghost (lacks anti-ghosting diodes) */
68//#define MATRIX_HAS_GHOST
69
70/* number of backlight levels */
71
72/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
73#define LOCKING_SUPPORT_ENABLE
74/* Locking resynchronize hack */
75#define LOCKING_RESYNC_ENABLE
76
77/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
78 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
79 */
80// #define GRAVE_ESC_CTRL_OVERRIDE
81
82/*
83 * Force NKRO
84 *
85 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
86 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
87 * makefile for this to work.)
88 *
89 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
90 * until the next keyboard reset.
91 *
92 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
93 * fully operational during normal computer usage.
94 *
95 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
96 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
97 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
98 * power-up.
99 *
100 */
101//#define FORCE_NKRO
102
103/*
104 * Magic Key Options
105 *
106 * Magic keys are hotkey commands that allow control over firmware functions of
107 * the keyboard. They are best used in combination with the HID Listen program,
108 * found here: https://www.pjrc.com/teensy/hid_listen.html
109 *
110 * The options below allow the magic key functionality to be changed. This is
111 * useful if your keyboard/keypad is missing keys and you want magic key support.
112 *
113 */
114
115/* key combination for magic key command */
116#define IS_COMMAND() ( \
117 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
118)
119
120/* control how magic key switches layers */
121//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
122//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
123//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
124
125/* override magic key keymap */
126//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
127//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
128//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
129//#define MAGIC_KEY_HELP1 H
130//#define MAGIC_KEY_HELP2 SLASH
131//#define MAGIC_KEY_DEBUG D
132//#define MAGIC_KEY_DEBUG_MATRIX X
133//#define MAGIC_KEY_DEBUG_KBD K
134//#define MAGIC_KEY_DEBUG_MOUSE M
135//#define MAGIC_KEY_VERSION V
136//#define MAGIC_KEY_STATUS S
137//#define MAGIC_KEY_CONSOLE C
138//#define MAGIC_KEY_LAYER0_ALT1 ESC
139//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
140//#define MAGIC_KEY_LAYER0 0
141//#define MAGIC_KEY_LAYER1 1
142//#define MAGIC_KEY_LAYER2 2
143//#define MAGIC_KEY_LAYER3 3
144//#define MAGIC_KEY_LAYER4 4
145//#define MAGIC_KEY_LAYER5 5
146//#define MAGIC_KEY_LAYER6 6
147//#define MAGIC_KEY_LAYER7 7
148//#define MAGIC_KEY_LAYER8 8
149//#define MAGIC_KEY_LAYER9 9
150//#define MAGIC_KEY_BOOTLOADER PAUSE
151//#define MAGIC_KEY_LOCK CAPS
152//#define MAGIC_KEY_EEPROM E
153//#define MAGIC_KEY_NKRO N
154//#define MAGIC_KEY_SLEEP_LED Z
155
156/*
157 * Feature disable options
158 * These options are also useful to firmware size reduction.
159 */
160
161/* disable debug print */
162//#define NO_DEBUG
163
164/* disable print */
165//#define NO_PRINT
166
167/* disable action features */
168//#define NO_ACTION_LAYER
169//#define NO_ACTION_TAPPING
170//#define NO_ACTION_ONESHOT
171//#define NO_ACTION_MACRO
172//#define NO_ACTION_FUNCTION
173
174/*
175 * MIDI options
176 */
177
178/* Prevent use of disabled MIDI features in the keymap */
179//#define MIDI_ENABLE_STRICT 1
180
181/* enable basic MIDI features:
182 - MIDI notes can be sent when in Music mode is on
183*/
184//#define MIDI_BASIC
185
186/* enable advanced MIDI features:
187 - MIDI notes can be added to the keymap
188 - Octave shift and transpose
189 - Virtual sustain, portamento, and modulation wheel
190 - etc.
191*/
192//#define MIDI_ADVANCED
193
194/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
195//#define MIDI_TONE_KEYCODE_OCTAVES 1
196
197/*
198 * HD44780 LCD Display Configuration
199 */
200/*
201#define LCD_LINES 2 //< number of visible lines of the display
202#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
203
204#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
205
206#if LCD_IO_MODE
207#define LCD_PORT PORTB //< port for the LCD lines
208#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
209#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
210#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
211#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
212#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
213#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
214#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
215#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
216#define LCD_RS_PORT LCD_PORT //< port for RS line
217#define LCD_RS_PIN 3 //< pin for RS line
218#define LCD_RW_PORT LCD_PORT //< port for RW line
219#define LCD_RW_PIN 2 //< pin for RW line
220#define LCD_E_PORT LCD_PORT //< port for Enable line
221#define LCD_E_PIN 1 //< pin for Enable line
222#endif
223*/
224
diff --git a/keyboards/kbd19x/info.json b/keyboards/kbd19x/info.json
new file mode 100644
index 000000000..dd5cc700c
--- /dev/null
+++ b/keyboards/kbd19x/info.json
@@ -0,0 +1,218 @@
1{
2 "keyboard_name": "KBD19x",
3 "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbd19x",
4 "maintainer": "qmk",
5 "width": 19.5,
6 "height": 6.75,
7 "layouts": {
8 "LAYOUT_ansi": {
9 "key_count": 99,
10 "layout": [{"label":"Esc", "x":0, "y":0},
11 {"label":"F1", "x":1.25, "y":0},
12 {"label":"F2", "x":2.25, "y":0},
13 {"label":"F3", "x":3.25, "y":0},
14 {"label":"F4", "x":4.25, "y":0},
15 {"label":"F5", "x":5.5, "y":0},
16 {"label":"F6", "x":6.5, "y":0},
17 {"label":"F7", "x":7.5, "y":0},
18 {"label":"F8", "x":8.5, "y":0},
19 {"label":"F9", "x":9.75, "y":0},
20 {"label":"F10", "x":10.75, "y":0},
21 {"label":"F11", "x":11.75, "y":0},
22 {"label":"F12", "x":12.75, "y":0},
23 {"label":"BkLgt Step", "x":14, "y":0},
24 {"label":"Print Screen", "x":15.5, "y":0},
25 {"label":"Scroll Lock", "x":16.5, "y":0},
26 {"label":"Pause Break", "x":17.5, "y":0},
27 {"label":"PgDn", "x":18.5, "y":0},
28 {"label":"~", "x":0, "y":1.5},
29 {"label":"!", "x":1, "y":1.5},
30 {"label":"@", "x":2, "y":1.5},
31 {"label":"#", "x":3, "y":1.5},
32 {"label":"$", "x":4, "y":1.5},
33 {"label":"%", "x":5, "y":1.5},
34 {"label":"^", "x":6, "y":1.5},
35 {"label":"&", "x":7, "y":1.5},
36 {"label":"*", "x":8, "y":1.5},
37 {"label":"(", "x":9, "y":1.5},
38 {"label":")", "x":10, "y":1.5},
39 {"label":"_", "x":11, "y":1.5},
40 {"label":"+", "x":12, "y":1.5},
41 {"label":"Backspace", "x":13, "y":1.5, "w":2},
42 {"label":"Num Lock", "x":15.5, "y":1.5},
43 {"label":"/", "x":16.5, "y":1.5},
44 {"label":"*", "x":17.5, "y":1.5},
45 {"label":"-", "x":18.5, "y":1.5},
46 {"label":"Tab", "x":0, "y":2.5, "w":1.5},
47 {"label":"Q", "x":1.5, "y":2.5},
48 {"label":"W", "x":2.5, "y":2.5},
49 {"label":"E", "x":3.5, "y":2.5},
50 {"label":"R", "x":4.5, "y":2.5},
51 {"label":"T", "x":5.5, "y":2.5},
52 {"label":"Y", "x":6.5, "y":2.5},
53 {"label":"U", "x":7.5, "y":2.5},
54 {"label":"I", "x":8.5, "y":2.5},
55 {"label":"O", "x":9.5, "y":2.5},
56 {"label":"P", "x":10.5, "y":2.5},
57 {"label":"{", "x":11.5, "y":2.5},
58 {"label":"}", "x":12.5, "y":2.5},
59 {"label":"|", "x":13.5, "y":2.5, "w":1.5},
60 {"label":"7", "x":15.5, "y":2.5},
61 {"label":"8", "x":16.5, "y":2.5},
62 {"label":"9", "x":17.5, "y":2.5},
63 {"label":"+", "x":18.5, "y":2.5, "h":2},
64 {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},\
65 {"label":"A", "x":1.75, "y":3.5},
66 {"label":"S", "x":2.75, "y":3.5},
67 {"label":"D", "x":3.75, "y":3.5},
68 {"label":"F", "x":4.75, "y":3.5},
69 {"label":"G", "x":5.75, "y":3.5},
70 {"label":"H", "x":6.75, "y":3.5},
71 {"label":"J", "x":7.75, "y":3.5},
72 {"label":"K", "x":8.75, "y":3.5},
73 {"label":"L", "x":9.75, "y":3.5},
74 {"label":":", "x":10.75, "y":3.5},
75 {"label":"\"", "x":11.75, "y":3.5},
76 {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
77 {"label":"4", "x":15.5, "y":3.5},
78 {"label":"5", "x":16.5, "y":3.5},
79 {"label":"6", "x":17.5, "y":3.5},
80 {"label":"Shift", "x":0, "y":4.5, "w":2.25},
81 {"label":"Z", "x":2.25, "y":4.5},
82 {"label":"X", "x":3.25, "y":4.5},
83 {"label":"C", "x":4.25, "y":4.5},
84 {"label":"V", "x":5.25, "y":4.5},
85 {"label":"B", "x":6.25, "y":4.5},
86 {"label":"N", "x":7.25, "y":4.5},
87 {"label":"M", "x":8.25, "y":4.5},
88 {"label":"<", "x":9.25, "y":4.5},
89 {"label":">", "x":10.25, "y":4.5},
90 {"label":"?", "x":11.25, "y":4.5},
91 {"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
92 {"label":"1", "x":15.5, "y":4.5},
93 {"label":"2", "x":16.5, "y":4.5},
94 {"label":"3", "x":17.5, "y":4.5},
95 {"label":"Enter", "x":18.5, "y":4.5, "h":2},
96 {"label":"\u2191", "x":14.25, "y":4.75},
97 {"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
98 {"label":"Win", "x":1.25, "y":5.5},
99 {"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
100 {"x":3.5, "y":5.5, "w":6.25},
101 {"label":"Alt", "x":9.75, "y":5.5},
102 {"label":"MO(1)", "x":10.75, "y":5.5},
103 {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25},
104 {"label":"0", "x":16.5, "y":5.5},
105 {"label":".", "x":17.5, "y":5.5},
106 {"label":"\u2190", "x":13.25, "y":5.75},
107 {"label":"\u2193", "x":14.25, "y":5.75},
108 {"label":"\u2192", "x":15.25, "y":5.75}]
109 },
110 "LAYOUT_all": {
111 "key_count": 103,
112 "layout": [{"label":"Esc", "x":0, "y":0},
113 {"label":"F1", "x":1.25, "y":0},
114 {"label":"F2", "x":2.25, "y":0},
115 {"label":"F3", "x":3.25, "y":0},
116 {"label":"F4", "x":4.25, "y":0},
117 {"label":"F5", "x":5.5, "y":0},
118 {"label":"F6", "x":6.5, "y":0},
119 {"label":"F7", "x":7.5, "y":0},
120 {"label":"F8", "x":8.5, "y":0},
121 {"label":"F9", "x":9.75, "y":0},
122 {"label":"F10", "x":10.75, "y":0},
123 {"label":"F11", "x":11.75, "y":0},
124 {"label":"F12", "x":12.75, "y":0},
125 {"label":"BkLgt Step", "x":14, "y":0},
126 {"label":"Print Screen", "x":15.5, "y":0},
127 {"label":"Scroll Lock", "x":16.5, "y":0},
128 {"label":"Pause Break", "x":17.5, "y":0},
129 {"label":"PgDn", "x":18.5, "y":0},
130 {"label":"~", "x":0, "y":1.5},
131 {"label":"!", "x":1, "y":1.5},
132 {"label":"@", "x":2, "y":1.5},
133 {"label":"#", "x":3, "y":1.5},
134 {"label":"$", "x":4, "y":1.5},
135 {"label":"%", "x":5, "y":1.5},
136 {"label":"^", "x":6, "y":1.5},
137 {"label":"&", "x":7, "y":1.5},
138 {"label":"*", "x":8, "y":1.5},
139 {"label":"(", "x":9, "y":1.5},
140 {"label":")", "x":10, "y":1.5},
141 {"label":"_", "x":11, "y":1.5},
142 {"label":"+", "x":12, "y":1.5},
143 {"x":13, "y":1.5},
144 {"label":"BS", "x":14, "y":1.5},
145 {"label":"Num Lock", "x":15.5, "y":1.5},
146 {"label":"/", "x":16.5, "y":1.5},
147 {"label":"*", "x":17.5, "y":1.5},
148 {"label":"-", "x":18.5, "y":1.5},
149 {"label":"Tab", "x":0, "y":2.5, "w":1.5},
150 {"label":"Q", "x":1.5, "y":2.5},
151 {"label":"W", "x":2.5, "y":2.5},
152 {"label":"E", "x":3.5, "y":2.5},
153 {"label":"R", "x":4.5, "y":2.5},
154 {"label":"T", "x":5.5, "y":2.5},
155 {"label":"Y", "x":6.5, "y":2.5},
156 {"label":"U", "x":7.5, "y":2.5},
157 {"label":"I", "x":8.5, "y":2.5},
158 {"label":"O", "x":9.5, "y":2.5},
159 {"label":"P", "x":10.5, "y":2.5},
160 {"label":"{", "x":11.5, "y":2.5},
161 {"label":"}", "x":12.5, "y":2.5},
162 {"label":"|", "x":13.5, "y":2.5, "w":1.5},
163 {"label":"7", "x":15.5, "y":2.5},
164 {"label":"8", "x":16.5, "y":2.5},
165 {"label":"9", "x":17.5, "y":2.5},
166 {"label":"+", "x":18.5, "y":2.5},
167 {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
168 {"label":"A", "x":1.75, "y":3.5},
169 {"label":"S", "x":2.75, "y":3.5},
170 {"label":"D", "x":3.75, "y":3.5},
171 {"label":"F", "x":4.75, "y":3.5},
172 {"label":"G", "x":5.75, "y":3.5},
173 {"label":"H", "x":6.75, "y":3.5},
174 {"label":"J", "x":7.75, "y":3.5},
175 {"label":"K", "x":8.75, "y":3.5},
176 {"label":"L", "x":9.75, "y":3.5},
177 {"label":":", "x":10.75, "y":3.5},
178 {"label":"\"", "x":11.75, "y":3.5},
179 {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
180 {"label":"4", "x":15.5, "y":3.5},
181 {"label":"5", "x":16.5, "y":3.5},
182 {"label":"6", "x":17.5, "y":3.5},
183 {"x":18.5, "y":3.5},
184 {"label":"Shift", "x":0, "y":4.5, "w":1.25},
185 {"x":1.25, "y":4.5},
186 {"label":"Z", "x":2.25, "y":4.5},
187 {"label":"X", "x":3.25, "y":4.5},
188 {"label":"C", "x":4.25, "y":4.5},
189 {"label":"V", "x":5.25, "y":4.5},
190 {"label":"B", "x":6.25, "y":4.5},
191 {"label":"N", "x":7.25, "y":4.5},
192 {"label":"M", "x":8.25, "y":4.5},
193 {"label":"<", "x":9.25, "y":4.5},
194 {"label":">", "x":10.25, "y":4.5},
195 {"label":"?", "x":11.25, "y":4.5},
196 {"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
197 {"label":"1", "x":15.5, "y":4.5},
198 {"label":"2", "x":16.5, "y":4.5},
199 {"label":"3", "x":17.5, "y":4.5},
200 {"label":"Enter", "x":18.5, "y":4.5},
201 {"label":"\u2191", "x":14.25, "y":4.75},
202 {"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
203 {"label":"Win", "x":1.25, "y":5.5},
204 {"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
205 {"x":3.5, "y":5.5, "w":6.25},
206 {"label":"Alt", "x":9.75, "y":5.5},
207 {"label":"Menu", "x":10.75, "y":5.5},
208 {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25},
209 {"label":"0", "x":16.5, "y":5.5},
210 {"label":".", "x":17.5, "y":5.5},
211 {"x":18.5, "y":5.5},
212 {"label":"\u2190", "x":13.25, "y":5.75},
213 {"label":"\u2193", "x":14.25, "y":5.75},
214 {"label":"\u2192", "x":15.25, "y":5.75}]
215 }
216 }
217}
218
diff --git a/keyboards/kbd19x/kbd19x.c b/keyboards/kbd19x/kbd19x.c
new file mode 100644
index 000000000..360345600
--- /dev/null
+++ b/keyboards/kbd19x/kbd19x.c
@@ -0,0 +1,63 @@
1/*
2Copyright 2018 Jeff Shufelt <jshuf@puppyfish.com> @jshuf
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#include "kbd19x.h"
19
20void matrix_init_kb(void) {
21 // put your keyboard start-up code here
22 // runs once when the firmware starts up
23
24 matrix_init_user();
25}
26
27void matrix_scan_kb(void) {
28 // put your looping keyboard code here
29 // runs every cycle (a lot)
30
31 matrix_scan_user();
32}
33
34bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
35 // put your per-action keyboard code here
36 // runs for every action, just before processing by the firmware
37
38 return process_record_user(keycode, record);
39}
40
41void led_set_kb(uint8_t usb_led) {
42 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
43
44 if (usb_led & (1<<USB_LED_NUM_LOCK)) {
45 kbd19x_nmlk_led_on();
46 } else {
47 kbd19x_nmlk_led_off();
48 }
49
50 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
51 kbd19x_caps_led_on();
52 } else {
53 kbd19x_caps_led_off();
54 }
55
56 if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
57 kbd19x_sclk_led_on();
58 } else {
59 kbd19x_sclk_led_off();
60 }
61
62 led_set_user(usb_led);
63}
diff --git a/keyboards/kbd19x/kbd19x.h b/keyboards/kbd19x/kbd19x.h
new file mode 100644
index 000000000..728c7ca5c
--- /dev/null
+++ b/keyboards/kbd19x/kbd19x.h
@@ -0,0 +1,103 @@
1/*
2Copyright 2018 Jeff Shufelt <jshuf@puppyfish.com> @jshuf
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#ifndef KBD19X_H
19#define KBD19X_H
20
21#include "quantum.h"
22#include "led.h"
23
24inline void kbd19x_caps_led_on(void) { DDRB |= (1<<0); PORTB &= ~(1<<0); }
25inline void kbd19x_caps_led_off(void) { DDRB &= ~(1<<0); PORTB &= ~(1<<0); }
26
27inline void kbd19x_sclk_led_on(void) { DDRB |= (1<<1); PORTB &= ~(1<<1); }
28inline void kbd19x_sclk_led_off(void) { DDRB &= ~(1<<1); PORTB &= ~(1<<1); }
29
30inline void kbd19x_nmlk_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
31inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
32
33// readability
34#define XXX KC_NO
35
36/* This is a shortcut to help you visually see your layout.
37 *
38 * The first section contains all of the arguments representing the physical
39 * layout of the board and position of the keys.
40 *
41 * The second converts the arguments into a two-dimensional array which
42 * represents the switch matrix.
43 */
44
45// 2u backspace: XXX, k1e
46// split backspace: k1d, k1e
47
48// 2u numpad +: k2i, XXX
49// split numpad +: k2i, k3i
50
51// 2u numpad enter: k4i, XXX
52// split numpad enter: k4i, k5i
53
54// 2.25u lshift: k40, XXX
55// split (1.25u, 1u) lshift: k40, k41
56
57// ANSI enter or ISO enter: k3e
58// backslash or NUHS: k2e
59
60// left winkey: k50, k51, k52
61// left WKL: k50, XXX, k52
62
63// right winkey: k59, k5a, k5b
64// right WKL: k59, XXX, k5b
65
66#define LAYOUT_all( \
67 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \
68 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, \
69 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \
70 k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i, \
71 k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \
72 k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h, k5i \
73)\
74{\
75 {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\
76 {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\
77 {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\
78 {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i},\
79 {k40, k41, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\
80 {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, k5i},\
81 {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\
82 {k1d, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\
83}
84
85#define LAYOUT_ansi( \
86 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \
87 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, k1h, k1i, \
88 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \
89 k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, \
90 k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \
91 k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h \
92)\
93{\
94 {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\
95 {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\
96 {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\
97 {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, XXX},\
98 {k40, XXX, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\
99 {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, XXX},\
100 {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\
101 {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\
102}
103#endif
diff --git a/keyboards/kbd19x/keymaps/default/config.h b/keyboards/kbd19x/keymaps/default/config.h
new file mode 100644
index 000000000..70028a525
--- /dev/null
+++ b/keyboards/kbd19x/keymaps/default/config.h
@@ -0,0 +1,20 @@
1/*
2Copyright 2018 Jeff Shufelt <jshuf@puppyfish.com> @jshuf
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// place overrides here
diff --git a/keyboards/kbd19x/keymaps/default/keymap.c b/keyboards/kbd19x/keymaps/default/keymap.c
new file mode 100644
index 000000000..c80607211
--- /dev/null
+++ b/keyboards/kbd19x/keymaps/default/keymap.c
@@ -0,0 +1,52 @@
1/*
2Copyright 2018 Jeff Shufelt <jshuf@puppyfish.com> @jshuf
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
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_ansi( /* Base */
21 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, BL_STEP, KC_PSCR, KC_SLCK, KC_PAUS, KC_PGDN, \
22 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
23 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, \
24 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
25 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
26 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \
27 ),
28 [1] = LAYOUT_ansi( /* Func */
29 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, \
30 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, \
31 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
32 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
33 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
34 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
35 ),
36};
37
38bool process_record_user(uint16_t keycode, keyrecord_t *record) {
39 return true;
40}
41
42void matrix_init_user(void) {
43
44}
45
46void matrix_scan_user(void) {
47
48}
49
50void led_set_user(uint8_t usb_led) {
51
52}
diff --git a/keyboards/kbd19x/keymaps/default/readme.md b/keyboards/kbd19x/keymaps/default/readme.md
new file mode 100644
index 000000000..504a3ed02
--- /dev/null
+++ b/keyboards/kbd19x/keymaps/default/readme.md
@@ -0,0 +1,13 @@
1# Default KBD19x Layout
2
3This is the default KBD19x layout, consisting of the base layer and the function layer. Backlighting and RGB controls are accessible on the function layer.
4
5**Base layer**
6
7![kbd19x default base layer](https://i.imgur.com/XhT980a.png)
8
9**Function layer**
10
11![kbd19x default function layer](https://i.imgur.com/3w3PXN2.png)
12
13
diff --git a/keyboards/kbd19x/readme.md b/keyboards/kbd19x/readme.md
new file mode 100644
index 000000000..ee4969b00
--- /dev/null
+++ b/keyboards/kbd19x/readme.md
@@ -0,0 +1,19 @@
1# kbd19x
2
3![kbd19x](https://i.imgur.com/0hWTEnh.jpg)
4
5**Layout possibilities for the KBD19x**
6
7![kbd19x](https://i.imgur.com/pVaR2zY.png)
8
9The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number of layout options.
10
11Keyboard Maintainer: [jshuf](https://github.com/jshuf)
12Hardware Supported: KBD19x PCB
13Hardware Availability: [KBDfans](https://kbdfans.cn)
14
15Make example for this keyboard (after setting up your build environment):
16
17 make kbd19x:default
18
19See 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/kbd19x/rules.mk b/keyboards/kbd19x/rules.mk
new file mode 100644
index 000000000..8e50962af
--- /dev/null
+++ b/keyboards/kbd19x/rules.mk
@@ -0,0 +1,80 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Interrupt driven control endpoint task(+60)
38OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
39
40
41# Bootloader selection
42# Teensy halfkay
43# Pro Micro caterina
44# Atmel DFU atmel-dfu
45# LUFA DFU lufa-dfu
46# QMK DFU qmk-dfu
47# atmega32a bootloadHID
48BOOTLOADER = atmel-dfu
49
50
51# If you don't know the bootloader type, then you can specify the
52# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
53# Teensy halfKay 512
54# Teensy++ halfKay 1024
55# Atmel DFU loader 4096
56# LUFA bootloader 4096
57# USBaspLoader 2048
58# OPT_DEFS += -DBOOTLOADER_SIZE=4096
59
60
61# Build Options
62# change yes to no to disable
63#
64BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
65MOUSEKEY_ENABLE = no # Mouse keys(+4700)
66EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
67CONSOLE_ENABLE = no # Console for debug(+400)
68COMMAND_ENABLE = no # Commands for debug and configuration
69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
70SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
71# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
72NKRO_ENABLE = no # USB Nkey Rollover
73BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
74RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
75MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
76UNICODE_ENABLE = no # Unicode
77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
78AUDIO_ENABLE = no # Audio output on port C6
79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)