aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien <Dbroqua@users.noreply.github.com>2017-01-26 09:05:55 +0100
committerGitHub <noreply@github.com>2017-01-26 09:05:55 +0100
commitb7b94bfb132aa5f2f79b587fcfa6b1197485db27 (patch)
tree4cae966728b7b6baf101a7ab2b95eeff16cce141
parentf91f0a715d51286064bfe808b0d463878a6d3588 (diff)
parentaac7c0aa4db6b27f4c8d8f3849f8fd41f07e892a (diff)
downloadqmk_firmware-b7b94bfb132aa5f2f79b587fcfa6b1197485db27.tar.gz
qmk_firmware-b7b94bfb132aa5f2f79b587fcfa6b1197485db27.zip
Merge pull request #17 from qmk/master
Merged from QMK project
-rw-r--r--.travis.yml10
-rw-r--r--build_keyboard.mk4
-rw-r--r--keyboards/atreus/readme.md2
-rw-r--r--keyboards/ergodox/ez/config.h2
-rw-r--r--keyboards/ergodox/ez/ez.c8
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/README.md7
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/keymap.c54
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json419
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout.pngbin0 -> 75633 bytes
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json436
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.pngbin0 -> 58099 bytes
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/keymap.c287
-rw-r--r--keyboards/ergodox/keymaps/swissgerman/readme.md15
-rw-r--r--keyboards/infinity60/infinity60.c15
-rw-r--r--keyboards/infinity60/keymaps/default/keymap.c9
-rwxr-xr-xkeyboards/infinity60/keymaps/depariel/keymap.c9
-rw-r--r--keyboards/infinity60/keymaps/hasu/keymap.c10
-rw-r--r--keyboards/infinity60/matrix.c3
-rw-r--r--keyboards/lets_split/config.h43
-rw-r--r--keyboards/lets_split/keymaps/default/keymap.c188
-rw-r--r--keyboards/lets_split/keymaps/i2c/config.h85
-rw-r--r--keyboards/lets_split/keymaps/serial/config.h87
-rw-r--r--keyboards/lets_split/rev1/config.h14
-rw-r--r--keyboards/lets_split/rev2/config.h13
-rw-r--r--keyboards/lets_split/rev2/rev2.h8
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c51
-rw-r--r--keyboards/planck/keymaps/callum/readme.md12
-rw-r--r--keyboards/planck/keymaps/cbbrowne/Makefile4
-rw-r--r--keyboards/planck/keymaps/cbbrowne/keymap.c8
-rw-r--r--keyboards/planck/keymaps/default/keymap.c17
-rw-r--r--keyboards/planck/keymaps/mitch/Makefile5
-rw-r--r--keyboards/planck/keymaps/mitch/config.h2
-rw-r--r--keyboards/planck/keymaps/mitch/keymap.c70
-rw-r--r--keyboards/planck/keymaps/mitch/readme.md26
-rw-r--r--keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c49
-rw-r--r--keyboards/preonic/keymaps/default/keymap.c15
-rw-r--r--keyboards/preonic/keymaps/smt/Makefile3
-rw-r--r--keyboards/preonic/keymaps/smt/keymap.c247
-rw-r--r--keyboards/preonic/keymaps/smt/readme.md85
-rw-r--r--keyboards/ps2avrGB/Makefile3
-rw-r--r--keyboards/ps2avrGB/README.md61
-rw-r--r--keyboards/ps2avrGB/config.h38
-rw-r--r--keyboards/ps2avrGB/keymaps/default/keymap.c32
-rw-r--r--keyboards/ps2avrGB/matrix.c104
-rwxr-xr-xkeyboards/ps2avrGB/program74
-rw-r--r--keyboards/ps2avrGB/ps2avrGB.c0
-rw-r--r--keyboards/ps2avrGB/ps2avrGB.h43
-rw-r--r--keyboards/ps2avrGB/rules.mk43
-rw-r--r--keyboards/ps2avrGB/usbconfig.h396
-rw-r--r--quantum/process_keycode/process_music.c1
-rw-r--r--quantum/visualizer/visualizer.c58
-rw-r--r--quantum/visualizer/visualizer.h9
-rw-r--r--readme.md6
-rw-r--r--tmk_core/common.mk8
-rw-r--r--tmk_core/common/avr/bootloader.c12
-rw-r--r--tmk_core/common/avr/timer.c33
-rw-r--r--tmk_core/common/command.c3
-rw-r--r--tmk_core/common/keyboard.c2
-rw-r--r--tmk_core/protocol/vusb.mk3
-rw-r--r--tmk_core/protocol/vusb/main.c6
-rw-r--r--tmk_core/protocol/vusb/vusb.c22
61 files changed, 2705 insertions, 574 deletions
diff --git a/.travis.yml b/.travis.yml
index e74744a96..b206d1451 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,6 @@ os: linux
2dist: trusty 2dist: trusty
3sudo: required 3sudo: required
4language: c 4language: c
5compiler: avr-gcc
6branches: 5branches:
7 except: 6 except:
8 - /^.*-automated-build$/ 7 - /^.*-automated-build$/
@@ -12,13 +11,18 @@ env:
12 matrix: 11 matrix:
13 - TARGET=all-keyboards AUTOGEN=true 12 - TARGET=all-keyboards AUTOGEN=true
14 - TARGET=test AUTOGEN=false 13 - TARGET=test AUTOGEN=false
14before_install:
15 - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
16install:
17 - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
18 - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
19before_script:
20 - avr-gcc --version
15script: 21script:
16- make $TARGET AUTOGEN=$AUTOGEN 22- make $TARGET AUTOGEN=$AUTOGEN
17addons: 23addons:
18 apt: 24 apt:
19 packages: 25 packages:
20 - avr-libc
21 - gcc-avr
22 - dfu-programmer 26 - dfu-programmer
23 - pandoc 27 - pandoc
24 - gcc-arm-none-eabi 28 - gcc-arm-none-eabi
diff --git a/build_keyboard.mk b/build_keyboard.mk
index ce505de12..b85557d4a 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -221,7 +221,11 @@ OPT_DEFS += $(TMK_COMMON_DEFS)
221EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS) 221EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
222 222
223ifeq ($(PLATFORM),AVR) 223ifeq ($(PLATFORM),AVR)
224ifeq ($(strip $(PROTOCOL)), VUSB)
225 include $(TMK_PATH)/protocol/vusb.mk
226else
224 include $(TMK_PATH)/protocol/lufa.mk 227 include $(TMK_PATH)/protocol/lufa.mk
228endif
225 include $(TMK_PATH)/avr.mk 229 include $(TMK_PATH)/avr.mk
226endif 230endif
227 231
diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md
index a4077668e..8baa581f0 100644
--- a/keyboards/atreus/readme.md
+++ b/keyboards/atreus/readme.md
@@ -169,7 +169,7 @@ This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboar
169 169
170## Building 170## Building
171 171
172Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. 172Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
173 173
174Depending on which keymap you would like to use, you will have to compile slightly differently. 174Depending on which keymap you would like to use, you will have to compile slightly differently.
175 175
diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h
index 6a8c66d7d..e4f95c302 100644
--- a/keyboards/ergodox/ez/config.h
+++ b/keyboards/ergodox/ez/config.h
@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
49#define RGBLIGHT_SAT_STEP 255 49#define RGBLIGHT_SAT_STEP 255
50#define RGBLIGHT_VAL_STEP 12 50#define RGBLIGHT_VAL_STEP 12
51 51
52#define RGB_MIDI 52// #define RGB_MIDI
53#define RGBW_BB_TWI 53#define RGBW_BB_TWI
54 54
55#define RGBW 1 55#define RGBW 1
diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c
index 039e4c6bb..3e19f2302 100644
--- a/keyboards/ergodox/ez/ez.c
+++ b/keyboards/ergodox/ez/ez.c
@@ -52,9 +52,9 @@ uint8_t init_mcp23018(void) {
52 52
53 // I2C subsystem 53 // I2C subsystem
54 54
55 uint8_t sreg_prev; 55 // uint8_t sreg_prev;
56 sreg_prev=SREG; 56 // sreg_prev=SREG;
57 cli(); 57 // cli();
58 if (i2c_initialized == 0) { 58 if (i2c_initialized == 0) {
59 i2c_init(); // on pins D(1,0) 59 i2c_init(); // on pins D(1,0)
60 i2c_initialized++; 60 i2c_initialized++;
@@ -83,7 +83,7 @@ uint8_t init_mcp23018(void) {
83out: 83out:
84 i2c_stop(); 84 i2c_stop();
85 85
86 SREG=sreg_prev; 86 // SREG=sreg_prev;
87 87
88 return mcp23018_status; 88 return mcp23018_status;
89} 89}
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md
index 3e4a2545b..54da74f7f 100644
--- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md
@@ -7,18 +7,23 @@ Layers
7------ 7------
8 8
9* BASE: this is where you type. 9* BASE: this is where you type.
10* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row.
10* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. 11* SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement.
11* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. 12* KEY_NAV: arrow key movement with backward/forward word support, and copy/paste.
12* KEY_SEL: same as above, but every movement shift-selects. 13* KEY_SEL: same as above, but every movement shift-selects.
13* NUMBER: keypad layer. 14* NUMBER: keypad layer.
14* SYMBOL: all the symbols. 15* SYMBOL: all the symbols.
15* BRACKET: special brackets-only layer for programming 16* BRACKET: special brackets-only layer for programming. Activated by pressing left capslock (OSL)
16* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. 17* SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps.
17* MOUSE: use mouse keys 18* MOUSE: use mouse keys
18 19
19Updates 20Updates
20------- 21-------
21 22
232017/01/22:
24* Made brackets toggle an OSL on the left capslock
25* Added SHELL_LAYER
26
222016/12/10: 272016/12/10:
23* toggle for brackets layer is now on left thumb cluster. 28* toggle for brackets layer is now on left thumb cluster.
24 29
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
index f3d02f688..7ed0c7f12 100644
--- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
@@ -6,7 +6,8 @@
6#include "action_code.h" 6#include "action_code.h"
7 7
8#define BASE 0 // default layer 8#define BASE 0 // default layer
9#define SHELL_NAV 1 9#define SHELL_LAYER 1
10#define SHELL_NAV 2
10#define KEY_NAV 3 // key navigation layer 11#define KEY_NAV 3 // key navigation layer
11#define KEY_SEL 4 // key selection layer 12#define KEY_SEL 4 // key selection layer
12#define NUMBER 5 // number layer 13#define NUMBER 5 // number layer
@@ -58,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
58[BASE] = KEYMAP( // layer 0 : default 59[BASE] = KEYMAP( // layer 0 : default
59 // left hand 60 // left hand
60 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, 61 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
61 LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), 62 LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL),
62 MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, 63 OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I,
63 KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), 64 OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV),
64 OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), 65 OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER),
65 // thumb cluster 66 // thumb cluster
66 MO(BRACKETS), RCTL(KC_S), 67 MO(MOUSE), RCTL(KC_S),
67 RCTL(KC_DEL), 68 RCTL(KC_DEL),
68 KC_BSPC,RCTL(KC_BSPC),KC_DEL, 69 KC_BSPC,RCTL(KC_BSPC),KC_DEL,
69 // right hand 70 // right hand
@@ -80,6 +81,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
80 ), 81 ),
81 82
82 83
84
85// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden
86[SHELL_LAYER] = KEYMAP(
87 // left hand
88 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C),
89 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
90 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
91 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
92 // bottom row
93 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
94 // thumb cluster
95 KC_TRNS,KC_TRNS,
96 KC_TRNS,
97 KC_TRNS,KC_TRNS,KC_TRNS,
98 // right hand
99 RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), KC_TRNS,
100 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
101 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
102 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
103 // bottom row
104 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
105 // thumb cluster
106 KC_TRNS, KC_TRNS,
107 KC_TRNS,
108 KC_TRNS, KC_TRNS, KC_TRNS
109),
110
83// shell navigation layer 111// shell navigation layer
84[SHELL_NAV] = KEYMAP( 112[SHELL_NAV] = KEYMAP(
85 // left hand 113 // left hand
@@ -209,12 +237,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
209 237
210[BRACKETS] = KEYMAP( 238[BRACKETS] = KEYMAP(
211 // left hand 239 // left hand
212 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 240 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,
213 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 241 KC_TRNS,KC_TRNS,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS,
214 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 242 KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_TRNS,
215 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 243 KC_TRNS,KC_TRNS,KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS,KC_TRNS,
216 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 244 KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,
217 KC_TRNS,KC_TRNS, 245 KC_TRNS,KC_TRNS,
218 KC_TRNS, 246 KC_TRNS,
219 KC_TRNS,KC_TRNS,KC_TRNS, 247 KC_TRNS,KC_TRNS,KC_TRNS,
220 // right hand 248 // right hand
@@ -246,7 +274,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
246 MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), 274 MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X),
247 MEH(KC_6), MEH(KC_7), 275 MEH(KC_6), MEH(KC_7),
248 MEH(KC_8), 276 MEH(KC_8),
249 MEH(KC_9), MEH(KC_Y), MEH(KC_Z) 277 MEH(KC_9), TO(BASE), TO(SHELL_LAYER)
250), 278),
251 279
252 280
@@ -406,6 +434,8 @@ void matrix_scan_user(void) {
406 switch (layer) { 434 switch (layer) {
407 case NUMBER: 435 case NUMBER:
408 case SYMBOL: 436 case SYMBOL:
437 case BRACKETS:
438 //case SHELL_LAYER:
409 ergodox_right_led_2_on(); 439 ergodox_right_led_2_on();
410 break; 440 break;
411 case KEY_NAV: 441 case KEY_NAV:
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json
new file mode 100644
index 000000000..6958952b4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json
@@ -0,0 +1,419 @@
1[
2 {
3 "backcolor": "#ffffff",
4 "name": "Ergodox Swiss German Layout - Base Layer",
5 "author": "Andreas Schmidt (https://github.com/remigius42)"
6 },
7 [
8 {
9 "x": 3.5
10 },
11 "#\n3",
12 {
13 "x": 10.5
14 },
15 "*\n8"
16 ],
17 [
18 {
19 "y": -0.875,
20 "x": 2.5
21 },
22 "@\n2",
23 {
24 "x": 1
25 },
26 "$\n4",
27 {
28 "x": 8.5
29 },
30 "&\n7",
31 {
32 "x": 1
33 },
34 "(\n9"
35 ],
36 [
37 {
38 "y": -0.875,
39 "x": 5.5
40 },
41 "%\n5",
42 {
43 "a": 7
44 },
45 "<i class='fa fa-arrow-left'></i>",
46 {
47 "x": 4.5
48 },
49 "<i class='fa fa-arrow-right'></i>",
50 {
51 "a": 4
52 },
53 "^\n6"
54 ],
55 [
56 {
57 "y": -0.875,
58 "w": 1.5
59 },
60 "°\n§",
61 "!\n1",
62 {
63 "x": 14.5
64 },
65 ")\n0",
66 {
67 "w": 1.5
68 },
69 "?\n'\n\n'"
70 ],
71 [
72 {
73 "y": -0.375,
74 "x": 3.5
75 },
76 "E",
77 {
78 "x": 10.5
79 },
80 "I"
81 ],
82 [
83 {
84 "y": -0.875,
85 "x": 2.5
86 },
87 "W",
88 {
89 "x": 1
90 },
91 "R",
92 {
93 "x": 8.5
94 },
95 "U",
96 {
97 "x": 1
98 },
99 "O"
100 ],
101 [
102 {
103 "y": -0.875,
104 "x": 5.5
105 },
106 "T",
107 {
108 "c": "#b56b6b",
109 "a": 6,
110 "h": 1.5
111 },
112 "Toggle Code Layer",
113 {
114 "x": 4.5,
115 "h": 1.5
116 },
117 "Toggle Code Layer",
118 {
119 "c": "#cccccc",
120 "a": 4
121 },
122 "Y"
123 ],
124 [
125 {
126 "y": -0.875,
127 "a": 6,
128 "w": 1.5
129 },
130 "Delete",
131 {
132 "a": 4
133 },
134 "Q",
135 {
136 "x": 14.5
137 },
138 "P",
139 {
140 "w": 1.5
141 },
142 "è\nü\n\n["
143 ],
144 [
145 {
146 "y": -0.375,
147 "x": 3.5
148 },
149 "D",
150 {
151 "x": 10.5
152 },
153 "K"
154 ],
155 [
156 {
157 "y": -0.875,
158 "x": 2.5
159 },
160 "S",
161 {
162 "x": 1
163 },
164 "F",
165 {
166 "x": 8.5
167 },
168 "J",
169 {
170 "x": 1
171 },
172 "L"
173 ],
174 [
175 {
176 "y": -0.875,
177 "x": 5.5
178 },
179 "G",
180 {
181 "x": 6.5
182 },
183 "H"
184 ],
185 [
186 {
187 "y": -0.875,
188 "a": 6,
189 "w": 1.5
190 },
191 "Backspace",
192 {
193 "c": "#79c777",
194 "a": 4
195 },
196 "A\n\nLyr3",
197 {
198 "x": 14.5
199 },
200 "é\nö\nLyr3",
201 {
202 "c": "#748adb",
203 "w": 1.5
204 },
205 "à\nä\nCmd\n{"
206 ],
207 [
208 {
209 "y": -0.625,
210 "x": 6.5,
211 "c": "#cccccc",
212 "a": 6,
213 "h": 1.5
214 },
215 "Hyper",
216 {
217 "x": 4.5,
218 "h": 1.5
219 },
220 "Meh"
221 ],
222 [
223 {
224 "y": -0.75,
225 "x": 3.5,
226 "a": 4
227 },
228 "C",
229 {
230 "x": 10.5
231 },
232 ";\n,"
233 ],
234 [
235 {
236 "y": -0.875,
237 "x": 2.5,
238 "c": "#748adb"
239 },
240 "X\n\nAlt",
241 {
242 "x": 1,
243 "c": "#cccccc"
244 },
245 "V",
246 {
247 "x": 8.5
248 },
249 "M",
250 {
251 "x": 1,
252 "c": "#748adb"
253 },
254 ":\n.\nAlt"
255 ],
256 [
257 {
258 "y": -0.875,
259 "x": 5.5,
260 "c": "#cccccc"
261 },
262 "B",
263 {
264 "x": 6.5
265 },
266 "N"
267 ],
268 [
269 {
270 "y": -0.875,
271 "a": 6,
272 "w": 1.5
273 },
274 "Shift",
275 {
276 "c": "#748adb",
277 "a": 4
278 },
279 "Z\n\nCtrl",
280 {
281 "x": 14.5
282 },
283 "_\n-\nCtrl",
284 {
285 "c": "#cccccc",
286 "a": 6,
287 "w": 1.5
288 },
289 "Shift"
290 ],
291 [
292 {
293 "y": -0.375,
294 "x": 3.5,
295 "a": 7
296 },
297 "<i class='fa fa-arrow-left'></i>",
298 {
299 "x": 10.5
300 },
301 "<i class='fa fa-arrow-down'></i>"
302 ],
303 [
304 {
305 "y": -0.875,
306 "x": 2.5,
307 "a": 4
308 },
309 "£\n$\n\n}",
310 {
311 "x": 1,
312 "a": 7
313 },
314 "<i class='fa fa-arrow-right'></i>",
315 {
316 "x": 10.5,
317 "a": 6
318 },
319 "AltGr"
320 ],
321 [
322 {
323 "y": -0.9950000000000001,
324 "x": 14,
325 "a": 7
326 },
327 "<i class='fa fa-arrow-up'></i>"
328 ],
329 [
330 {
331 "y": -0.7549999999999999,
332 "x": 0.5,
333 "c": "#b56b6b",
334 "a": 4
335 },
336 ">\n<\nCode Layer\n\\",
337 {
338 "c": "#cccccc"
339 },
340 "`\n^\n\n~",
341 {
342 "x": 14.5
343 },
344 "!\n¨\n\n]",
345 {
346 "c": "#b56b6b"
347 },
348 "\n\nCode Layer"
349 ],
350 [
351 {
352 "r": 30,
353 "rx": 6.5,
354 "ry": 4.25,
355 "y": -1,
356 "x": 1,
357 "c": "#748adb"
358 },
359 "Apps\nAlt",
360 {
361 "c": "#cccccc",
362 "a": 6
363 },
364 "Win / Cmd"
365 ],
366 [
367 {
368 "h": 2
369 },
370 "Space",
371 {
372 "h": 2
373 },
374 "Back Space",
375 "Home"
376 ],
377 [
378 {
379 "x": 2
380 },
381 "End"
382 ],
383 [
384 {
385 "r": -30,
386 "rx": 13,
387 "y": -1,
388 "x": -3
389 },
390 "Alt",
391 {
392 "c": "#748adb",
393 "a": 4
394 },
395 "Esc\nCtrl"
396 ],
397 [
398 {
399 "x": -3,
400 "c": "#cccccc",
401 "a": 6
402 },
403 "Pg Up",
404 {
405 "h": 2
406 },
407 "Tab",
408 {
409 "h": 2
410 },
411 "Enter"
412 ],
413 [
414 {
415 "x": -3
416 },
417 "Pg Dn"
418 ]
419]
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png
new file mode 100644
index 000000000..aff6af851
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json
new file mode 100644
index 000000000..38a728514
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json
@@ -0,0 +1,436 @@
1[
2 {
3 "backcolor": "#ffffff",
4 "name": "Ergodox Swiss German Layout - Symbol & Media Layer",
5 "author": "Andreas Schmidt (https://github.com/remigius42)"
6 },
7 [
8 {
9 "x": 3.5,
10 "t": "#b81c1c"
11 },
12 "F3",
13 {
14 "x": 10.5
15 },
16 "F8"
17 ],
18 [
19 {
20 "y": -0.875,
21 "x": 2.5
22 },
23 "F2",
24 {
25 "x": 1
26 },
27 "F4",
28 {
29 "x": 8.5
30 },
31 "F7",
32 {
33 "x": 1
34 },
35 "F9"
36 ],
37 [
38 {
39 "y": -0.875,
40 "x": 5.5
41 },
42 "F5",
43 {
44 "t": "#000000",
45 "a": 7
46 },
47 "",
48 {
49 "x": 4.5
50 },
51 "",
52 {
53 "t": "#b81c1c",
54 "a": 4
55 },
56 "F6"
57 ],
58 [
59 {
60 "y": -0.875,
61 "t": "#000000\n\n\n#529151",
62 "w": 1.5
63 },
64 "\n\n\nFlash",
65 {
66 "t": "#b81c1c"
67 },
68 "F1",
69 {
70 "x": 14.5
71 },
72 "F10",
73 {
74 "t": "#b81c1c\n\n\n#529151",
75 "w": 1.5
76 },
77 "F11\n\n\nFlash"
78 ],
79 [
80 {
81 "y": -0.375,
82 "x": 3.5
83 },
84 "{\n\n\n<i class='fa fa-arrow-circle-up'></i>",
85 {
86 "x": 10.5,
87 "t": "#b81c1c"
88 },
89 "8"
90 ],
91 [
92 {
93 "y": -0.875,
94 "x": 2.5
95 },
96 "@",
97 {
98 "x": 1
99 },
100 "}",
101 {
102 "x": 8.5,
103 "t": "#b81c1c\n\n\n#529151"
104 },
105 "7\n\n\nHTML ul",
106 {
107 "x": 1
108 },
109 "9\n\n\nHTML ol"
110 ],
111 [
112 {
113 "y": -0.875,
114 "x": 5.5,
115 "t": "#b81c1c"
116 },
117 "|",
118 {
119 "t": "#000000",
120 "a": 7,
121 "h": 1.5
122 },
123 "",
124 {
125 "x": 4.5,
126 "h": 1.5
127 },
128 "",
129 {
130 "t": "#b81c1c",
131 "a": 4
132 },
133 "<i class='fa fa-arrow-up'></i>"
134 ],
135 [
136 {
137 "y": -0.875,
138 "t": "#000000",
139 "a": 7,
140 "w": 1.5
141 },
142 "",
143 {
144 "t": "#b81c1c",
145 "a": 4
146 },
147 "!",
148 {
149 "x": 14.5
150 },
151 "*",
152 {
153 "w": 1.5
154 },
155 "F12"
156 ],
157 [
158 {
159 "y": -0.375,
160 "x": 3.5,
161 "t": "#b81c1c\n\n\n#529151"
162 },
163 "(\n\n\n<i class='fa fa-arrow-circle-down'></i>",
164 {
165 "x": 10.5
166 },
167 "5\n\n\nHTML li"
168 ],
169 [
170 {
171 "y": -0.875,
172 "x": 2.5
173 },
174 "$\n\n\n<i class='fa fa-arrow-circle-left'></i>",
175 {
176 "x": 1
177 },
178 ")\n\n\n<i class='fa fa-arrow-circle-right'></i>",
179 {
180 "x": 8.5,
181 "t": "#b81c1c"
182 },
183 "4",
184 {
185 "x": 1
186 },
187 "6"
188 ],
189 [
190 {
191 "y": -0.875,
192 "x": 5.5
193 },
194 "`",
195 {
196 "x": 6.5
197 },
198 "<i class='fa fa-arrow-down'></i>"
199 ],
200 [
201 {
202 "y": -0.875,
203 "t": "#000000",
204 "a": 7,
205 "w": 1.5
206 },
207 "",
208 {
209 "t": "#b81c1c",
210 "a": 4
211 },
212 "#",
213 {
214 "x": 14.5
215 },
216 "+",
217 {
218 "t": "#000000\n\n\n#529151",
219 "w": 1.5
220 },
221 "\n\n\n<i class='fa fa-play'></i><i class='fa fa-pause'></i>"
222 ],
223 [
224 {
225 "y": -0.625,
226 "x": 6.5,
227 "t": "#000000",
228 "a": 7,
229 "h": 1.5
230 },
231 "",
232 {
233 "x": 4.5,
234 "h": 1.5
235 },
236 ""
237 ],
238 [
239 {
240 "y": -0.75,
241 "x": 3.5,
242 "t": "#b81c1c\n\n\n#529151",
243 "a": 4
244 },
245 "[\n\n\nHTML code",
246 {
247 "x": 10.5
248 },
249 "2\n\n\n<i class='fa fa-fast-backward'></i>"
250 ],
251 [
252 {
253 "y": -0.875,
254 "x": 2.5,
255 "t": "#b81c1c"
256 },
257 "^",
258 {
259 "x": 1,
260 "t": "#b81c1c\n\n\n#529151"
261 },
262 "]\n\n\nHTML br",
263 {
264 "x": 8.5,
265 "t": "#b81c1c"
266 },
267 "1",
268 {
269 "x": 1,
270 "t": "#b81c1c\n\n\n#529151"
271 },
272 "3\n\n\n<i class='fa fa-fast-forward'></i>"
273 ],
274 [
275 {
276 "y": -0.875,
277 "x": 5.5,
278 "t": "#b81c1c"
279 },
280 "~",
281 {
282 "x": 6.5
283 },
284 "&"
285 ],
286 [
287 {
288 "y": -0.875,
289 "t": "#000000",
290 "a": 7,
291 "w": 1.5
292 },
293 "",
294 {
295 "t": "#b81c1c",
296 "a": 4
297 },
298 "%",
299 {
300 "x": 14.5
301 },
302 "\\",
303 {
304 "t": "#000000",
305 "a": 7,
306 "w": 1.5
307 },
308 ""
309 ],
310 [
311 {
312 "y": -0.375,
313 "x": 3.5,
314 "t": "#000000\n\n\n#529151",
315 "a": 4
316 },
317 "\n\n\nleft click",
318 {
319 "x": 10.5,
320 "t": "#b81c1c\n\n\n#529151"
321 },
322 ".\n\n\n<i class='fa fa-volume-down'></i>"
323 ],
324 [
325 {
326 "y": -0.875,
327 "x": 2.5,
328 "t": "#000000",
329 "a": 7
330 },
331 "",
332 {
333 "x": 1,
334 "t": "#000000\n\n\n#529151",
335 "a": 4
336 },
337 "\n\n\nright click",
338 {
339 "x": 8.5,
340 "t": "#b81c1c\n\n\n#529151"
341 },
342 "?\n\n\n<i class='fa fa-volume-up'></i>",
343 {
344 "x": 1,
345 "t": "#b81c1c"
346 },
347 "0"
348 ],
349 [
350 {
351 "y": -0.75,
352 "x": 0.5,
353 "t": "#000000",
354 "a": 7
355 },
356 "",
357 {
358 "t": "#b81c1c",
359 "a": 4
360 },
361 "EPRM RST",
362 {
363 "x": 14.5,
364 "t": "#000000",
365 "a": 7
366 },
367 "",
368 ""
369 ],
370 [
371 {
372 "r": 30,
373 "rx": 6.5,
374 "ry": 4.25,
375 "y": -1,
376 "x": 1
377 },
378 "",
379 ""
380 ],
381 [
382 {
383 "t": "#000000\n\n\n#529151",
384 "a": 4,
385 "h": 2
386 },
387 "\n\n\nEnter",
388 {
389 "t": "#000000",
390 "a": 7,
391 "h": 2
392 },
393 "",
394 ""
395 ],
396 [
397 {
398 "x": 2
399 },
400 ""
401 ],
402 [
403 {
404 "r": -30,
405 "rx": 13,
406 "y": -1,
407 "x": -3
408 },
409 "",
410 ""
411 ],
412 [
413 {
414 "x": -3
415 },
416 "",
417 {
418 "h": 2
419 },
420 "",
421 {
422 "t": "#000000\n\n\n#529151",
423 "a": 4,
424 "h": 2
425 },
426 "\n\n\nWeb back"
427 ],
428 [
429 {
430 "x": -3,
431 "t": "#000000",
432 "a": 7
433 },
434 ""
435 ]
436]
diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png
new file mode 100644
index 000000000..54c4a7587
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c
new file mode 100644
index 000000000..2291fb651
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c
@@ -0,0 +1,287 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "version.h"
5#include "string.h"
6
7#ifdef SUBPROJECT_infinity
8#include "visualizer/lcd_backlight.h"
9#endif
10
11
12#define BASE 0 // default layer
13#define SYMB 1 // symbols
14#define MDIA 2 // media keys
15
16#define EPRM M(1) // Macro 1: Reset EEPROM
17#define HTML_LI M(10)
18#define HTML_UL M(11)
19#define HTML_OL M(12)
20#define HTML_CODE M(13)
21#define HTML_BR M(14)
22
23#define SEND_TAG(TAG) do {\
24 send_key(KC_NONUS_BSLASH); \
25 SEND_STRING(TAG); \
26 send_larger_than(); \
27 send_key(KC_NONUS_BSLASH); \
28 SEND_STRING("&"); \
29 SEND_STRING(TAG); \
30 send_larger_than(); \
31 go_back_based_on_tag(TAG); \
32 } while (0)
33
34#define SEND_SHORT_TAG(TAG) do {\
35 send_key(KC_NONUS_BSLASH); \
36 SEND_STRING(TAG); \
37 SEND_STRING("&"); \
38 send_larger_than(); \
39 } while (0)
40
41void send_key(uint16_t keycode);
42void go_back_based_on_tag(char* tag);
43void send_larger_than(void);
44
45
46const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47/* Keymap 0: Basic layer
48 *
49 * ,--------------------------------------------------. ,--------------------------------------------------.
50 * | § | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | ' |
51 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
52 * | Del | Q | W | E | R | T | L1 | | L1 | Z | U | I | O | P | ü |
53 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
54 * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L |ö / L2|ä / Cmd |
55 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
56 * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift |
57 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
58 * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | ¨ | ~L1 |
59 * `----------------------------------' `----------------------------------'
60 * ,-------------. ,-------------.
61 * | App | LGui | | Alt |Ctrl/Esc|
62 * ,------|------|------| |------+--------+------.
63 * | | | Home | | PgUp | | |
64 * | Space|Backsp|------| |------| Tab |Enter |
65 * | |ace | End | | PgDn | | |
66 * `--------------------' `----------------------'
67 */
68// If it accepts an argument (i.e, is a function), it doesn't need KC_.
69// Otherwise, it needs KC_*
70[BASE] = KEYMAP( // layer 0 : default
71 // left hand
72 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
73 KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
74 KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G,
75 KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO),
76 LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, KC_LEFT,KC_RGHT,
77 ALT_T(KC_APP), KC_LGUI,
78 KC_HOME,
79 KC_SPC,KC_BSPC,KC_END,
80 // right hand
81 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
82 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
83 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
84 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT,
85 KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1,
86 KC_LALT,CTL_T(KC_ESC),
87 KC_PGUP,
88 KC_PGDN,KC_TAB, KC_ENT
89 ),
90/* Keymap 1: Symbol Layer
91 *
92 * ,--------------------------------------------------. ,--------------------------------------------------.
93 * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
94 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
95 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
96 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
97 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
98 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
99 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
100 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
101 * | | EPRM | | | | | ? | . | 0 | = | |
102 * `----------------------------------' `----------------------------------'
103 * ,-------------. ,-------------.
104 * | | | | | |
105 * ,------|------|------| |------+------+------.
106 * | | | | | | | |
107 * | | |------| |------| | |
108 * | | | | | | | |
109 * `--------------------' `--------------------'
110 */
111// SYMBOLS
112[SYMB] = KEYMAP(
113 // left hand
114 M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
115 KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS,
116 KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL),
117 KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS,
118 KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/,
119 KC_TRNS,KC_TRNS,
120 KC_TRNS,
121 KC_TRNS,KC_TRNS,KC_TRNS,
122 // right hand
123 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
124 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12,
125 KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS,
126 KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS,
127 ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS,
128 KC_TRNS, KC_TRNS,
129 KC_TRNS,
130 KC_TRNS, KC_TRNS, KC_TRNS
131),
132/* Keymap 2: Media and mouse keys
133 *
134 * ,--------------------------------------------------. ,--------------------------------------------------.
135 * | RESET | | | | | | | | | | | | | | RESET |
136 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
137 * | | | | MsUp | | | | | | |H_UL | |H_OL | | |
138 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
139 * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play |
140 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
141 * | | |H_CODE| |H_BR | | | | | | | Prev | Next | | |
142 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
143 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
144 * `----------------------------------' `----------------------------------'
145 * ,-------------. ,-------------.
146 * | | | | | |
147 * ,------|------|------| |------+------+------.
148 * |Enter | | | | | |Brwser|
149 * | | |------| |------| |Back |
150 * | | | | | | | |
151 * `--------------------' `--------------------'
152 */
153// MEDIA AND MOUSE
154[MDIA] = KEYMAP(
155 RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
156 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
157 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
158 KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS,
159 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
160 KC_TRNS, KC_TRNS,
161 KC_TRNS,
162 KC_ENT, KC_TRNS, KC_TRNS,
163 // right hand
164 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
165 KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS,
166 KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, KC_TRNS, KC_MPLY,
167 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
168 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
169 KC_TRNS, KC_TRNS,
170 KC_TRNS,
171 KC_TRNS, KC_TRNS, KC_WBAK
172),
173};
174
175const uint16_t PROGMEM fn_actions[] = {
176 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
177};
178
179const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
180{
181 // MACRODOWN only works in this function
182 switch(id) {
183 case 0:
184 if (record->event.pressed) {
185 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
186 }
187 break;
188 case 1:
189 if (record->event.pressed) { // For resetting EEPROM
190 eeconfig_init();
191 }
192 break;
193 case 10:
194 if (record->event.pressed) {
195 SEND_TAG("li");
196 }
197 break;
198 case 11:
199 if (record->event.pressed) {
200 SEND_TAG("ul");
201 }
202 break;
203 case 12:
204 if (record->event.pressed) {
205 SEND_TAG("ol");
206 }
207 break;
208 case 13:
209 if (record->event.pressed) {
210 SEND_TAG("code");
211 }
212 break;
213 case 14:
214 if (record->event.pressed) {
215 SEND_SHORT_TAG("br");
216 }
217 }
218 return MACRO_NONE;
219};
220
221// Runs just one time when the keyboard initializes.
222void matrix_init_user(void) {
223
224};
225
226// Runs constantly in the background, in a loop.
227void matrix_scan_user(void) {
228
229 uint8_t layer = biton32(layer_state);
230
231 switch (layer) {
232 // TODO: Make this relevant to the ErgoDox EZ.
233 case 0:
234 ergodox_board_led_off();
235 ergodox_right_led_1_off();
236 ergodox_right_led_2_off();
237 ergodox_right_led_3_off();
238
239 #ifdef SUBPROJECT_infinity
240 lcd_backlight_hal_color(0, 0, 0);
241 #endif
242 break;
243 case 1:
244 ergodox_right_led_1_on();
245
246 ergodox_board_led_off();
247 ergodox_right_led_2_off();
248 ergodox_right_led_3_off();
249 #ifdef SUBPROJECT_infinity
250 lcd_backlight_hal_color(5000, 0, 0);
251 #endif
252 break;
253 case 2:
254 ergodox_right_led_2_on();
255
256 ergodox_board_led_off();
257 ergodox_right_led_1_off();
258 ergodox_right_led_3_off();
259 #ifdef SUBPROJECT_infinity
260 lcd_backlight_hal_color(0, 5000, 0);
261 #endif
262 break;
263 default:
264 // none
265 break;
266 }
267
268};
269
270void send_key(uint16_t keycode) {
271 register_code(keycode);
272 unregister_code(keycode);
273}
274
275void go_back_based_on_tag(char* tag) {
276 const int BRACKETS_AND_SLASH_LENGTH = 3;
277
278 for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) {
279 send_key(KC_LEFT);
280 }
281}
282
283void send_larger_than() {
284 register_code(KC_LSFT);
285 send_key(KC_NONUS_BSLASH);
286 unregister_code(KC_LSFT);
287}
diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md
new file mode 100644
index 000000000..b1061c1dd
--- /dev/null
+++ b/keyboards/ergodox/keymaps/swissgerman/readme.md
@@ -0,0 +1,15 @@
1# ErgoDox Swiss German Configuration
2
3Swiss German keyboard layout based on the Ergodox EZ default layout.
4
5Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com).
6
7Diagram sources: [default layer](keyboard-layout.json), [layer 1 & 2](keyboard-layout_1_2.json)
8
9![Layout Layer 0](keyboard-layout.png)
10![Layout Layer 1&2](keyboard-layout_1_2.png)
11
12## Changelog
13* Jan 21, 2017:
14 * Initial version based on default layout.
15
diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c
index e471250fe..fdeed5124 100644
--- a/keyboards/infinity60/infinity60.c
+++ b/keyboards/infinity60/infinity60.c
@@ -15,3 +15,18 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#include "infinity60.h" 17#include "infinity60.h"
18
19void matrix_init_kb(void) {
20 // put your keyboard start-up code here
21 // runs once when the firmware starts up
22
23 matrix_init_user();
24}
25
26void matrix_scan_kb(void) {
27 // put your looping keyboard code here
28 // runs every cycle (a lot)
29
30 matrix_scan_user();
31}
32
diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c
index 443412857..8347c94b4 100644
--- a/keyboards/infinity60/keymaps/default/keymap.c
+++ b/keyboards/infinity60/keymaps/default/keymap.c
@@ -46,3 +46,12 @@ const uint16_t fn_actions[] = {
46 46
47}; 47};
48 48
49// Runs just one time when the keyboard initializes.
50void matrix_init_user(void) {
51
52};
53
54// Runs constantly in the background, in a loop.
55void matrix_scan_user(void) {
56
57};
diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c
index 7412b9b9d..57f9487f2 100755
--- a/keyboards/infinity60/keymaps/depariel/keymap.c
+++ b/keyboards/infinity60/keymaps/depariel/keymap.c
@@ -80,3 +80,12 @@ const uint16_t PROGMEM fn_actions[] = {
80 80
81}; 81};
82 82
83// Runs just one time when the keyboard initializes.
84void matrix_init_user(void) {
85
86};
87
88// Runs constantly in the background, in a loop.
89void matrix_scan_user(void) {
90
91};
diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c
index d3728869a..9982078c1 100644
--- a/keyboards/infinity60/keymaps/hasu/keymap.c
+++ b/keyboards/infinity60/keymaps/hasu/keymap.c
@@ -111,3 +111,13 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
111const uint16_t fn_actions[] = { 111const uint16_t fn_actions[] = {
112 112
113}; 113};
114
115// Runs just one time when the keyboard initializes.
116void matrix_init_user(void) {
117
118};
119
120// Runs constantly in the background, in a loop.
121void matrix_scan_user(void) {
122
123};
diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c
index d2f185288..b6ccf86c3 100644
--- a/keyboards/infinity60/matrix.c
+++ b/keyboards/infinity60/matrix.c
@@ -62,6 +62,8 @@ void matrix_init(void)
62#endif 62#endif
63 memset(matrix, 0, MATRIX_ROWS); 63 memset(matrix, 0, MATRIX_ROWS);
64 memset(matrix_debouncing, 0, MATRIX_ROWS); 64 memset(matrix_debouncing, 0, MATRIX_ROWS);
65
66 matrix_init_quantum();
65} 67}
66 68
67uint8_t matrix_scan(void) 69uint8_t matrix_scan(void)
@@ -146,6 +148,7 @@ uint8_t matrix_scan(void)
146 } 148 }
147 debouncing = false; 149 debouncing = false;
148 } 150 }
151 matrix_scan_quantum();
149 return 1; 152 return 1;
150} 153}
151 154
diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h
index 4db45ab0b..7df0c5752 100644
--- a/keyboards/lets_split/config.h
+++ b/keyboards/lets_split/config.h
@@ -20,49 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21#include "config_common.h" 21#include "config_common.h"
22 22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* COL2ROW or ROW2COL */
32#define DIODE_DIRECTION COL2ROW
33
34/* define if matrix has ghost */
35//#define MATRIX_HAS_GHOST
36
37/* number of backlight levels */
38// #define BACKLIGHT_LEVELS 3
39
40/* Set 0 if debouncing isn't needed */
41#define DEBOUNCING_DELAY 5
42
43/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
44#define LOCKING_SUPPORT_ENABLE
45/* Locking resynchronize hack */
46#define LOCKING_RESYNC_ENABLE
47
48/* key combination for command */
49#define IS_COMMAND() ( \
50 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
51)
52
53/* disable debug print */
54//#define NO_DEBUG
55
56/* disable print */
57//#define NO_PRINT
58
59/* disable action features */
60//#define NO_ACTION_LAYER
61//#define NO_ACTION_TAPPING
62//#define NO_ACTION_ONESHOT
63//#define NO_ACTION_MACRO
64//#define NO_ACTION_FUNCTION
65
66#ifdef SUBPROJECT_rev1 23#ifdef SUBPROJECT_rev1
67 #include "rev1/config.h" 24 #include "rev1/config.h"
68#endif 25#endif
diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c
deleted file mode 100644
index 6f1f71f5f..000000000
--- a/keyboards/lets_split/keymaps/default/keymap.c
+++ /dev/null
@@ -1,188 +0,0 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86[3] = KEYMAP( \
87 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
88 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
89 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
90 _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
91),
92[4] = KEYMAP( \
93 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
94 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
95 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
96 _______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
97),
98
99/* Adjust (Lower + Raise)
100 * ,-----------------------------------------------------------------------------------.
101 * | | Reset| | | | | | | | | | Del |
102 * |------+------+------+------+------+-------------+------+------+------+------+------|
103 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
104 * |------+------+------+------+------+------|------+------+------+------+------+------|
105 * | | | | | | | | | | | | |
106 * |------+------+------+------+------+------+------+------+------+------+------+------|
107 * | | | | | | | | | | | |
108 * `-----------------------------------------------------------------------------------'
109 */
110[_ADJUST] = KEYMAP( \
111 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
112 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
113 _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \
114 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
115)
116};
117
118#ifdef AUDIO_ENABLE
119float tone_qwerty[][2] = SONG(QWERTY_SOUND);
120float tone_dvorak[][2] = SONG(DVORAK_SOUND);
121float tone_colemak[][2] = SONG(COLEMAK_SOUND);
122#endif
123
124void persistant_default_layer_set(uint16_t default_layer) {
125 eeconfig_update_default_layer(default_layer);
126 default_layer_set(default_layer);
127}
128
129bool process_record_user(uint16_t keycode, keyrecord_t *record) {
130 switch (keycode) {
131 case QWERTY:
132 if (record->event.pressed) {
133 #ifdef AUDIO_ENABLE
134 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
135 #endif
136 persistant_default_layer_set(1UL<<_QWERTY);
137 }
138 return false;
139 break;
140 case COLEMAK:
141 if (record->event.pressed) {
142 #ifdef AUDIO_ENABLE
143 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
144 #endif
145 persistant_default_layer_set(1UL<<_COLEMAK);
146 }
147 return false;
148 break;
149 case DVORAK:
150 if (record->event.pressed) {
151 #ifdef AUDIO_ENABLE
152 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
153 #endif
154 persistant_default_layer_set(1UL<<_DVORAK);
155 }
156 return false;
157 break;
158 case LOWER:
159 if (record->event.pressed) {
160 layer_on(_LOWER);
161 update_tri_layer(_LOWER, _RAISE, _ADJUST);
162 } else {
163 layer_off(_LOWER);
164 update_tri_layer(_LOWER, _RAISE, _ADJUST);
165 }
166 return false;
167 break;
168 case RAISE:
169 if (record->event.pressed) {
170 layer_on(_RAISE);
171 update_tri_layer(_LOWER, _RAISE, _ADJUST);
172 } else {
173 layer_off(_RAISE);
174 update_tri_layer(_LOWER, _RAISE, _ADJUST);
175 }
176 return false;
177 break;
178 case ADJUST:
179 if (record->event.pressed) {
180 layer_on(_ADJUST);
181 } else {
182 layer_off(_ADJUST);
183 }
184 return false;
185 break;
186 }
187 return true;
188} \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h
index 72e5ae66b..efe8bb0f2 100644
--- a/keyboards/lets_split/keymaps/i2c/config.h
+++ b/keyboards/lets_split/keymaps/i2c/config.h
@@ -14,89 +14,14 @@ GNU General Public License for more details.
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42#define USE_I2C 17#define USE_I2C
43 18
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT 19#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT 20// #define I2C_MASTER_RIGHT
53 21
54/* COL2ROW or ROW2COL */ 22#ifdef SUBPROJECT_rev1
55#define DIODE_DIRECTION COL2ROW 23 #include "../../rev1/config.h"
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_ANIMATIONS
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif 24#endif
25#ifdef SUBPROJECT_rev2
26 #include "../../rev2/config.h"
27#endif \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h
index b0ad522fc..cd766cc4f 100644
--- a/keyboards/lets_split/keymaps/serial/config.h
+++ b/keyboards/lets_split/keymaps/serial/config.h
@@ -15,88 +15,15 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18#ifndef CONFIG_H
19#define CONFIG_H
20 18
21#include "config_common.h" 19#define USE_SERIAL
22 20
23/* USB Device descriptor parameter */ 21#define EE_HANDS
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30 22
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42// #define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_ANIMATIONS
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101 23
24#ifdef SUBPROJECT_rev1
25 #include "../../rev1/config.h"
102#endif 26#endif
27#ifdef SUBPROJECT_rev2
28 #include "../../rev2/config.h"
29#endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h
index 825e5ec24..2f5bde953 100644
--- a/keyboards/lets_split/rev1/config.h
+++ b/keyboards/lets_split/rev1/config.h
@@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
25#define PRODUCT_ID 0x3060 25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001 26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot 27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define PRODUCT Lets Split v1 28#define PRODUCT Lets Split v1
30#define DESCRIPTION A split keyboard for the cheap makers 29#define DESCRIPTION A split keyboard for the cheap makers
31 30
@@ -37,19 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
37// wiring of each half 36// wiring of each half
38#define MATRIX_ROW_PINS { B5, B4, E6, D7 } 37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
39#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } 38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
40 40
41#define CATERINA_BOOTLOADER
42
43// #define USE_I2C
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48 41
49// #define EE_HANDS 42#define CATERINA_BOOTLOADER
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53 43
54/* COL2ROW or ROW2COL */ 44/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW 45#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h
index e9689d773..b34d7c004 100644
--- a/keyboards/lets_split/rev2/config.h
+++ b/keyboards/lets_split/rev2/config.h
@@ -36,21 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
36// wiring of each half 36// wiring of each half
37#define MATRIX_ROW_PINS { D7, E6, B4, B5 } 37#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
38#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } 38#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
39// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
39 40
40#define CATERINA_BOOTLOADER 41#define CATERINA_BOOTLOADER
41 42
42// #define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */ 43/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW 44#define DIODE_DIRECTION COL2ROW
56 45
diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h
index 990976de2..7c397912f 100644
--- a/keyboards/lets_split/rev2/rev2.h
+++ b/keyboards/lets_split/rev2/rev2.h
@@ -9,10 +9,10 @@
9//void promicro_bootloader_jmp(bool program); 9//void promicro_bootloader_jmp(bool program);
10 10
11#define KEYMAP( \ 11#define KEYMAP( \
12 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ 12 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
13 k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ 13 k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \
14 k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ 14 k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
15 k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ 15 k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \
16 ) \ 16 ) \
17 { \ 17 { \
18 { k00, k01, k02, k03, k04, k05 }, \ 18 { k00, k01, k02, k03, k04, k05 }, \
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index 4d0151710..a1254d975 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -7,22 +7,21 @@
7 7
8extern keymap_config_t keymap_config; 8extern keymap_config_t keymap_config;
9 9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14#define _BASE 0 10#define _BASE 0
15#define _MOVE 1 11#define _MOVE 1
16#define _SYMB 2 12#define _SYMB 2
17#define _MOUSE 3 13#define _MOUSE 3
18#define _FUNC 4 14#define _FUNC 4
15#define CMDLEFT LGUI(KC_LEFT)
16#define CMDRGHT LGUI(KC_RGHT)
17#define ENDASH LALT(KC_MINS)
18#define POUND LALT(KC_3)
19
19 20
20enum planck_keycodes { 21enum planck_keycodes {
21 MOVE = SAFE_RANGE, 22 MOVE = SAFE_RANGE,
22 SYMB, 23 SYMB,
23 FUNC, 24 FUNC
24 BELOW,
25 ABOVE
26}; 25};
27 26
28// Fillers to make layering more clear 27// Fillers to make layering more clear
@@ -55,16 +54,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55 * |------+------+------+------+------+------+------+------+------+------+------+------| 54 * |------+------+------+------+------+------+------+------+------+------+------+------|
56 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 55 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
57 * |------+------+------+------+------+------+------+------+------+------+------+------| 56 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | 57 * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | |
59 * |------+------+------+------+------+------+------+------+------+------+------+------| 58 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | | | | | | Below| | | | | | | 59 * | | | | | | | | | | | | |
61 * `-----------------------------------------------------------------------------------' 60 * `-----------------------------------------------------------------------------------'
62 */ 61 */
63[_MOVE] = { 62[_MOVE] = {
64 {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, 63 {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC },
65 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, 64 {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL },
66 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, 65 {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______},
67 {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} 66 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
68}, 67},
69 68
70/* SYMB 69/* SYMB
@@ -79,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
79 * `-----------------------------------------------------------------------------------' 78 * `-----------------------------------------------------------------------------------'
80 */ 79 */
81[_SYMB] = { 80[_SYMB] = {
82 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, 81 {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH },
83 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, 82 {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND },
84 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, 83 {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______},
85 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} 84 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
86}, 85},
@@ -153,30 +152,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
153 } 152 }
154 return false; 153 return false;
155 break; 154 break;
156 case BELOW:
157 if (record->event.pressed) {
158 register_code(KC_LGUI);
159 register_code(KC_RGHT);
160 unregister_code(KC_RGHT);
161 unregister_code(KC_LGUI);
162 register_code(KC_ENT);
163 unregister_code(KC_ENT);
164 }
165 return false;
166 break;
167 case ABOVE:
168 if (record->event.pressed) {
169 register_code(KC_LGUI);
170 register_code(KC_LEFT);
171 unregister_code(KC_LEFT);
172 unregister_code(KC_LGUI);
173 register_code(KC_ENT);
174 unregister_code(KC_ENT);
175 register_code(KC_UP);
176 unregister_code(KC_UP);
177 }
178 return false;
179 break;
180 } 155 }
181 return true; 156 return true;
182} 157}
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index 0baeba46d..f970cd974 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -2,11 +2,11 @@
2 2
3This is a layout for the grid planck, built with a few ideals in mind: 3This is a layout for the grid planck, built with a few ideals in mind:
4 4
5- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. 5- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key.
6- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. 6- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible.
7- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. 7- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make.
8 8
9We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. 9We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously.
10 10
11``` 11```
12/* BASE 12/* BASE
@@ -27,9 +27,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
27 * |------+------+------+------+------+------+------+------+------+------+------+------| 27 * |------+------+------+------+------+------+------+------+------+------+------+------|
28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | 28 * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del |
29 * |------+------+------+------+------+------+------+------+------+------+------+------| 29 * |------+------+------+------+------+------+------+------+------+------+------+------|
30 * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | 30 * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | |
31 * |------+------+------+------+------+------+------+------+------+------+------+------| 31 * |------+------+------+------+------+------+------+------+------+------+------+------|
32 * | | | | | | Below| | | | | | | 32 * | | | | | | | | | | | | |
33 * `-----------------------------------------------------------------------------------' 33 * `-----------------------------------------------------------------------------------'
34 */ 34 */
35 35
@@ -63,9 +63,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c
63 * |------+------+------+------+------+------+------+------+------+------+------+------| 63 * |------+------+------+------+------+------+------+------+------+------+------+------|
64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | 64 * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- |
65 * |------+------+------+------+------+------+------+------+------+------+------+------| 65 * |------+------+------+------+------+------+------+------+------+------+------+------|
66 * | | F21 | F22 | F23 | F24 | | | Lock | | | | | 66 * | | F21 | F22 | F23 | F24 | | | Power| | | | |
67 * |------+------+------+------+------+------+------+------+------+------+------+------| 67 * |------+------+------+------+------+------+------+------+------+------+------+------|
68 * | | | | | Prev | Mute | Play | Next | | | | | 68 * | | | | | Prev | Mute | Play | Next | | | | |
69 * `-----------------------------------------------------------------------------------' 69 * `-----------------------------------------------------------------------------------'
70 */ 70 */
71``` 71 ```
diff --git a/keyboards/planck/keymaps/cbbrowne/Makefile b/keyboards/planck/keymaps/cbbrowne/Makefile
index b1c70ace7..19e5c2a84 100644
--- a/keyboards/planck/keymaps/cbbrowne/Makefile
+++ b/keyboards/planck/keymaps/cbbrowne/Makefile
@@ -12,11 +12,11 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls 14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = yes # Audio output on port C6 15AUDIO_ENABLE = no # Audio output on port C6
16UNICODE_ENABLE = no # Unicode 16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. 18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19API_SYSEX_ENABLE = yes # Enable SYSEX API (+5390) 19API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
20 20
21# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 21# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
22SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 22SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c
index 2be4dab4b..0448a8d11 100644
--- a/keyboards/planck/keymaps/cbbrowne/keymap.c
+++ b/keyboards/planck/keymaps/cbbrowne/keymap.c
@@ -110,15 +110,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
110}, 110},
111[_RAISE] = { /* RAISE */ 111[_RAISE] = { /* RAISE */
112 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, 112 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
113 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, 113 {_______, KC_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
114 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, 114 {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______},
115 {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} 115 {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP}
116}, 116},
117[_LOWER] = { /* LOWER */ 117[_LOWER] = { /* LOWER */
118 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, 118 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
119 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, 119 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
120 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______}, 120 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______},
121 {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} 121 {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP}
122 }, 122 },
123[_KEYPAD] = { /* Key Pad */ 123[_KEYPAD] = { /* Key Pad */
124 {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, 124 {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC},
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index ddbe4d7b2..1b1b998b2 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -14,13 +14,16 @@ extern keymap_config_t keymap_config;
14// The underscores don't mean anything - you can have a layer called STUFF or any other name. 14// The underscores don't mean anything - you can have a layer called STUFF or any other name.
15// Layer names don't all need to be of the same length, obviously, and you can also skip them 15// Layer names don't all need to be of the same length, obviously, and you can also skip them
16// entirely and just use numbers. 16// entirely and just use numbers.
17#define _QWERTY 0 17
18#define _COLEMAK 1 18enum planck_layers {
19#define _DVORAK 2 19 _QWERTY,
20#define _LOWER 3 20 _COLEMAK,
21#define _RAISE 4 21 _DVORAK,
22#define _PLOVER 5 22 _LOWER,
23#define _ADJUST 16 23 _RAISE,
24 _PLOVER,
25 _ADJUST
26};
24 27
25enum planck_keycodes { 28enum planck_keycodes {
26 QWERTY = SAFE_RANGE, 29 QWERTY = SAFE_RANGE,
diff --git a/keyboards/planck/keymaps/mitch/Makefile b/keyboards/planck/keymaps/mitch/Makefile
new file mode 100644
index 000000000..7955003d4
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/Makefile
@@ -0,0 +1,5 @@
1SUBPROJECT = rev3
2
3ifndef QUANTUM_DIR
4 include ../../../../Makefile
5endif
diff --git a/keyboards/planck/keymaps/mitch/config.h b/keyboards/planck/keymaps/mitch/config.h
new file mode 100644
index 000000000..73bc50bc2
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/config.h
@@ -0,0 +1,2 @@
1#include "../../config.h"
2#define PREVENT_STUCK_MODIFIERS
diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c
new file mode 100644
index 000000000..79b5204f0
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/keymap.c
@@ -0,0 +1,70 @@
1#include "keymap.h"
2#include "quantum.h"
3
4#define QWERTY 0
5#define LOWER 1
6#define RAISE 2
7
8// Alias to make layering more clear
9#define _______ KC_TRNS
10
11// In MacOS, switch between windows within an application
12#define GUI_GRV LGUI(KC_GRV)
13
14const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15
16/* Qwerty
17 * ,-----------------------------------------------------------------------------------.
18 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
19 * |------+------+------+------+------+-------------+------+------+------+------+------|
20 * | Ctl | A | S | D | F | G | H | J | K | L | ; | " |
21 * |------+------+------+------+------+------|------+------+------+------+------+------|
22 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
23 * |------+------+------+------+------+------+------+------+------+------+------+------|
24 * | Esc | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
25 * `-----------------------------------------------------------------------------------'
26 */
27[QWERTY] = {
28 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
29 {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
30 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
31 {KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
32},
33
34/* Lower
35 * ,-----------------------------------------------------------------------------------.
36 * | GUIGR| | | | | | | & | * | ( | ) | Del |
37 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Caps | | Mute | Vol- | Vol+ | | Bksp | $ | % | ^ | | | | |
39 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | | | | | | | | ! | @ | # | \ |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | | | | | | Enter | | | PgUp | PgUn | |
43 * `-----------------------------------------------------------------------------------'
44 */
45[LOWER] = {
46 {GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
47 {KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE},
48 {_______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT},
49 {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______}
50},
51
52/* Raise
53 * ,-----------------------------------------------------------------------------------.
54 * | ` | ` | ~ | ( | ) | | | 7 | 8 | 9 | 0 | |
55 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | | [ | ] | { | } | | | 4 | 5 | 6 | | \ |
57 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * | | - | _ | = | + | | | 1 | 2 | 3 | |Enter |
59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | | | | | | Enter | | | | | |
61 * `-----------------------------------------------------------------------------------'
62 */
63
64[RAISE] = {
65 {KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______},
66 {_______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS},
67 {_______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT},
68 {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______}
69}
70};
diff --git a/keyboards/planck/keymaps/mitch/readme.md b/keyboards/planck/keymaps/mitch/readme.md
new file mode 100644
index 000000000..3869304f4
--- /dev/null
+++ b/keyboards/planck/keymaps/mitch/readme.md
@@ -0,0 +1,26 @@
1## Flashing Keyboard
2
31. Install `dfu` tools:
4
5 brew tap osx-cross/avr
6 brew install avr-libc
7 brew install dfu-programmer
8
92. Move to this directory.
103. Hit the reset button on the keyboard.
114. run `make dfu`.
12
13## The Keymap
14
15This keymap is designed for a rev3 Planck Keyboard.
16
17The default layer is QWERTY. The raise layer has a ten key on the right
18and common programming punctuation on the left. The lower layer provides the
19rest of the symbols, mostly mapped with the ten key numbers.
20
21The normal right shift key uses the `MT` macro to trigger Enter on tap and right
22shift when held.
23
24This keymap sets the `PREVENT_STUCK_MODIFIERS` flag to avoid the occasional WTF
25moments when using a modifier keys and accidentally releasing them after moving
26to a new layer.
diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c
deleted file mode 100644
index e5a86b402..000000000
--- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c
+++ /dev/null
@@ -1,49 +0,0 @@
1#include "keymap.h"
2
3const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4[0] = KEYMAP(
5 TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
6 LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
7 LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN3,
8 ESC, DEL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT),
9[1] = KEYMAP(
10 GRV, GRV, FN22, FN19, FN10, TRNS, TRNS, 7, 8, 9, 0, BSPC,
11 TRNS, LBRC, RBRC, FN23, FN24, TRNS, TRNS, 4, 5, 6, TRNS, BSLS,
12 TRNS, MINS, FN20, EQL, FN21, TRNS, TRNS, 1, 2, 3, TRNS, ENT,
13 TRNS, TRNS, TRNS, TRNS, TRNS, SPC, FN1, TRNS, PGDN, PGUP, TRNS),
14[2] = KEYMAP(
15 FN26, FN10, FN11, FN12, FN13, FN14, FN15, FN17, FN18, FN19, FN10, DEL,
16 TRNS, TRNS, MUTE, VOLD, VOLU, TRNS, BSPC, FN14, FN15, FN16, TRNS, FN25,
17 TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN11, FN12, FN13, TRNS, ENT,
18 TRNS, TRNS, TRNS, TRNS, FN2, ENT, TRNS, TRNS, PGDN, PGUP, TRNS),
19};
20
21const uint16_t PROGMEM fn_actions[] = {
22 [1] = ACTION_LAYER_MOMENTARY(1), // Switch layer raise
23 [2] = ACTION_LAYER_MOMENTARY(2), // Switch layer lower
24
25 [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Right shift serves as Enter on tap
26
27 // Numeric shift modifiers
28 [10] = ACTION_MODS_KEY(MOD_LSFT, KC_0),
29 [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1),
30 [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2),
31 [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3),
32 [14] = ACTION_MODS_KEY(MOD_LSFT, KC_4),
33 [15] = ACTION_MODS_KEY(MOD_LSFT, KC_5),
34 [16] = ACTION_MODS_KEY(MOD_LSFT, KC_6),
35 [17] = ACTION_MODS_KEY(MOD_LSFT, KC_7),
36 [18] = ACTION_MODS_KEY(MOD_LSFT, KC_8),
37 [19] = ACTION_MODS_KEY(MOD_LSFT, KC_9),
38
39 // Other shift modifiers
40 [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // _
41 [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // +
42 [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // ~
43 [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // {
44 [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // }
45 [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // |
46
47 // Switch windows in app
48 [26] = ACTION_MODS_KEY(MOD_LGUI, KC_GRV),
49};
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c
index 78b4997a8..3313af945 100644
--- a/keyboards/preonic/keymaps/default/keymap.c
+++ b/keyboards/preonic/keymaps/default/keymap.c
@@ -9,12 +9,15 @@
9// The underscores don't mean anything - you can have a layer called STUFF or any other name. 9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them 10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers. 11// entirely and just use numbers.
12#define _QWERTY 0 12
13#define _COLEMAK 1 13enum preonic_layers {
14#define _DVORAK 2 14 _QWERTY,
15#define _LOWER 3 15 _COLEMAK,
16#define _RAISE 4 16 _DVORAK,
17#define _ADJUST 16 17 _LOWER,
18 _RAISE,
19 _ADJUST
20};
18 21
19enum preonic_keycodes { 22enum preonic_keycodes {
20 QWERTY = SAFE_RANGE, 23 QWERTY = SAFE_RANGE,
diff --git a/keyboards/preonic/keymaps/smt/Makefile b/keyboards/preonic/keymaps/smt/Makefile
new file mode 100644
index 000000000..3d4659ceb
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c
new file mode 100644
index 000000000..5465d543a
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/keymap.c
@@ -0,0 +1,247 @@
1#include "preonic.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
7
8// Each layer gets a name for readability, which is then used in the keymap matrix below.
9// The underscores don't mean anything - you can have a layer called STUFF or any other name.
10// Layer names don't all need to be of the same length, obviously, and you can also skip them
11// entirely and just use numbers.
12#define _DVORAK 0
13#define _QWERTY 1
14#define _LOWER 2
15#define _RAISE 3
16#define _ADJUST 16
17
18enum preonic_keycodes {
19 DVORAK = SAFE_RANGE,
20 QWERTY,
21 LOWER,
22 RAISE,
23 BACKLIT
24};
25
26// Fillers to make layering more clear
27#define _______ KC_TRNS
28#define XXXXXXX KC_NO
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31
32/* Dvorak
33 * ,-----------------------------------------------------------------------------------.
34 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
35 * |------+------+------+------+------+------+------+------+------+------+------+------|
36 * | Tab | " | , | . | P | Y | F | G | C | R | L | / |
37 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Esc | A | O | E | U | I | D | H | T | N | S | - |
39 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
43 * `-----------------------------------------------------------------------------------'
44 */
45[_DVORAK] = {
46 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
47 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH},
48 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
49 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)},
50 {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
51},
52
53/* Qwerty
54 * ,-----------------------------------------------------------------------------------.
55 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
56 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
58 * |------+------+------+------+------+-------------+------+------+------+------+------|
59 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
60 * |------+------+------+------+------+------|------+------+------+------+------+------|
61 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
62 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
64 * `-----------------------------------------------------------------------------------'
65 */
66[_QWERTY] = {
67 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
68 {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL},
69 {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
70 {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______},
71 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
72},
73
74/* Lower
75 * ,-----------------------------------------------------------------------------------.
76 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
77 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
79 * |------+------+------+------+------+-------------+------+------+------+------+------|
80 * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
81 * |------+------+------+------+------+------|------+------+------+------+------+------|
82 * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
83 * |------+------+------+------+------+------+------+------+------+------+------+------|
84 * | | | | | | | | Next | Vol- | Vol+ | Play |
85 * `-----------------------------------------------------------------------------------'
86 */
87[_LOWER] = {
88 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
89 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
90 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP},
91 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN},
92 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
93},
94
95/* Raise
96 * ,-----------------------------------------------------------------------------------.
97 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
98 * |------+------+------+------+------+-------------+------+------+------+------+------|
99 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
100 * |------+------+------+------+------+-------------+------+------+------+------+------|
101 * | | | | | | | | _ | + | { | } | | |
102 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | | | | | | | - | = | [ | ] | \ |
104 * |------+------+------+------+------+------+------+------+------+------+------+------|
105 * | | | | | | | | Next | Vol- | Vol+ | Play |
106 * `-----------------------------------------------------------------------------------'
107 */
108[_RAISE] = {
109 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
110 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
111 {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
112 {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
113 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
114},
115
116/* Adjust (Lower + Raise)
117 * ,-----------------------------------------------------------------------------------.
118 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
119 * |------+------+------+------+------+------+------+------+------+------+------+------|
120 * | | Reset| | | | | | | | | | Del |
121 * |------+------+------+------+------+-------------+------+------+------+------+------|
122 * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | |
123 * |------+------+------+------+------+------|------+------+------+------+------+------|
124 * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
125 * |------+------+------+------+------+------+------+------+------+------+------+------|
126 * | | | | | | | | | | | |
127 * `-----------------------------------------------------------------------------------'
128 */
129[_ADJUST] = {
130 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
131 {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
132 {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______},
133 {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
134 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
135}
136
137
138};
139
140#ifdef AUDIO_ENABLE
141float tone_startup[][2] = {
142 {NOTE_B5, 20},
143 {NOTE_B6, 8},
144 {NOTE_DS6, 20},
145 {NOTE_B6, 8}
146};
147
148float tone_dvorak[][2] = SONG(DVORAK_SOUND);
149float tone_qwerty[][2] = SONG(QWERTY_SOUND);
150
151float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
152
153float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
154#endif
155
156void persistant_default_layer_set(uint16_t default_layer) {
157 eeconfig_update_default_layer(default_layer);
158 default_layer_set(default_layer);
159}
160
161bool process_record_user(uint16_t keycode, keyrecord_t *record) {
162 switch (keycode) {
163 case DVORAK:
164 if (record->event.pressed) {
165 #ifdef AUDIO_ENABLE
166 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
167 #endif
168 persistant_default_layer_set(1UL<<_DVORAK);
169 }
170 return false;
171 break;
172 case QWERTY:
173 if (record->event.pressed) {
174 #ifdef AUDIO_ENABLE
175 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
176 #endif
177 persistant_default_layer_set(1UL<<_QWERTY);
178 }
179 return false;
180 break;
181 case LOWER:
182 if (record->event.pressed) {
183 layer_on(_LOWER);
184 update_tri_layer(_LOWER, _RAISE, _ADJUST);
185 } else {
186 layer_off(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 }
189 return false;
190 break;
191 case RAISE:
192 if (record->event.pressed) {
193 layer_on(_RAISE);
194 update_tri_layer(_LOWER, _RAISE, _ADJUST);
195 } else {
196 layer_off(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 }
199 return false;
200 break;
201 case BACKLIT:
202 if (record->event.pressed) {
203 register_code(KC_RSFT);
204 #ifdef BACKLIGHT_ENABLE
205 backlight_step();
206 #endif
207 } else {
208 unregister_code(KC_RSFT);
209 }
210 return false;
211 break;
212 }
213 return true;
214};
215
216void matrix_init_user(void) {
217 #ifdef AUDIO_ENABLE
218 startup_user();
219 #endif
220}
221
222#ifdef AUDIO_ENABLE
223
224void startup_user()
225{
226 _delay_ms(20); // gets rid of tick
227 PLAY_NOTE_ARRAY(tone_startup, false, 0);
228}
229
230void shutdown_user()
231{
232 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
233 _delay_ms(150);
234 stop_all_notes();
235}
236
237void music_on_user(void)
238{
239 music_scale_user();
240}
241
242void music_scale_user(void)
243{
244 PLAY_NOTE_ARRAY(music_scale, false, 0);
245}
246
247#endif
diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md
new file mode 100644
index 000000000..b2052b37c
--- /dev/null
+++ b/keyboards/preonic/keymaps/smt/readme.md
@@ -0,0 +1,85 @@
1# smt's Preonic keymap
2
3This keymap is primarily based on the default Preonic keymap, which in turn is derived from Planck's default.
4
5Notable differences from the default are:
6
71. **Dvorak by default**
8
9 I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever.
10
112. **Right Shift**
12
13 I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory.
14
15 Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome!
16
17## Dvorak (default)
18
19```
20,-----------------------------------------------------------------------------------.
21| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
22|------+------+------+------+------+------+------+------+------+------+------+------|
23| Tab | " | , | . | P | Y | F | G | C | R | L | / |
24|------+------+------+------+------+-------------+------+------+------+------+------|
25| Esc | A | O | E | U | I | D | H | T | N | S | - |
26|------+------+------+------+------+------|------+------+------+------+------+------|
27| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
28|------+------+------+------+------+------+------+------+------+------+------+------|
29| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
30`-----------------------------------------------------------------------------------'
31```
32
33## Qwerty (same as default)
34
35```
36,-----------------------------------------------------------------------------------.
37| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
38|------+------+------+------+------+------+------+------+------+------+------+------|
39| Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
40|------+------+------+------+------+-------------+------+------+------+------+------|
41| Esc | A | S | D | F | G | H | J | K | L | ; | " |
42|------+------+------+------+------+------|------+------+------+------+------+------|
43| Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
44|------+------+------+------+------+------+------+------+------+------+------+------|
45| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
46`-----------------------------------------------------------------------------------'
47```
48
49## Lower
50
51This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility.
52
53```
54,-----------------------------------------------------------------------------------.
55| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
56|------+------+------+------+------+------+------+------+------+------+------+------|
57| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
58|------+------+------+------+------+-------------+------+------+------+------+------|
59| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp|
60|------+------+------+------+------+------|------+------+------+------+------+------|
61| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn|
62|------+------+------+------+------+------+------+------+------+------+------+------|
63| | | | | | | | Next | Vol- | Vol+ | Play |
64`-----------------------------------------------------------------------------------'
65```
66
67## Raise
68
69As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot.
70
71I haven't completely filled this layer, which leaves room for future mappings and macros.
72
73```
74,-----------------------------------------------------------------------------------.
75| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
76|------+------+------+------+------+-------------+------+------+------+------+------|
77| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
78|------+------+------+------+------+-------------+------+------+------+------+------|
79| | | | | | | | _ | + | { | } | | |
80|------+------+------+------+------+------|------+------+------+------+------+------|
81| | | | | | | | - | = | [ | ] | \ |
82|------+------+------+------+------+------+------+------+------+------+------+------|
83| | | | | | | | Next | Vol- | Vol+ | Play |
84`-----------------------------------------------------------------------------------'
85```
diff --git a/keyboards/ps2avrGB/Makefile b/keyboards/ps2avrGB/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/ps2avrGB/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md
new file mode 100644
index 000000000..f8360aec0
--- /dev/null
+++ b/keyboards/ps2avrGB/README.md
@@ -0,0 +1,61 @@
1ps2avrGB keyboard firmware
2==========================
3
4This is a port of the QMK firmware for boards that are based on the
5ps2avrGB firmware, like the [ps2avrGB
6keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold
7by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/).
8
9Note that this is a complete replacement for the firmware, so you won't be
10using Bootmapper Client to change any keyboard settings, since not all the
11USB report options are supported.
12
13## Supported Boards
14
15Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been
16tested so far (since it's the only one I own). But other boards that use
17the ps2avrGB firmware should work as well.
18
19## Installing
20
21First, install the requirements. These commands are for OSX, but all you
22need is the AVR toolchain and `bootloadHID` for flashing:
23
24```
25$ brew cask install crosspack-avr
26$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
27```
28
29In order to use the `./program` script, which can reboot the board into
30the bootloader, you'll need Python 2 with PyUSB installed:
31
32```
33$ pip install pyusb
34```
35
36Then, with the keyboard plugged in, simply run this command from the
37`qmk_firmware` directory:
38
39```
40$ make ps2avrGB-program
41```
42
43If you prefer, you can just build it and flash the firmware directly with
44`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
45in the bootloader:
46
47```
48$ make ps2avrGB
49$ bootloadHID -r ps2avrGB_default.hex
50```
51
52## Troubleshooting
53
54From my experience, it's really hard to brick these boards. But these
55tricks have been useful when it got stuck in a weird scenario.
56
571. Try plugging the board in while pressing `L_Ctrl`. This will force it
58 to boot only the bootloader without loading the firmware. Once this is
59 done, just reflash the board with the original firmware.
602. Sometimes USB hubs can act weird, so try connecting the board directly
61 to your computer or plugging/unplugging the USB hub.
diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h
new file mode 100644
index 000000000..b5c696f3f
--- /dev/null
+++ b/keyboards/ps2avrGB/config.h
@@ -0,0 +1,38 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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 CONFIG_H
19#define CONFIG_H
20
21#define VENDOR_ID 0x20A0
22#define PRODUCT_ID 0x422D
23// TODO: share these strings with usbconfig.h
24// Edit usbconfig.h to change these.
25#define MANUFACTURER winkeyless.kr
26#define PRODUCT ps2avrGB
27
28/* matrix size */
29#define MATRIX_ROWS 8
30#define MATRIX_COLS 15
31
32#define NO_UART 1
33#define BOOTLOADHID_BOOTLOADER 1
34
35/* key combination for command */
36#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
37
38#endif
diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c
new file mode 100644
index 000000000..5c66cde59
--- /dev/null
+++ b/keyboards/ps2avrGB/keymaps/default/keymap.c
@@ -0,0 +1,32 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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 "ps2avrGB.h"
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 KEYMAP( \
22 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,HOME,END, \
23 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \
24 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, INS, \
25 CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\
26 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\
27 LCTL,LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \
28 ),
29};
30
31const uint16_t PROGMEM fn_actions[] = {
32};
diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c
new file mode 100644
index 000000000..beaa54c40
--- /dev/null
+++ b/keyboards/ps2avrGB/matrix.c
@@ -0,0 +1,104 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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 <avr/io.h>
19#include <util/delay.h>
20
21#include "matrix.h"
22
23#ifndef DEBOUNCE
24# define DEBOUNCE 5
25#endif
26
27static uint8_t debouncing = DEBOUNCE;
28
29static matrix_row_t matrix[MATRIX_ROWS];
30static matrix_row_t matrix_debouncing[MATRIX_ROWS];
31
32void matrix_init(void) {
33 // all outputs for rows high
34 DDRB = 0xFF;
35 PORTB = 0xFF;
36 // all inputs for columns
37 DDRA = 0x00;
38 DDRC &= ~(0x111111<<2);
39 DDRD &= ~(1<<PIND7);
40 // all columns are pulled-up
41 PORTA = 0xFF;
42 PORTC |= (0b111111<<2);
43 PORTD |= (1<<PIND7);
44
45 // initialize matrix state: all keys off
46 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
47 matrix[row] = 0x00;
48 matrix_debouncing[row] = 0x00;
49 }
50}
51
52void matrix_set_row_status(uint8_t row) {
53 DDRB = (1 << row);
54 PORTB = ~(1 << row);
55}
56
57uint8_t bit_reverse(uint8_t x) {
58 x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
59 x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
60 x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
61 return x;
62}
63
64uint8_t matrix_scan(void) {
65 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
66 matrix_set_row_status(row);
67 _delay_us(5);
68
69 matrix_row_t cols = (
70 // cols 0..7, PORTA 0 -> 7
71 (~PINA) & 0xFF
72 ) | (
73 // cols 8..13, PORTC 7 -> 0
74 bit_reverse((~PINC) & 0xFF) << 8
75 ) | (
76 // col 14, PORTD 7
77 ((~PIND) & (1 << PIND7)) << 7
78 );
79
80 if (matrix_debouncing[row] != cols) {
81 matrix_debouncing[row] = cols;
82 debouncing = DEBOUNCE;
83 }
84 }
85
86 if (debouncing) {
87 if (--debouncing) {
88 _delay_ms(1);
89 } else {
90 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
91 matrix[i] = matrix_debouncing[i];
92 }
93 }
94 }
95
96 return 1;
97}
98
99inline matrix_row_t matrix_get_row(uint8_t row) {
100 return matrix[row];
101}
102
103void matrix_print(void) {
104}
diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program
new file mode 100755
index 000000000..a88d9cd9b
--- /dev/null
+++ b/keyboards/ps2avrGB/program
@@ -0,0 +1,74 @@
1#!/usr/bin/env python
2# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17from __future__ import print_function
18
19import os
20import sys
21import time
22import usb
23
24if len(sys.argv) < 2:
25 print('Usage: %s <firmware.hex>' % sys.argv[0])
26 sys.exit(1)
27
28print('Searching for ps2avrGB... ', end='')
29
30dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
31if dev is None:
32 raise ValueError('Device not found')
33
34print('Found', end='\n\n')
35
36print('Device Information:')
37print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
38print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
39print('Manufacturer: %s' % (dev.iManufacturer))
40print('Serial: %s' % (dev.iSerialNumber))
41print('Product: %s' % (dev.iProduct), end='\n\n')
42
43print('Transferring control to bootloader... ', end='')
44
45dev.set_configuration()
46
47request_type = usb.util.build_request_type(
48 usb.util.CTRL_OUT,
49 usb.util.CTRL_TYPE_CLASS,
50 usb.util.CTRL_RECIPIENT_DEVICE)
51
52USBRQ_HID_SET_REPORT = 0x09
53HID_REPORT_OPTION = 0x0301
54
55
56try:
57 dev.ctrl_transfer(
58 request_type,
59 USBRQ_HID_SET_REPORT,
60 HID_REPORT_OPTION,
61 0,
62 [0, 0, 0xFF] + [0] * 5
63 )
64except usb.core.USBError:
65 # for some reason I keep getting USBError, but it works!
66 pass
67
68# wait a bit until bootloader starts up
69time.sleep(2)
70
71print('OK')
72print('Programming...')
73if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
74 print('\nDone!')
diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/ps2avrGB/ps2avrGB.c
diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h
new file mode 100644
index 000000000..6432e3be9
--- /dev/null
+++ b/keyboards/ps2avrGB/ps2avrGB.h
@@ -0,0 +1,43 @@
1/*
2Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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 KEYMAP_COMMON_H
19#define KEYMAP_COMMON_H
20
21#include "keycode.h"
22#include "action.h"
23
24#define KEYMAP( \
25 K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
26 K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
27 K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
28 K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
29 K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
30 K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
31) \
32{ \
33 { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \
34 { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \
35 { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \
36 { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \
37 { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \
38 { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \
39 { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \
40 { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \
41}
42
43#endif
diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk
new file mode 100644
index 000000000..e2b5922ea
--- /dev/null
+++ b/keyboards/ps2avrGB/rules.mk
@@ -0,0 +1,43 @@
1# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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# MCU name
17MCU = atmega32a
18PROTOCOL = VUSB
19
20# unsupported features for now
21NO_UART = yes
22NO_SUSPEND_POWER_DOWN = yes
23BACKLIGHT_ENABLE = no
24
25# processor frequency
26F_CPU = 12000000
27
28# build options
29BOOTMAGIC_ENABLE = yes
30MOUSEKEY_ENABLE = yes
31EXTRAKEY_ENABLE = yes
32CONSOLE_ENABLE = yes
33COMMAND_ENABLE = yes
34
35OPT_DEFS = -DDEBUG_LEVEL=0
36OPT_DEFS += -DBOOTLOADER_SIZE=2048
37
38# custom matrix setup
39CUSTOM_MATRIX = yes
40SRC = matrix.c
41
42# programming options
43PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/ps2avrGB/usbconfig.h
new file mode 100644
index 000000000..d2d848fcd
--- /dev/null
+++ b/keyboards/ps2avrGB/usbconfig.h
@@ -0,0 +1,396 @@
1/* Name: usbconfig.h
2 * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
3 * Author: Christian Starkjohann
4 * Creation Date: 2005-04-01
5 * Tabsize: 4
6 * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
7 * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
8 * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
9 */
10
11#ifndef __usbconfig_h_included__
12#define __usbconfig_h_included__
13
14#include "config.h"
15
16/*
17General Description:
18This file is an example configuration (with inline documentation) for the USB
19driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
20also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
21wire the lines to any other port, as long as D+ is also wired to INT0 (or any
22other hardware interrupt, as long as it is the highest level interrupt, see
23section at the end of this file).
24*/
25
26/* ---------------------------- Hardware Config ---------------------------- */
27
28#define USB_CFG_IOPORTNAME D
29/* This is the port where the USB bus is connected. When you configure it to
30 * "B", the registers PORTB, PINB and DDRB will be used.
31 */
32#define USB_CFG_DMINUS_BIT 3
33/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
34 * This may be any bit in the port.
35 */
36#define USB_CFG_DPLUS_BIT 2
37/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
38 * This may be any bit in the port. Please note that D+ must also be connected
39 * to interrupt pin INT0! [You can also use other interrupts, see section
40 * "Optional MCU Description" below, or you can connect D- to the interrupt, as
41 * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
42 * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
43 * markers every millisecond.]
44 */
45#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
46/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
47 * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
48 * require no crystal, they tolerate +/- 1% deviation from the nominal
49 * frequency. All other rates require a precision of 2000 ppm and thus a
50 * crystal!
51 * Since F_CPU should be defined to your actual clock rate anyway, you should
52 * not need to modify this setting.
53 */
54#define USB_CFG_CHECK_CRC 0
55/* Define this to 1 if you want that the driver checks integrity of incoming
56 * data packets (CRC checks). CRC checks cost quite a bit of code size and are
57 * currently only available for 18 MHz crystal clock. You must choose
58 * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
59 */
60
61/* ----------------------- Optional Hardware Config ------------------------ */
62
63/* #define USB_CFG_PULLUP_IOPORTNAME D */
64/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
65 * V+, you can connect and disconnect the device from firmware by calling
66 * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
67 * This constant defines the port on which the pullup resistor is connected.
68 */
69/* #define USB_CFG_PULLUP_BIT 4 */
70/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
71 * above) where the 1.5k pullup resistor is connected. See description
72 * above for details.
73 */
74
75/* --------------------------- Functional Range ---------------------------- */
76
77#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
78/* Define this to 1 if you want to compile a version with two endpoints: The
79 * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
80 * number).
81 */
82#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
83/* Define this to 1 if you want to compile a version with three endpoints: The
84 * default control endpoint 0, an interrupt-in endpoint 3 (or the number
85 * configured below) and a catch-all default interrupt-in endpoint as above.
86 * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
87 */
88#define USB_CFG_EP3_NUMBER 3
89/* If the so-called endpoint 3 is used, it can now be configured to any other
90 * endpoint number (except 0) with this macro. Default if undefined is 3.
91 */
92/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
93/* The above macro defines the startup condition for data toggling on the
94 * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
95 * Since the token is toggled BEFORE sending any data, the first packet is
96 * sent with the oposite value of this configuration!
97 */
98#define USB_CFG_IMPLEMENT_HALT 0
99/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
100 * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
101 * it is required by the standard. We have made it a config option because it
102 * bloats the code considerably.
103 */
104#define USB_CFG_SUPPRESS_INTR_CODE 0
105/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
106 * want to send any data over them. If this macro is defined to 1, functions
107 * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
108 * you need the interrupt-in endpoints in order to comply to an interface
109 * (e.g. HID), but never want to send any data. This option saves a couple
110 * of bytes in flash memory and the transmit buffers in RAM.
111 */
112#define USB_CFG_INTR_POLL_INTERVAL 1
113/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
114 * interval. The value is in milliseconds and must not be less than 10 ms for
115 * low speed devices.
116 */
117#define USB_CFG_IS_SELF_POWERED 0
118/* Define this to 1 if the device has its own power supply. Set it to 0 if the
119 * device is powered from the USB bus.
120 */
121#define USB_CFG_MAX_BUS_POWER 500
122/* Set this variable to the maximum USB bus power consumption of your device.
123 * The value is in milliamperes. [It will be divided by two since USB
124 * communicates power requirements in units of 2 mA.]
125 */
126#define USB_CFG_IMPLEMENT_FN_WRITE 1
127/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
128 * transfers. Set it to 0 if you don't need it and want to save a couple of
129 * bytes.
130 */
131#define USB_CFG_IMPLEMENT_FN_READ 0
132/* Set this to 1 if you need to send control replies which are generated
133 * "on the fly" when usbFunctionRead() is called. If you only want to send
134 * data from a static buffer, set it to 0 and return the data from
135 * usbFunctionSetup(). This saves a couple of bytes.
136 */
137#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
138/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
139 * You must implement the function usbFunctionWriteOut() which receives all
140 * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
141 * can be found in 'usbRxToken'.
142 */
143#define USB_CFG_HAVE_FLOWCONTROL 0
144/* Define this to 1 if you want flowcontrol over USB data. See the definition
145 * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
146 * usbdrv.h.
147 */
148#define USB_CFG_DRIVER_FLASH_PAGE 0
149/* If the device has more than 64 kBytes of flash, define this to the 64 k page
150 * where the driver's constants (descriptors) are located. Or in other words:
151 * Define this to 1 for boot loaders on the ATMega128.
152 */
153#define USB_CFG_LONG_TRANSFERS 0
154/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
155 * in a single control-in or control-out transfer. Note that the capability
156 * for long transfers increases the driver size.
157 */
158/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
159/* This macro is a hook if you want to do unconventional things. If it is
160 * defined, it's inserted at the beginning of received message processing.
161 * If you eat the received message and don't want default processing to
162 * proceed, do a return after doing your things. One possible application
163 * (besides debugging) is to flash a status LED on each packet.
164 */
165/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
166/* This macro is a hook if you need to know when an USB RESET occurs. It has
167 * one parameter which distinguishes between the start of RESET state and its
168 * end.
169 */
170/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
171/* This macro (if defined) is executed when a USB SET_ADDRESS request was
172 * received.
173 */
174#define USB_COUNT_SOF 1
175/* define this macro to 1 if you need the global variable "usbSofCount" which
176 * counts SOF packets. This feature requires that the hardware interrupt is
177 * connected to D- instead of D+.
178 */
179/* #ifdef __ASSEMBLER__
180 * macro myAssemblerMacro
181 * in YL, TCNT0
182 * sts timer0Snapshot, YL
183 * endm
184 * #endif
185 * #define USB_SOF_HOOK myAssemblerMacro
186 * This macro (if defined) is executed in the assembler module when a
187 * Start Of Frame condition is detected. It is recommended to define it to
188 * the name of an assembler macro which is defined here as well so that more
189 * than one assembler instruction can be used. The macro may use the register
190 * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
191 * immediately after an SOF pulse may be lost and must be retried by the host.
192 * What can you do with this hook? Since the SOF signal occurs exactly every
193 * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
194 * designs running on the internal RC oscillator.
195 * Please note that Start Of Frame detection works only if D- is wired to the
196 * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
197 */
198#define USB_CFG_CHECK_DATA_TOGGLING 0
199/* define this macro to 1 if you want to filter out duplicate data packets
200 * sent by the host. Duplicates occur only as a consequence of communication
201 * errors, when the host does not receive an ACK. Please note that you need to
202 * implement the filtering yourself in usbFunctionWriteOut() and
203 * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
204 * for each control- and out-endpoint to check for duplicate packets.
205 */
206#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
207/* define this macro to 1 if you want the function usbMeasureFrameLength()
208 * compiled in. This function can be used to calibrate the AVR's RC oscillator.
209 */
210#define USB_USE_FAST_CRC 0
211/* The assembler module has two implementations for the CRC algorithm. One is
212 * faster, the other is smaller. This CRC routine is only used for transmitted
213 * messages where timing is not critical. The faster routine needs 31 cycles
214 * per byte while the smaller one needs 61 to 69 cycles. The faster routine
215 * may be worth the 32 bytes bigger code size if you transmit lots of data and
216 * run the AVR close to its limit.
217 */
218
219/* -------------------------- Device Description --------------------------- */
220
221#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
222/* USB vendor ID for the device, low byte first. If you have registered your
223 * own Vendor ID, define it here. Otherwise you may use one of obdev's free
224 * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
225 * *** IMPORTANT NOTE ***
226 * This template uses obdev's shared VID/PID pair for Vendor Class devices
227 * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
228 * the implications!
229 */
230#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
231/* This is the ID of the product, low byte first. It is interpreted in the
232 * scope of the vendor ID. If you have registered your own VID with usb.org
233 * or if you have licensed a PID from somebody else, define it here. Otherwise
234 * you may use one of obdev's free shared VID/PID pairs. See the file
235 * USB-IDs-for-free.txt for details!
236 * *** IMPORTANT NOTE ***
237 * This template uses obdev's shared VID/PID pair for Vendor Class devices
238 * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
239 * the implications!
240 */
241#define USB_CFG_DEVICE_VERSION 0x00, 0x02
242/* Version number of the device: Minor number first, then major number.
243 */
244#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
245#define USB_CFG_VENDOR_NAME_LEN 13
246/* These two values define the vendor name returned by the USB device. The name
247 * must be given as a list of characters under single quotes. The characters
248 * are interpreted as Unicode (UTF-16) entities.
249 * If you don't want a vendor name string, undefine these macros.
250 * ALWAYS define a vendor name containing your Internet domain name if you use
251 * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
252 * details.
253 */
254#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
255#define USB_CFG_DEVICE_NAME_LEN 8
256/* Same as above for the device name. If you don't want a device name, undefine
257 * the macros. See the file USB-IDs-for-free.txt before you assign a name if
258 * you use a shared VID/PID.
259 */
260/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
261/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
262/* Same as above for the serial number. If you don't want a serial number,
263 * undefine the macros.
264 * It may be useful to provide the serial number through other means than at
265 * compile time. See the section about descriptor properties below for how
266 * to fine tune control over USB descriptors such as the string descriptor
267 * for the serial number.
268 */
269#define USB_CFG_DEVICE_CLASS 0
270#define USB_CFG_DEVICE_SUBCLASS 0
271/* See USB specification if you want to conform to an existing device class.
272 * Class 0xff is "vendor specific".
273 */
274#define USB_CFG_INTERFACE_CLASS 3 /* HID */
275#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
276#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
277/* See USB specification if you want to conform to an existing device class or
278 * protocol. The following classes must be set at interface level:
279 * HID class is 3, no subclass and protocol required (but may be useful!)
280 * CDC class is 2, use subclass 2 and protocol 1 for ACM
281 */
282#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
283/* Define this to the length of the HID report descriptor, if you implement
284 * an HID device. Otherwise don't define it or define it to 0.
285 * If you use this define, you must add a PROGMEM character array named
286 * "usbHidReportDescriptor" to your code which contains the report descriptor.
287 * Don't forget to keep the array and this define in sync!
288 */
289
290/* #define USB_PUBLIC static */
291/* Use the define above if you #include usbdrv.c instead of linking against it.
292 * This technique saves a couple of bytes in flash memory.
293 */
294
295/* ------------------- Fine Control over USB Descriptors ------------------- */
296/* If you don't want to use the driver's default USB descriptors, you can
297 * provide our own. These can be provided as (1) fixed length static data in
298 * flash memory, (2) fixed length static data in RAM or (3) dynamically at
299 * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
300 * information about this function.
301 * Descriptor handling is configured through the descriptor's properties. If
302 * no properties are defined or if they are 0, the default descriptor is used.
303 * Possible properties are:
304 * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
305 * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
306 * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
307 * you want RAM pointers.
308 * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
309 * in static memory is in RAM, not in flash memory.
310 * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
311 * the driver must know the descriptor's length. The descriptor itself is
312 * found at the address of a well known identifier (see below).
313 * List of static descriptor names (must be declared PROGMEM if in flash):
314 * char usbDescriptorDevice[];
315 * char usbDescriptorConfiguration[];
316 * char usbDescriptorHidReport[];
317 * char usbDescriptorString0[];
318 * int usbDescriptorStringVendor[];
319 * int usbDescriptorStringDevice[];
320 * int usbDescriptorStringSerialNumber[];
321 * Other descriptors can't be provided statically, they must be provided
322 * dynamically at runtime.
323 *
324 * Descriptor properties are or-ed or added together, e.g.:
325 * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
326 *
327 * The following descriptors are defined:
328 * USB_CFG_DESCR_PROPS_DEVICE
329 * USB_CFG_DESCR_PROPS_CONFIGURATION
330 * USB_CFG_DESCR_PROPS_STRINGS
331 * USB_CFG_DESCR_PROPS_STRING_0
332 * USB_CFG_DESCR_PROPS_STRING_VENDOR
333 * USB_CFG_DESCR_PROPS_STRING_PRODUCT
334 * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
335 * USB_CFG_DESCR_PROPS_HID
336 * USB_CFG_DESCR_PROPS_HID_REPORT
337 * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
338 *
339 * Note about string descriptors: String descriptors are not just strings, they
340 * are Unicode strings prefixed with a 2 byte header. Example:
341 * int serialNumberDescriptor[] = {
342 * USB_STRING_DESCRIPTOR_HEADER(6),
343 * 'S', 'e', 'r', 'i', 'a', 'l'
344 * };
345 */
346
347#define USB_CFG_DESCR_PROPS_DEVICE 0
348#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
349//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
350#define USB_CFG_DESCR_PROPS_STRINGS 0
351#define USB_CFG_DESCR_PROPS_STRING_0 0
352#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
353#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
354#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
355#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
356//#define USB_CFG_DESCR_PROPS_HID 0
357#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
358//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
359#define USB_CFG_DESCR_PROPS_UNKNOWN 0
360
361#define usbMsgPtr_t unsigned short
362/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
363 * a scalar type here because gcc generates slightly shorter code for scalar
364 * arithmetics than for pointer arithmetics. Remove this define for backward
365 * type compatibility or define it to an 8 bit type if you use data in RAM only
366 * and all RAM is below 256 bytes (tiny memory model in IAR CC).
367 */
368
369/* ----------------------- Optional MCU Description ------------------------ */
370
371/* The following configurations have working defaults in usbdrv.h. You
372 * usually don't need to set them explicitly. Only if you want to run
373 * the driver on a device which is not yet supported or with a compiler
374 * which is not fully supported (such as IAR C) or if you use a differnt
375 * interrupt than INT0, you may have to define some of these.
376 */
377/* #define USB_INTR_CFG MCUCR */
378/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
379/* #define USB_INTR_CFG_CLR 0 */
380/* #define USB_INTR_ENABLE GIMSK */
381/* #define USB_INTR_ENABLE_BIT INT0 */
382/* #define USB_INTR_PENDING GIFR */
383/* #define USB_INTR_PENDING_BIT INTF0 */
384/* #define USB_INTR_VECTOR INT0_vect */
385
386/* Set INT1 for D- falling edge to count SOF */
387/* #define USB_INTR_CFG EICRA */
388#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
389/* #define USB_INTR_CFG_CLR 0 */
390/* #define USB_INTR_ENABLE EIMSK */
391#define USB_INTR_ENABLE_BIT INT1
392/* #define USB_INTR_PENDING EIFR */
393#define USB_INTR_PENDING_BIT INTF1
394#define USB_INTR_VECTOR INT1_vect
395
396#endif /* __usbconfig_h_included__ */
diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c
index ca68bef6c..1e2648bff 100644
--- a/quantum/process_keycode/process_music.c
+++ b/quantum/process_keycode/process_music.c
@@ -114,6 +114,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
114 music_sequence_interval+=10; 114 music_sequence_interval+=10;
115 return false; 115 return false;
116 } 116 }
117 #define MUSIC_MODE_GUITAR
117 118
118 #ifdef MUSIC_MODE_CHROMATIC 119 #ifdef MUSIC_MODE_CHROMATIC
119 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row)); 120 float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + record->event.key.col + music_offset)/12.0+(MATRIX_ROWS - record->event.key.row));
diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c
index 54f6faaa4..5826d909e 100644
--- a/quantum/visualizer/visualizer.c
+++ b/quantum/visualizer/visualizer.c
@@ -53,10 +53,13 @@ SOFTWARE.
53#define "Visualizer thread priority not defined" 53#define "Visualizer thread priority not defined"
54#endif 54#endif
55 55
56// mods status
57#include "action_util.h"
56 58
57static visualizer_keyboard_status_t current_status = { 59static visualizer_keyboard_status_t current_status = {
58 .layer = 0xFFFFFFFF, 60 .layer = 0xFFFFFFFF,
59 .default_layer = 0xFFFFFFFF, 61 .default_layer = 0xFFFFFFFF,
62 .mods = 0xFF,
60 .leds = 0xFFFFFFFF, 63 .leds = 0xFFFFFFFF,
61 .suspended = false, 64 .suspended = false,
62}; 65};
@@ -64,6 +67,7 @@ static visualizer_keyboard_status_t current_status = {
64static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) { 67static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) {
65 return status1->layer == status2->layer && 68 return status1->layer == status2->layer &&
66 status1->default_layer == status2->default_layer && 69 status1->default_layer == status2->default_layer &&
70 status1->mods == status2->mods &&
67 status1->leds == status2->leds && 71 status1->leds == status2->leds &&
68 status1->suspended == status2->suspended; 72 status1->suspended == status2->suspended;
69} 73}
@@ -307,6 +311,45 @@ bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_s
307 gdispFlush(); 311 gdispFlush();
308 return false; 312 return false;
309} 313}
314
315static void format_mods_bitmap_string(uint8_t mods, char* buffer) {
316 *buffer = ' ';
317 ++buffer;
318
319 for (int i = 0; i<8; i++)
320 {
321 uint32_t mask = (1u << i);
322 if (mods & mask) {
323 *buffer = '1';
324 } else {
325 *buffer = '0';
326 }
327 ++buffer;
328
329 if (i==3) {
330 *buffer = ' ';
331 ++buffer;
332 }
333 }
334 *buffer = 0;
335}
336
337bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) {
338 (void)animation;
339
340 const char* title = "Modifier states";
341 const char* mods_header = " CSAG CSAG ";
342 char status_buffer[12];
343
344 gdispClear(White);
345 gdispDrawString(0, 0, title, state->font_fixed5x8, Black);
346 gdispDrawString(0, 10, mods_header, state->font_fixed5x8, Black);
347 format_mods_bitmap_string(state->status.mods, status_buffer);
348 gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black);
349
350 gdispFlush();
351 return false;
352}
310#endif // LCD_ENABLE 353#endif // LCD_ENABLE
311 354
312bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state) { 355bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state) {
@@ -350,6 +393,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
350 visualizer_keyboard_status_t initial_status = { 393 visualizer_keyboard_status_t initial_status = {
351 .default_layer = 0xFFFFFFFF, 394 .default_layer = 0xFFFFFFFF,
352 .layer = 0xFFFFFFFF, 395 .layer = 0xFFFFFFFF,
396 .mods = 0xFF,
353 .leds = 0xFFFFFFFF, 397 .leds = 0xFFFFFFFF,
354 .suspended = false, 398 .suspended = false,
355 }; 399 };
@@ -499,7 +543,18 @@ void update_status(bool changed) {
499#endif 543#endif
500} 544}
501 545
502void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) { 546uint8_t visualizer_get_mods() {
547 uint8_t mods = get_mods();
548
549#ifndef NO_ACTION_ONESHOT
550 if (!has_oneshot_mods_timed_out()) {
551 mods |= get_oneshot_mods();
552 }
553#endif
554 return mods;
555}
556
557void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds) {
503 // Note that there's a small race condition here, the thread could read 558 // Note that there's a small race condition here, the thread could read
504 // a state where one of these are set but not the other. But this should 559 // a state where one of these are set but not the other. But this should
505 // not really matter as it will be fixed during the next loop step. 560 // not really matter as it will be fixed during the next loop step.
@@ -523,6 +578,7 @@ void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds) {
523 visualizer_keyboard_status_t new_status = { 578 visualizer_keyboard_status_t new_status = {
524 .layer = state, 579 .layer = state,
525 .default_layer = default_state, 580 .default_layer = default_state,
581 .mods = mods,
526 .leds = leds, 582 .leds = leds,
527 .suspended = current_status.suspended, 583 .suspended = current_status.suspended,
528 }; 584 };
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h
index 53e250725..315af5022 100644
--- a/quantum/visualizer/visualizer.h
+++ b/quantum/visualizer/visualizer.h
@@ -34,10 +34,14 @@ SOFTWARE.
34#include "lcd_backlight.h" 34#include "lcd_backlight.h"
35#endif 35#endif
36 36
37// use this function to merget both real_mods and oneshot_mods in a uint16_t
38uint8_t visualizer_get_mods(void);
39
37// This need to be called once at the start 40// This need to be called once at the start
38void visualizer_init(void); 41void visualizer_init(void);
39// This should be called at every matrix scan 42// This should be called at every matrix scan
40void visualizer_update(uint32_t default_state, uint32_t state, uint32_t leds); 43void visualizer_update(uint32_t default_state, uint32_t state, uint8_t mods, uint32_t leds);
44
41// This should be called when the keyboard goes to suspend state 45// This should be called when the keyboard goes to suspend state
42void visualizer_suspend(void); 46void visualizer_suspend(void);
43// This should be called when the keyboard wakes up from suspend state 47// This should be called when the keyboard wakes up from suspend state
@@ -61,6 +65,7 @@ struct keyframe_animation_t;
61typedef struct { 65typedef struct {
62 uint32_t layer; 66 uint32_t layer;
63 uint32_t default_layer; 67 uint32_t default_layer;
68 uint8_t mods;
64 uint32_t leds; // See led.h for available statuses 69 uint32_t leds; // See led.h for available statuses
65 bool suspended; 70 bool suspended;
66} visualizer_keyboard_status_t; 71} visualizer_keyboard_status_t;
@@ -129,6 +134,8 @@ bool keyframe_set_backlight_color(keyframe_animation_t* animation, visualizer_st
129bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state); 134bool keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state);
130// Displays a bitmap (0/1) of all the currently active layers 135// Displays a bitmap (0/1) of all the currently active layers
131bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); 136bool keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state);
137// Displays a bitmap (0/1) of all the currently active mods
138bool keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state);
132 139
133bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); 140bool keyframe_disable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state);
134bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state); 141bool keyframe_enable_lcd_and_backlight(keyframe_animation_t* animation, visualizer_state_t* state);
diff --git a/readme.md b/readme.md
index d33c3ad01..71f756667 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
1# Quantum Mechanical Keyboard Firmware 1# Quantum Mechanical Keyboard Firmware
2 2
3[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) 3[![Build Status](https://travis-ci.org/jackhumbert/qmk_firmware.svg?branch=master)](https://travis-ci.org/jackhumbert/qmk_firmware) [![Gitter](https://badges.gitter.im/qmk/qmk_firmware.svg)](https://gitter.im/qmk/qmk_firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4 4
5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). 5This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
6 6
@@ -23,7 +23,7 @@ The project also includes community support for [lots of other keyboards](/keybo
23 23
24QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :) 24QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). This repo used to be a fork of [TMK](https://github.com/tmk/tmk_keyboard), and we are incredibly grateful for his founding contributions to the firmware. We've had to break the fork due to purely technical reasons - it simply became too different over time, and we've had to start refactoring some of the basic bits and pieces. We are huge fans of TMK and Hasu :)
25 25
26This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new). 26This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/qmk/qmk_firmware/issues/new).
27 27
28The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed). 28The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), and the Clueboard by [Zach White](https://github.com/skullydazed).
29 29
@@ -31,7 +31,7 @@ The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/j
31 31
32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest: 32This is not a tiny project. While this is the main readme, there are many other files you might want to consult. Here are some points of interest:
33 33
34* [**The Wiki**](https://github.com/jackhumbert/qmk_firmware/wiki) - the entirety of the readme has been moved here 34* [**The Wiki**](https://github.com/qmk/qmk_firmware/wiki) - the entirety of the readme has been moved here
35* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on. 35* The readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboards/ergodox/ez/); for the Planck, it's [here](keyboards/planck/) and so on.
36* The list of possible keycodes you can use in your keymap is actually spread out in a few different places: 36* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
37 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes. 37 * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 3c1373c08..a86dccc61 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -80,6 +80,14 @@ ifeq ($(strip $(SLEEP_LED_ENABLE)), yes)
80 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN 80 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN
81endif 81endif
82 82
83ifeq ($(strip $(NO_UART)), yes)
84 TMK_COMMON_DEFS += -DNO_UART
85endif
86
87ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes)
88 TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN
89endif
90
83ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) 91ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
84 TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c 92 TMK_COMMON_SRC += $(COMMON_DIR)/backlight.c
85 TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE 93 TMK_COMMON_DEFS += -DBACKLIGHT_ENABLE
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c
index ad547b985..34db8d0b0 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/tmk_core/common/avr/bootloader.c
@@ -1,6 +1,7 @@
1#include <stdint.h> 1#include <stdint.h>
2#include <stdbool.h> 2#include <stdbool.h>
3#include <avr/io.h> 3#include <avr/io.h>
4#include <avr/eeprom.h>
4#include <avr/interrupt.h> 5#include <avr/interrupt.h>
5#include <avr/wdt.h> 6#include <avr/wdt.h>
6#include <util/delay.h> 7#include <util/delay.h>
@@ -89,6 +90,12 @@ void bootloader_jump(void) {
89 _delay_ms(5); 90 _delay_ms(5);
90 #endif 91 #endif
91 92
93 #ifdef BOOTLOADHID_BOOTLOADER
94 // force bootloadHID to stay in bootloader mode, so that it waits
95 // for a new firmware to be flashed
96 eeprom_write_byte((uint8_t *)1, 0x00);
97 #endif
98
92 // watchdog reset 99 // watchdog reset
93 reset_key = BOOTLOADER_RESET_KEY; 100 reset_key = BOOTLOADER_RESET_KEY;
94 wdt_enable(WDTO_250MS); 101 wdt_enable(WDTO_250MS);
@@ -114,6 +121,11 @@ void bootloader_jump(void) {
114 #endif 121 #endif
115} 122}
116 123
124#ifdef __AVR_ATmega32A__
125// MCUSR is actually called MCUCSR in ATmega32A
126#define MCUSR MCUCSR
127#endif
128
117/* this runs before main() */ 129/* this runs before main() */
118void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3"))); 130void bootloader_jump_after_watchdog_reset(void) __attribute__ ((used, naked, section (".init3")));
119void bootloader_jump_after_watchdog_reset(void) 131void bootloader_jump_after_watchdog_reset(void)
diff --git a/tmk_core/common/avr/timer.c b/tmk_core/common/avr/timer.c
index 84af44488..369015200 100644
--- a/tmk_core/common/avr/timer.c
+++ b/tmk_core/common/avr/timer.c
@@ -29,25 +29,35 @@ volatile uint32_t timer_count;
29 29
30void timer_init(void) 30void timer_init(void)
31{ 31{
32 // Timer0 CTC mode
33 TCCR0A = 0x02;
34
35#if TIMER_PRESCALER == 1 32#if TIMER_PRESCALER == 1
36 TCCR0B = 0x01; 33 uint8_t prescaler = 0x01;
37#elif TIMER_PRESCALER == 8 34#elif TIMER_PRESCALER == 8
38 TCCR0B = 0x02; 35 uint8_t prescaler = 0x02;
39#elif TIMER_PRESCALER == 64 36#elif TIMER_PRESCALER == 64
40 TCCR0B = 0x03; 37 uint8_t prescaler = 0x03;
41#elif TIMER_PRESCALER == 256 38#elif TIMER_PRESCALER == 256
42 TCCR0B = 0x04; 39 uint8_t prescaler = 0x04;
43#elif TIMER_PRESCALER == 1024 40#elif TIMER_PRESCALER == 1024
44 TCCR0B = 0x05; 41 uint8_t prescaler = 0x05;
45#else 42#else
46# error "Timer prescaler value is NOT vaild." 43# error "Timer prescaler value is NOT vaild."
47#endif 44#endif
48 45
46#ifndef __AVR_ATmega32A__
47 // Timer0 CTC mode
48 TCCR0A = 0x02;
49
50 TCCR0B = prescaler;
51
49 OCR0A = TIMER_RAW_TOP; 52 OCR0A = TIMER_RAW_TOP;
50 TIMSK0 = (1<<OCIE0A); 53 TIMSK0 = (1<<OCIE0A);
54#else
55 // Timer0 CTC mode
56 TCCR0 = (1 << WGM01) | prescaler;
57
58 OCR0 = TIMER_RAW_TOP;
59 TIMSK = (1 << OCIE0);
60#endif
51} 61}
52 62
53inline 63inline
@@ -107,7 +117,12 @@ uint32_t timer_elapsed32(uint32_t last)
107} 117}
108 118
109// excecuted once per 1ms.(excess for just timer count?) 119// excecuted once per 1ms.(excess for just timer count?)
110ISR(TIMER0_COMPA_vect) 120#ifndef __AVR_ATmega32A__
121#define TIMER_INTERRUPT_VECTOR TIMER0_COMPA_vect
122#else
123#define TIMER_INTERRUPT_VECTOR TIMER0_COMP_vect
124#endif
125ISR(TIMER_INTERRUPT_VECTOR, ISR_NOBLOCK)
111{ 126{
112 timer_count++; 127 timer_count++;
113} 128}
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index 5f29bc0b4..f79d5a257 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -235,8 +235,11 @@ static void print_status(void)
235 print("\n\t- Status -\n"); 235 print("\n\t- Status -\n");
236 236
237 print_val_hex8(host_keyboard_leds()); 237 print_val_hex8(host_keyboard_leds());
238#ifndef PROTOCOL_VUSB
239 // these aren't set on the V-USB protocol, so we just ignore them for now
238 print_val_hex8(keyboard_protocol); 240 print_val_hex8(keyboard_protocol);
239 print_val_hex8(keyboard_idle); 241 print_val_hex8(keyboard_idle);
242#endif
240#ifdef NKRO_ENABLE 243#ifdef NKRO_ENABLE
241 print_val_hex8(keymap_config.nkro); 244 print_val_hex8(keymap_config.nkro);
242#endif 245#endif
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 371d93f3e..765350792 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -188,7 +188,7 @@ MATRIX_LOOP_END:
188#endif 188#endif
189 189
190#ifdef VISUALIZER_ENABLE 190#ifdef VISUALIZER_ENABLE
191 visualizer_update(default_layer_state, layer_state, host_keyboard_leds()); 191 visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds());
192#endif 192#endif
193 193
194 // update LED 194 // update LED
diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk
index 3cba3f71a..897b833e1 100644
--- a/tmk_core/protocol/vusb.mk
+++ b/tmk_core/protocol/vusb.mk
@@ -18,4 +18,5 @@ endif
18 18
19 19
20# Search Path 20# Search Path
21VPATH += $(TMK_DIR)/protocol/vusb:$(TMK_DIR)/protocol/vusb/usbdrv 21VPATH += $(TMK_PATH)/$(VUSB_DIR)
22VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv
diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c
index 8e4a266e9..f6a0c7e9a 100644
--- a/tmk_core/protocol/vusb/main.c
+++ b/tmk_core/protocol/vusb/main.c
@@ -48,8 +48,12 @@ int main(void)
48 uint16_t last_timer = timer_read(); 48 uint16_t last_timer = timer_read();
49#endif 49#endif
50 50
51#ifdef CLKPR
52 // avoid unintentional changes of clock frequency in devices that have a
53 // clock prescaler
51 CLKPR = 0x80, CLKPR = 0; 54 CLKPR = 0x80, CLKPR = 0;
52#ifndef PS2_USE_USART 55#endif
56#ifndef NO_UART
53 uart_init(UART_BAUD_RATE); 57 uart_init(UART_BAUD_RATE);
54#endif 58#endif
55 59
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c
index eaa1c512d..a8c13b928 100644
--- a/tmk_core/protocol/vusb/vusb.c
+++ b/tmk_core/protocol/vusb/vusb.c
@@ -15,6 +15,8 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18#include <avr/eeprom.h>
19#include <avr/wdt.h>
18#include <stdint.h> 20#include <stdint.h>
19#include "usbdrv.h" 21#include "usbdrv.h"
20#include "usbconfig.h" 22#include "usbconfig.h"
@@ -24,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
24#include "debug.h" 26#include "debug.h"
25#include "host_driver.h" 27#include "host_driver.h"
26#include "vusb.h" 28#include "vusb.h"
29#include "bootloader.h"
27 30
28 31
29static uint8_t vusb_keyboard_leds = 0; 32static uint8_t vusb_keyboard_leds = 0;
@@ -163,6 +166,7 @@ static struct {
163 uint16_t len; 166 uint16_t len;
164 enum { 167 enum {
165 NONE, 168 NONE,
169 BOOTLOADER,
166 SET_LED 170 SET_LED
167 } kind; 171 } kind;
168} last_req; 172} last_req;
@@ -193,6 +197,11 @@ usbRequest_t *rq = (void *)data;
193 debug("SET_LED: "); 197 debug("SET_LED: ");
194 last_req.kind = SET_LED; 198 last_req.kind = SET_LED;
195 last_req.len = rq->wLength.word; 199 last_req.len = rq->wLength.word;
200#ifdef BOOTLOADER_SIZE
201 } else if(rq->wValue.word == 0x0301) {
202 last_req.kind = BOOTLOADER;
203 last_req.len = rq->wLength.word;
204#endif
196 } 205 }
197 return USB_NO_MSG; // to get data in usbFunctionWrite 206 return USB_NO_MSG; // to get data in usbFunctionWrite
198 } else { 207 } else {
@@ -220,6 +229,11 @@ uchar usbFunctionWrite(uchar *data, uchar len)
220 last_req.len = 0; 229 last_req.len = 0;
221 return 1; 230 return 1;
222 break; 231 break;
232 case BOOTLOADER:
233 usbDeviceDisconnect();
234 bootloader_jump();
235 return 1;
236 break;
223 case NONE: 237 case NONE:
224 default: 238 default:
225 return -1; 239 return -1;
@@ -266,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = {
266 0x95, 0x06, // Report Count (6), 280 0x95, 0x06, // Report Count (6),
267 0x75, 0x08, // Report Size (8), 281 0x75, 0x08, // Report Size (8),
268 0x15, 0x00, // Logical Minimum (0), 282 0x15, 0x00, // Logical Minimum (0),
269 0x25, 0xFF, 0x00 // Logical Maximum(255), 283 0x25, 0xFF, 0x00, // Logical Maximum(255),
270 0x05, 0x07, // Usage Page (Key Codes), 284 0x05, 0x07, // Usage Page (Key Codes),
271 0x19, 0x00, // Usage Minimum (0), 285 0x19, 0x00, // Usage Minimum (0),
272 0x29, 0xFF, // Usage Maximum (255), 286 0x29, 0xFF, // Usage Maximum (255),
@@ -336,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = {
336 0xa1, 0x01, // COLLECTION (Application) 350 0xa1, 0x01, // COLLECTION (Application)
337 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) 351 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2)
338 0x15, 0x01, // LOGICAL_MINIMUM (0x1) 352 0x15, 0x01, // LOGICAL_MINIMUM (0x1)
339 0x25, 0xb7, 0x00 // LOGICAL_MAXIMUM (0xb7) 353 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
340 0x19, 0x01, // USAGE_MINIMUM (0x1) 354 0x19, 0x01, // USAGE_MINIMUM (0x1)
341 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) 355 0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
342 0x75, 0x10, // REPORT_SIZE (16) 356 0x75, 0x10, // REPORT_SIZE (16)
@@ -481,11 +495,11 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq)
481 /* interface index */ 495 /* interface index */
482 switch (rq->wIndex.word) { 496 switch (rq->wIndex.word) {
483 case 0: 497 case 0:
484 usbMsgPtr = keyboard_hid_report; 498 usbMsgPtr = (unsigned char *)keyboard_hid_report;
485 len = sizeof(keyboard_hid_report); 499 len = sizeof(keyboard_hid_report);
486 break; 500 break;
487 case 1: 501 case 1:
488 usbMsgPtr = mouse_hid_report; 502 usbMsgPtr = (unsigned char *)mouse_hid_report;
489 len = sizeof(mouse_hid_report); 503 len = sizeof(mouse_hid_report);
490 break; 504 break;
491 } 505 }