summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/1up60rgb/1up60rgb.h15
-rw-r--r--keyboards/1up60rgb/info.json3
-rw-r--r--keyboards/1up60rgb/rules.mk2
-rw-r--r--keyboards/bananasplit/keymaps/talljoe/config.h23
-rw-r--r--keyboards/bananasplit/keymaps/talljoe/keymap.c1
-rw-r--r--keyboards/ca66/ca66.c29
-rw-r--r--keyboards/ckeys/nakey/config.h (renamed from keyboards/nakey/config.h)0
-rw-r--r--keyboards/ckeys/nakey/info.json (renamed from keyboards/nakey/info.json)0
-rw-r--r--keyboards/ckeys/nakey/keymaps/default/keymap.c (renamed from keyboards/nakey/keymaps/default/keymap.c)0
-rw-r--r--keyboards/ckeys/nakey/keymaps/default/readme.md (renamed from keyboards/nakey/keymaps/default/readme.md)0
-rw-r--r--keyboards/ckeys/nakey/nakey.c (renamed from keyboards/nakey/nakey.c)0
-rw-r--r--keyboards/ckeys/nakey/nakey.h (renamed from keyboards/nakey/nakey.h)0
-rw-r--r--keyboards/ckeys/nakey/readme.md (renamed from keyboards/nakey/readme.md)8
-rw-r--r--keyboards/ckeys/nakey/rules.mk (renamed from keyboards/nakey/rules.mk)0
-rw-r--r--keyboards/ckeys/obelus/config.h (renamed from keyboards/obelus/config.h)0
-rw-r--r--keyboards/ckeys/obelus/keymaps/default/config.h (renamed from keyboards/obelus/keymaps/default/config.h)0
-rw-r--r--keyboards/ckeys/obelus/keymaps/default/keymap.c (renamed from keyboards/obelus/keymaps/default/keymap.c)0
-rw-r--r--keyboards/ckeys/obelus/keymaps/default/readme.md (renamed from keyboards/obelus/keymaps/default/readme.md)0
-rw-r--r--keyboards/ckeys/obelus/obelus.c (renamed from keyboards/obelus/obelus.c)0
-rw-r--r--keyboards/ckeys/obelus/obelus.h (renamed from keyboards/obelus/obelus.h)0
-rw-r--r--keyboards/ckeys/obelus/readme.md (renamed from keyboards/obelus/readme.md)6
-rw-r--r--keyboards/ckeys/obelus/rules.mk (renamed from keyboards/obelus/rules.mk)0
-rw-r--r--keyboards/ckeys/readme.md9
-rw-r--r--keyboards/dz60/dz60.h15
-rw-r--r--keyboards/dz60/info.json4
-rw-r--r--keyboards/dz60/keymaps/xtonhasvim/config.h17
-rw-r--r--keyboards/dz60/keymaps/xtonhasvim/keymap.c92
-rw-r--r--keyboards/dz60/keymaps/xtonhasvim/readme.md10
-rw-r--r--keyboards/dz60/rules.mk4
-rw-r--r--keyboards/ergo42/keymaps/hdbx/config.h3
-rw-r--r--keyboards/ergo42/keymaps/hdbx/keymap.c139
-rw-r--r--keyboards/ergo42/keymaps/hdbx/readme.md98
-rw-r--r--keyboards/facew/config.h49
-rw-r--r--keyboards/facew/facew.c66
-rw-r--r--keyboards/facew/facew.h57
-rw-r--r--keyboards/facew/i2c.c106
-rw-r--r--keyboards/facew/i2c.h27
-rw-r--r--keyboards/facew/info.json16
-rw-r--r--keyboards/facew/keymaps/default/keymap.c43
-rw-r--r--keyboards/facew/keymaps/mechmerlin/keymap.c51
-rw-r--r--keyboards/facew/keymaps/mechmerlin/readme.md18
-rw-r--r--keyboards/facew/matrix.c106
-rw-r--r--keyboards/facew/readme.md24
-rw-r--r--keyboards/facew/rules.mk52
-rw-r--r--keyboards/facew/usbconfig.h396
-rw-r--r--keyboards/frosty_flake/frosty_flake.h2
-rw-r--r--keyboards/frosty_flake/rules.mk4
-rw-r--r--keyboards/iris/info.json2
-rw-r--r--keyboards/iris/keymaps/drashna/rules.mk2
-rw-r--r--keyboards/iris/keymaps/hag/keymap.c2
-rw-r--r--keyboards/iris/keymaps/swedish/keymap.c4
-rw-r--r--keyboards/iris/keymaps/transmogrified/keymap.c106
-rw-r--r--keyboards/iris/rev1/rev1.c20
-rw-r--r--keyboards/iris/rev1_led/rev1_led.c20
-rw-r--r--keyboards/iris/rev2/rev2.c20
-rw-r--r--keyboards/jj40/jj40.h22
-rw-r--r--keyboards/jj40/keymaps/ajp10304/jj40.h70
-rw-r--r--keyboards/jj40/keymaps/ajp10304/keymap.c28
-rw-r--r--keyboards/jj40/keymaps/cockpit/keymap.c11
-rw-r--r--keyboards/jj40/keymaps/default/keymap.c10
-rw-r--r--keyboards/jj40/keymaps/fun40/jj40.h70
-rw-r--r--keyboards/jj40/keymaps/fun40/keymap.c13
-rw-r--r--keyboards/jj40/keymaps/krusli/keymap.c11
-rw-r--r--keyboards/jj40/keymaps/oscillope/keymap.c3
-rw-r--r--keyboards/jj40/keymaps/suzuken/jj40.h70
-rw-r--r--keyboards/jj40/keymaps/suzuken/keymap.c13
-rw-r--r--keyboards/jj40/keymaps/waples/jj40.h70
-rw-r--r--keyboards/jj40/keymaps/waples/keymap.c16
-rw-r--r--keyboards/jj40/rules.mk2
-rw-r--r--keyboards/jj50/README.md6
-rw-r--r--keyboards/jj50/backlight.c212
-rw-r--r--keyboards/jj50/backlight_custom.h15
-rw-r--r--keyboards/jj50/breathing_custom.h140
-rw-r--r--keyboards/jj50/config.h8
-rw-r--r--keyboards/jj50/jj50.c61
-rw-r--r--keyboards/jj50/jj50.h5
-rw-r--r--keyboards/jj50/keymaps/default/keymap.c75
-rw-r--r--keyboards/jj50/matrix.c13
-rw-r--r--keyboards/jj50/rules.mk20
-rw-r--r--keyboards/jj50/usbconfig.h8
-rw-r--r--keyboards/lets_split/keymaps/DE_simple/keymap.c4
-rw-r--r--keyboards/lets_split/keymaps/OLED_sample/keymap.c8
-rw-r--r--keyboards/lets_split/keymaps/adam/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/cpeters1982/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/default/keymap.c16
-rw-r--r--keyboards/lets_split/keymaps/dlaroe/keymap.c7
-rw-r--r--keyboards/lets_split/keymaps/fabian/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/heartrobotninja/keymap.c7
-rw-r--r--keyboards/lets_split/keymaps/henxing/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/khord/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/kris/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/krusli/keymap.c19
-rw-r--r--keyboards/lets_split/keymaps/mbsurfer/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/mjt/keymap.c8
-rw-r--r--keyboards/lets_split/keymaps/normacos/keymap.c13
-rw-r--r--keyboards/lets_split/keymaps/piemod/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/pitty/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/poker/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/smt/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/waples/keymap.c5
-rwxr-xr-xkeyboards/lets_split/keymaps/xk/keymap.c5
-rw-r--r--keyboards/lets_split/keymaps/xyverz/keymap.c5
-rw-r--r--keyboards/lets_split/lets_split.h1
-rw-r--r--keyboards/levinson/keymaps/default/keymap.c16
-rw-r--r--keyboards/levinson/keymaps/treadwell/keymap.c2
-rw-r--r--keyboards/levinson/keymaps/valgrahf/keymap.c12
-rw-r--r--keyboards/levinson/levinson.h1
-rw-r--r--keyboards/mt40/config.h11
-rw-r--r--keyboards/mt40/keymaps/default/config.h11
-rw-r--r--keyboards/mt40/keymaps/default/keymap.c24
-rw-r--r--keyboards/mt40/matrix.c24
-rw-r--r--keyboards/mt40/mt40.c3
-rw-r--r--keyboards/mt40/mt40.h63
-rw-r--r--keyboards/mt40/rules.mk5
-rw-r--r--keyboards/niu_mini/keymaps/default/keymap.c52
-rw-r--r--keyboards/niu_mini/keymaps/mason/keymap.c48
-rw-r--r--keyboards/niu_mini/keymaps/planck/keymap.c85
-rw-r--r--keyboards/niu_mini/keymaps/readme.md1
-rw-r--r--keyboards/niu_mini/keymaps/xtonhasvim/config.h49
-rw-r--r--keyboards/niu_mini/keymaps/xtonhasvim/keymap.c200
-rw-r--r--keyboards/niu_mini/keymaps/xtonhasvim/readme.md9
-rw-r--r--keyboards/niu_mini/keymaps/xtonhasvim/rules.mk6
-rw-r--r--keyboards/niu_mini/niu_mini.h16
-rw-r--r--keyboards/niu_mini/rules.mk4
-rw-r--r--keyboards/orthodox/keymaps/default/config.h11
-rw-r--r--keyboards/orthodox/keymaps/default/keymap.c83
-rw-r--r--keyboards/orthodox/keymaps/drashna/keymap.c8
-rw-r--r--keyboards/orthodox/keymaps/oscillope/keymap.c13
-rw-r--r--keyboards/orthodox/orthodox.h2
-rw-r--r--keyboards/orthodox/rev1/info.json12
-rw-r--r--keyboards/orthodox/rev1/rev1.c15
-rw-r--r--keyboards/orthodox/rev1/rev1.h2
-rw-r--r--keyboards/orthodox/rev3/info.json12
-rw-r--r--keyboards/orthodox/rev3/rev3.c15
-rw-r--r--keyboards/orthodox/rev3/rev3.h2
-rw-r--r--keyboards/orthodox/rev3_teensy/info.json12
-rw-r--r--keyboards/orthodox/rev3_teensy/rev3_teensy.c15
-rw-r--r--keyboards/orthodox/rev3_teensy/rev3_teensy.h2
-rw-r--r--keyboards/paladin64/info.json28
-rwxr-xr-xkeyboards/paladin64/keymaps/default/keymap.c12
-rwxr-xr-xkeyboards/paladin64/paladin64.h71
-rwxr-xr-xkeyboards/paladin64/rules.mk2
-rw-r--r--keyboards/pk60/config.h58
-rw-r--r--keyboards/pk60/info.json32
-rw-r--r--keyboards/pk60/keymaps/default/keymap.c59
-rw-r--r--keyboards/pk60/keymaps/default/readme.md3
-rw-r--r--keyboards/pk60/pk60.c1
-rw-r--r--keyboards/pk60/pk60.h90
-rw-r--r--keyboards/pk60/readme.md13
-rw-r--r--keyboards/pk60/rules.mk56
-rw-r--r--keyboards/planck/keymaps/sascha/keymap.c34
-rw-r--r--keyboards/planck/keymaps/sascha/rules.mk5
-rw-r--r--keyboards/redox/keymaps/default/config.h2
-rw-r--r--keyboards/redox/keymaps/default/keymap.c28
-rw-r--r--keyboards/redox/keymaps/default/readme.md2
-rw-r--r--keyboards/redox/keymaps/italian/config.h41
-rw-r--r--keyboards/redox/keymaps/italian/keymap.c117
-rw-r--r--keyboards/redox/keymaps/italian/readme.md1
-rw-r--r--keyboards/redox/keymaps/italian/rules.mk5
-rw-r--r--keyboards/vitamins_included/config.h24
-rw-r--r--keyboards/vitamins_included/i2c.c163
-rw-r--r--keyboards/vitamins_included/i2c.h50
-rw-r--r--keyboards/vitamins_included/keymaps/default/config.h44
-rw-r--r--keyboards/vitamins_included/keymaps/default/keymap.c199
-rw-r--r--keyboards/vitamins_included/keymaps/default/rules.mk3
-rw-r--r--keyboards/vitamins_included/matrix.c510
-rw-r--r--keyboards/vitamins_included/readme.md126
-rw-r--r--keyboards/vitamins_included/rev1/config.h92
-rw-r--r--keyboards/vitamins_included/rev1/rev1.c13
-rw-r--r--keyboards/vitamins_included/rev1/rev1.h40
-rw-r--r--keyboards/vitamins_included/rev1/rules.mk5
-rw-r--r--keyboards/vitamins_included/rules.mk75
-rw-r--r--keyboards/vitamins_included/serial.c229
-rw-r--r--keyboards/vitamins_included/serial.h27
-rw-r--r--keyboards/vitamins_included/split_util.c20
-rw-r--r--keyboards/vitamins_included/split_util.h18
-rw-r--r--keyboards/vitamins_included/vitamins_included.c16
-rw-r--r--keyboards/vitamins_included/vitamins_included.h25
-rw-r--r--keyboards/xd60/info.json6
-rw-r--r--keyboards/xd60/keymaps/Jos/keymap.c12
-rw-r--r--keyboards/xd60/keymaps/birkir/keymap.c8
-rw-r--r--keyboards/xd60/keymaps/cheese/keymap.c10
-rw-r--r--keyboards/xd60/keymaps/default/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/edulpn/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/iso/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/kmontag42/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/krusli/keymap.c12
-rw-r--r--keyboards/xd60/keymaps/petesmom/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/rooski/keymap.c8
-rw-r--r--keyboards/xd60/keymaps/split_bksp_arrows/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/stanleylai/keymap.c8
-rw-r--r--keyboards/xd60/keymaps/supercoffee/keymap.c6
-rw-r--r--keyboards/xd60/keymaps/yuuki/keymap.c6
-rw-r--r--keyboards/xd60/rules.mk2
-rw-r--r--keyboards/xd60/xd60.h30
-rw-r--r--keyboards/xd75/keymaps/default/keymap.c28
-rw-r--r--keyboards/xd75/keymaps/default/readme.md2
-rw-r--r--keyboards/ymd75/README.md83
-rw-r--r--keyboards/ymd75/backlight.c215
-rw-r--r--keyboards/ymd75/backlight_custom.h15
-rw-r--r--keyboards/ymd75/breathing_custom.h140
-rw-r--r--keyboards/ymd75/config.h54
-rw-r--r--keyboards/ymd75/i2c.c104
-rw-r--r--keyboards/ymd75/i2c.h25
-rw-r--r--keyboards/ymd75/info.json12
-rw-r--r--keyboards/ymd75/keymaps/default/keymap.c94
-rw-r--r--keyboards/ymd75/matrix.c108
-rw-r--r--keyboards/ymd75/program74
-rw-r--r--keyboards/ymd75/rules.mk66
-rw-r--r--keyboards/ymd75/usbconfig.h396
-rw-r--r--keyboards/ymd75/ymd75.c95
-rw-r--r--keyboards/ymd75/ymd75.h57
-rw-r--r--keyboards/ymd96/keymaps/JJ50/keymap.c6
-rw-r--r--keyboards/ymd96/ymd96.h2
214 files changed, 6682 insertions, 1019 deletions
diff --git a/keyboards/1up60rgb/1up60rgb.h b/keyboards/1up60rgb/1up60rgb.h
index 969fd5b4a9..6905fd2205 100644
--- a/keyboards/1up60rgb/1up60rgb.h
+++ b/keyboards/1up60rgb/1up60rgb.h
@@ -63,4 +63,19 @@
K400, K401, K403, K406, K410, K411, K413, K414 \
)
+/* HHKB Variant */
+#define LAYOUT_60_hhkb( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
+ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
+ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
+ K401, K403, K406, K411, K413 \
+) LAYOUT_all( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
+ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \
+ K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
+ KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \
+)
+
#endif
diff --git a/keyboards/1up60rgb/info.json b/keyboards/1up60rgb/info.json
index d662dc60d4..67f94b7fe1 100644
--- a/keyboards/1up60rgb/info.json
+++ b/keyboards/1up60rgb/info.json
@@ -19,6 +19,9 @@
"LAYOUT_60_ansi_split_bs_rshift": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
+ },
+ "LAYOUT_60_hhkb": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}]
}
}
}
diff --git a/keyboards/1up60rgb/rules.mk b/keyboards/1up60rgb/rules.mk
index 7363b3c3df..540e4ea96c 100644
--- a/keyboards/1up60rgb/rules.mk
+++ b/keyboards/1up60rgb/rules.mk
@@ -55,4 +55,4 @@ BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= yes
-LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift
+LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb
diff --git a/keyboards/bananasplit/keymaps/talljoe/config.h b/keyboards/bananasplit/keymaps/talljoe/config.h
new file mode 100644
index 0000000000..bb2aadfa69
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/talljoe/config.h
@@ -0,0 +1,23 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include QMK_KEYBOARD_CONFIG_H
+
+#define PREVENT_STUCK_MODIFIERS
+#define SPACE_COUNT 3
+
+#define TEMPLATE( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
+ K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
+ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\
+}
+
+#endif
diff --git a/keyboards/bananasplit/keymaps/talljoe/keymap.c b/keyboards/bananasplit/keymaps/talljoe/keymap.c
new file mode 100644
index 0000000000..7812add812
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/talljoe/keymap.c
@@ -0,0 +1 @@
+// This space intentionally left blank
diff --git a/keyboards/ca66/ca66.c b/keyboards/ca66/ca66.c
index 91f4826f99..6f24a895f5 100644
--- a/keyboards/ca66/ca66.c
+++ b/keyboards/ca66/ca66.c
@@ -1 +1,30 @@
#include "ca66.h"
+#include "config.h"
+
+void bootmagic_lite(void)
+{
+ // The lite version of TMK's bootmagic.
+ // 100% less potential for accidentally making the
+ // keyboard do stupid things.
+
+ // We need multiple scans because debouncing can't be turned off.
+ matrix_scan();
+ wait_ms(DEBOUNCING_DELAY);
+ matrix_scan();
+
+ // If the Esc (matrix 0,0) is held down on power up,
+ // reset the EEPROM valid state and jump to bootloader.
+ if ( matrix_get_row(0) & (1<<0) )
+ {
+ // Set the TMK/QMK EEPROM state as invalid.
+ eeconfig_disable();
+ // Jump to bootloader.
+ bootloader_jump();
+ }
+}
+
+void matrix_init_kb(void)
+{
+ bootmagic_lite();
+ matrix_init_user();
+}
diff --git a/keyboards/nakey/config.h b/keyboards/ckeys/nakey/config.h
index 38fed297ef..38fed297ef 100644
--- a/keyboards/nakey/config.h
+++ b/keyboards/ckeys/nakey/config.h
diff --git a/keyboards/nakey/info.json b/keyboards/ckeys/nakey/info.json
index b44d0daf74..b44d0daf74 100644
--- a/keyboards/nakey/info.json
+++ b/keyboards/ckeys/nakey/info.json
diff --git a/keyboards/nakey/keymaps/default/keymap.c b/keyboards/ckeys/nakey/keymaps/default/keymap.c
index ebbb128bd2..ebbb128bd2 100644
--- a/keyboards/nakey/keymaps/default/keymap.c
+++ b/keyboards/ckeys/nakey/keymaps/default/keymap.c
diff --git a/keyboards/nakey/keymaps/default/readme.md b/keyboards/ckeys/nakey/keymaps/default/readme.md
index c842dc99a7..c842dc99a7 100644
--- a/keyboards/nakey/keymaps/default/readme.md
+++ b/keyboards/ckeys/nakey/keymaps/default/readme.md
diff --git a/keyboards/nakey/nakey.c b/keyboards/ckeys/nakey/nakey.c
index ba2fb90ebe..ba2fb90ebe 100644
--- a/keyboards/nakey/nakey.c
+++ b/keyboards/ckeys/nakey/nakey.c
diff --git a/keyboards/nakey/nakey.h b/keyboards/ckeys/nakey/nakey.h
index 3cbfda844d..3cbfda844d 100644
--- a/keyboards/nakey/nakey.h
+++ b/keyboards/ckeys/nakey/nakey.h
diff --git a/keyboards/nakey/readme.md b/keyboards/ckeys/nakey/readme.md
index 62688c1aeb..c7250cf506 100644
--- a/keyboards/nakey/readme.md
+++ b/keyboards/ckeys/nakey/readme.md
@@ -6,9 +6,11 @@ Keyboard Maintainer: [James Underwood](https://github.com/ju0)
Hardware Supported: naKey
Hardware Availability: [ckeys.org](https://ckeys.org)
+To build this keyboard, follow the [build guide](https://ckeys.org/tutorials/nakey-numpad-build-guide/).
+
Make example for this keyboard (after setting up your build environment):
- make nakey:default
+ make ckeys/nakey:default
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
@@ -18,7 +20,7 @@ For the full Quantum feature list, see [the parent readme](/).
## Building
-Download or clone the whole firmware and navigate to the root folder. Once your dev env is setup, you'll be able to type `make naKey-default` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
+Download or clone the whole firmware and navigate to the root folder. Once your dev env is setup, you'll be able to type `make ckeys/nakey:default` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
(Note: replace naKey with the name of your keyboard.)
@@ -26,7 +28,7 @@ Depending on which keymap you would like to use, you will have to compile slight
### Default
-To build with the default keymap, simply run `make naKey-default`.
+To build with the default keymap, simply run `make ckeys/nakey:default`.
### Other Keymaps
diff --git a/keyboards/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk
index a3571e8deb..a3571e8deb 100644
--- a/keyboards/nakey/rules.mk
+++ b/keyboards/ckeys/nakey/rules.mk
diff --git a/keyboards/obelus/config.h b/keyboards/ckeys/obelus/config.h
index a1451c1420..a1451c1420 100644
--- a/keyboards/obelus/config.h
+++ b/keyboards/ckeys/obelus/config.h
diff --git a/keyboards/obelus/keymaps/default/config.h b/keyboards/ckeys/obelus/keymaps/default/config.h
index 04bf9f4a9d..04bf9f4a9d 100644
--- a/keyboards/obelus/keymaps/default/config.h
+++ b/keyboards/ckeys/obelus/keymaps/default/config.h
diff --git a/keyboards/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c
index a9b15e9347..a9b15e9347 100644
--- a/keyboards/obelus/keymaps/default/keymap.c
+++ b/keyboards/ckeys/obelus/keymaps/default/keymap.c
diff --git a/keyboards/obelus/keymaps/default/readme.md b/keyboards/ckeys/obelus/keymaps/default/readme.md
index bac51fc043..bac51fc043 100644
--- a/keyboards/obelus/keymaps/default/readme.md
+++ b/keyboards/ckeys/obelus/keymaps/default/readme.md
diff --git a/keyboards/obelus/obelus.c b/keyboards/ckeys/obelus/obelus.c
index 2905f0724d..2905f0724d 100644
--- a/keyboards/obelus/obelus.c
+++ b/keyboards/ckeys/obelus/obelus.c
diff --git a/keyboards/obelus/obelus.h b/keyboards/ckeys/obelus/obelus.h
index 8444be897c..8444be897c 100644
--- a/keyboards/obelus/obelus.h
+++ b/keyboards/ckeys/obelus/obelus.h
diff --git a/keyboards/obelus/readme.md b/keyboards/ckeys/obelus/readme.md
index a9d67b00e8..6767956bf9 100644
--- a/keyboards/obelus/readme.md
+++ b/keyboards/ckeys/obelus/readme.md
@@ -5,15 +5,15 @@ Obelus
Keyboard Maintaintainers: [Ethan Madden](https://github.com/jetpacktuxedo), [James Underwood](https://github.com/ju0)
Hardware Supported: Obelus
-Hardware Availability: C-Keys soldering workshops, /u/MonkeyPlusPlus
+Hardware Availability: [C-Keys soldering workshops](https://ckeys.org/workshops/), [/u/MonkeyPlusPlus](https://www.reddit.com/user/monkeyplusplus)
Make example for this keyboard (after setting up your build environment):
- make obelus:default
+ make ckeys/obelus:default
Or to make and flash:
- make obelus:default:dfu
+ make ckeys/obelus:default:dfu
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) and [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
diff --git a/keyboards/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk
index d999b118cb..d999b118cb 100644
--- a/keyboards/obelus/rules.mk
+++ b/keyboards/ckeys/obelus/rules.mk
diff --git a/keyboards/ckeys/readme.md b/keyboards/ckeys/readme.md
new file mode 100644
index 0000000000..01991d9e3f
--- /dev/null
+++ b/keyboards/ckeys/readme.md
@@ -0,0 +1,9 @@
+# Ckeys.org
+
+[ckeys](https://ckeys.org/) is a mechanical keyboard based non profit, located in Seattle, Washington.
+
+In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository.
+
+* Supported Hardware
+ * The Obelus - 4x4 Macropad
+ * naKey - Through hole numpad \ No newline at end of file
diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h
index b86e5fb8da..af8082da55 100644
--- a/keyboards/dz60/dz60.h
+++ b/keyboards/dz60/dz60.h
@@ -91,5 +91,20 @@
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
}
+#define LAYOUT_60_ansi( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
+ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
+ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
+ K400, K401, K403, K406, K410, K411, K413, K414 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
+ { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
+ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
+ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
+ { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \
+}
+
+
#endif
diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json
index c5c6182bfc..f02ecb8439 100644
--- a/keyboards/dz60/info.json
+++ b/keyboards/dz60/info.json
@@ -27,6 +27,10 @@
"LAYOUT_all": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
+ },
+
+ "LAYOUT_60_ansi": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
}
}
}
diff --git a/keyboards/dz60/keymaps/xtonhasvim/config.h b/keyboards/dz60/keymaps/xtonhasvim/config.h
new file mode 100644
index 0000000000..b1f549e0ba
--- /dev/null
+++ b/keyboards/dz60/keymaps/xtonhasvim/config.h
@@ -0,0 +1,17 @@
+#ifndef CONFIG_KEYMAP_H
+#define CONFIG_KEYMAP_H
+
+#include "../../config.h"
+
+// help for fast typist+dual function keys?
+#define PERMISSIVE_HOLD
+
+/* speed up mousekeys a bit */
+#define MOUSEKEY_DELAY 50
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 8
+#define MOUSEKEY_TIME_TO_MAX 30
+#define MOUSEKEY_WHEEL_MAX_SPEED 8
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
+
+#endif
diff --git a/keyboards/dz60/keymaps/xtonhasvim/keymap.c b/keyboards/dz60/keymaps/xtonhasvim/keymap.c
new file mode 100644
index 0000000000..8a7419214a
--- /dev/null
+++ b/keyboards/dz60/keymaps/xtonhasvim/keymap.c
@@ -0,0 +1,92 @@
+#include QMK_KEYBOARD_H
+#include "xtonhasvim.h"
+
+enum layers {
+ _QWERTY,
+ _FUN,
+ _MOVE,
+ _MOUSE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
+ KC_LCTL, KC_LALT, KC_LGUI, VIM_START, TG(_MOUSE), KC_SPC, KC_RGUI, KC_RALT, X_____X, KC_RCTL, MO(_FUN)),
+
+ [_FUN] = LAYOUT(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______,
+ TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+
+ [_MOVE] = LAYOUT(
+ X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X,
+ X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X, X_____X, X_____X,
+ X_____X, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X, X_____X,
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______,
+ TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+
+
+ [_MOUSE] = LAYOUT(
+ X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X,
+ X_____X, X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X, X_____X, X_____X,
+ X_____X, X_____X,KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X, X_____X,
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______,
+ TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+
+ [_EDIT] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ TO(_QWERTY), _______, _______, VIM_START, _______, _______, _______, _______, _______, _______, _______),
+
+ [_CMD] = LAYOUT(
+ X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X,
+ X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X, X_____X, X_____X,
+ VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X, X_____X,
+ VIM_SHIFT, X_____X, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT,X_____X,
+ TO(_QWERTY), _______, _______, TO(_QWERTY), X_____X, X_____X, _______, _______, _______, _______, _______),
+
+};
+
+#define LED_BIT 1 << 2
+#define LED_MASK ~(1 << 2)
+
+void user_led_on(void) {
+ DDRB |= LED_BIT;
+ PORTB &= LED_MASK;
+}
+
+void user_led_off(void) {
+ DDRB &= ~LED_BIT;
+ PORTB &= LED_MASK;
+}
+
+void matrix_init_user(void) {
+ user_led_off();
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+ static uint32_t last_state = 0;
+
+ if(last_state != state) {
+ switch (biton32(state)) {
+ case _CMD:
+ user_led_on();
+ break;
+ default:
+ user_led_off();
+ break;
+ }
+ last_state = state;
+ }
+ return state;
+}
+
+
diff --git a/keyboards/dz60/keymaps/xtonhasvim/readme.md b/keyboards/dz60/keymaps/xtonhasvim/readme.md
new file mode 100644
index 0000000000..5d0e38a3eb
--- /dev/null
+++ b/keyboards/dz60/keymaps/xtonhasvim/readme.md
@@ -0,0 +1,10 @@
+# Xton has a DZ60 and it's Vimtastic!
+
+Mine has a split spacebar, no arrowkeys and an opaque case. Changes from the default layout:
+
+* Vim mode toggled by hitting left spacebar (see `users/xtonhasvim`). Reusing the capslock LED to indicate VIM is on.
+* Momentary directional control by holding down `;`.
+* Mousekeys toggled with middle space button.
+* Escape is dual-function with control (which replaces capslock AS IT SHOULD BE).
+* Bottom left key is the "halp my kb doesn't work" key that always dumps you back to QWERTY.
+
diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk
index 9c4082da29..77055348cb 100644
--- a/keyboards/dz60/rules.mk
+++ b/keyboards/dz60/rules.mk
@@ -53,4 +53,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
-RGBLIGHT_ENABLE = yes \ No newline at end of file
+RGBLIGHT_ENABLE = yes
+
+LAYOUTS = 60_ansi \ No newline at end of file
diff --git a/keyboards/ergo42/keymaps/hdbx/config.h b/keyboards/ergo42/keymaps/hdbx/config.h
index 39be7526ae..6bddef1ea7 100644
--- a/keyboards/ergo42/keymaps/hdbx/config.h
+++ b/keyboards/ergo42/keymaps/hdbx/config.h
@@ -34,8 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
// #define EE_HANDS
-#define TAPPING_TERM 120
-#define TAPPING_TOGGLE 3
+/* Use RGB Underglow */
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c
index 8b3df3f4ab..6a7430e499 100644
--- a/keyboards/ergo42/keymaps/hdbx/keymap.c
+++ b/keyboards/ergo42/keymaps/hdbx/keymap.c
@@ -17,7 +17,7 @@ extern keymap_config_t keymap_config;
#define _ADJUST 4
enum custom_keycodes {
- QWERTY = SAFE_RANGE, // デフォルトレイヤー用
+ QWERTY = SAFE_RANGE, // QWERTYレイヤーへ
MCR1, // マクロ1
MCR2, // マクロ2
MCR3, // マクロ3
@@ -35,14 +35,17 @@ enum custom_keycodes {
#define KC_RASE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise
#define KC_LSLB MT(MOD_LSFT, JP_LBRC) // タップで[ ホールドで左Shift
#define KC_RSRB MT(MOD_RSFT, JP_RBRC) // タップで] ホールドで右Shift
-#define KC_ALTB MT(MOD_LALT, KC_TAB) // タップでTAB ホールドで左ALT
-#define KC_ESCA LT(_ADJUST,KC_ESC) // タップでESC ホールドでADJUSTレイヤーon
+#define KC_ALTB MT(MOD_LALT, KC_TAB) // タップでTAB ホールドで左Alt
#define CTL_ZH CTL_T(KC_ZKHK) // タップで半角/全角 ホールドで左Control (Windows)
+#define WN_CAPS S(KC_CAPS) // Caps Lock (Windows)
#define KC_ALPS LALT(KC_PSCR) // Alt + PrintScreen
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+#define GAME DF(_GAME)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* QWERTY
+/* QWERTY // WindowsでJIS配列時のデフォルトキーマップ
* ,-------------------------------------------------------. ,-------------------------------------------------------.
* |Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
@@ -50,97 +53,123 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
* | [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | TT | GUI | \ | Esc/ | LOWER | Enter | Del | | End | Space | RAISE | Left | Down | Up | Right |
- * |(_GAME)| | |_ADJUST| 無変換| | | | | | 変換 | | | | |
+ * |WN CAPS| GUI | \ | Esc |無変換 | Enter | Del | | End | Space | 変換 | Left | Down | Up | Right |
+ * | | | | | LOWER | | | | | | RAISE | | | | |
* `-------------------------------------------------------' `-------------------------------------------------------'
*/
-
[_QWERTY] = KEYMAP( \
- KC_ALTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, JP_TILD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
- CTL_ZH, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LPRN, JP_RPRN, KC_H, KC_J, KC_K, KC_L, WN_SCLN, JP_QUOT, \
- KC_LSLB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSRB, \
- TT(_GAME),KC_LGUI, JP_YEN, KC_ESCA, KC_LOWR, KC_ENT, KC_DEL, KC_END, KC_SPC, KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ KC_ALTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, JP_TILD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ CTL_ZH, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LPRN, JP_RPRN, KC_H, KC_J, KC_K, KC_L, WN_SCLN, JP_QUOT, \
+ KC_LSLB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSRB, \
+ WN_CAPS, KC_LGUI, JP_YEN, KC_ESC, KC_LOWR, KC_ENT, KC_DEL, KC_END, KC_SPC, KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
-/* LOWER
+/* LOWER // 数字入力用レイヤー
* ,-------------------------------------------------------. ,-------------------------------------------------------.
- * |Tab/Alt| 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | O | = | BSPC |
+ * | | 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | . | = | |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * |ZH/Ctrl| F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter |
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | Home | 1 | 2 | 3 | + | * | Shift |
+ * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | + | * | Shift |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * |XXXXXXX| GUI |XXXXXXX| Esc | | Enter | Del | | End | 0 | . | Left | Down | Up | Right |
+ * | | |XXXXXXX| | | | | | | 0 | | | | | |
* `-------------------------------------------------------' `-------------------------------------------------------'
*/
-
[_LOWER] = KEYMAP( \
- _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_ESC, KC_7, KC_8, KC_9, KC_0, JP_EQL, _______, \
- _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \
- KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \
- _______, _______, XXXXXXX, KC_ESC, _______, _______, _______, _______, KC_P0, KC_PDOT, _______, _______, _______, _______ \
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_ESC, KC_7, KC_8, KC_9, KC_PDOT, JP_EQL, _______, \
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \
+ KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \
+ _______, _______, XXXXXXX, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______ \
),
-/* RAISE
+/* RAISE // 記号入力用レイヤー
* ,-------------------------------------------------------. ,-------------------------------------------------------.
- * |Tab/Alt| ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| BSPC |
+ * | | ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * |ZH/Ctrl|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " |
+ * | |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | Shift |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift |
+ * | Shift |M-PLAY |M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * |XXXXXXX| GUI | | | Esc |XXXXXXX| Enter | Del | |PageDwn| Space | | Left | Down | Up | Right |
+ * | | | | | | | | | |PageDwn| | | | | | |
* `-------------------------------------------------------' `-------------------------------------------------------'
*/
-
[_RAISE] = KEYMAP( \
- _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \
- KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \
- _______, _______, JP_PIPE, KC_ESC, XXXXXXX, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \
+ _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \
+ KC_LSFT, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \
+ _______, _______, JP_PIPE, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \
),
-/* GAME
+/* GAME // 左手はゲーム用レイヤー、右手はNumPad
* ,-------------------------------------------------------. ,-------------------------------------------------------.
- * | Esc | Q | W | E | R | T |PrntScr| | | | | | | | |
+ * | Tab | Q | W | E | R | T |PrntScr| | Esc | 7 | 8 | 9 | . | = | BSPC |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | Ctrl | A | S | D | F | G | F5 | | | | | | | | |
+ * | Ctrl | A | S | D | F | G | F1 | | F2 | 4 | 5 | 6 | - | / | Enter |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | Shift | Z | X | C | V | B | F2 | |PageUp | | | | | | |
+ * | Shift | Z | X | C | V | B | F2 | | Home | 1 | 2 | 3 | + | * | Shift |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | | GUI | Tab | Alt | Space | Enter | Del | |PageDwn| Space |XXXXXXX| Left | Down | Up | Right |
+ * | Del | GUI | Alt | Esc | LOWER | Space | Enter | | End | 0 | RAISE | Left | Down | Up | Right |
* `-------------------------------------------------------' `-------------------------------------------------------'
*/
[_GAME] = KEYMAP( \
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ALPS, _______, _______, _______, _______, _______, _______, _______, \
- KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LBRC, _______, _______, _______, _______, _______, _______, _______, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_PGUP, _______, _______, _______, _______, _______, _______, \
- _______, KC_LGUI, KC_TAB, KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_PGDN, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ALPS, KC_ESC, KC_P7, KC_P8, KC_P9, KC_PDOT, JP_EQL, KC_BSPC, \
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \
+ KC_DEL, KC_LGUI, KC_LALT, KC_ESC, LOWER, KC_SPC, KC_ENT, KC_PGDN, KC_P0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
-/* ADJUST
+/* ADJUST // 設定用レイヤー (LOWER+RAISE)
* ,-------------------------------------------------------. ,-------------------------------------------------------.
* |RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC |
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | RESET |RGB_MOD|_PLAIN |_BREATH|RGB_HuI|RGB_SaI|RGB_VaI| |XXXXXXX|QWERTY |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
+ * | RESET | | | | | | | |XXXXXXX|XXXXXXX|QWERTY | GAME |XXXXXXX|XXXXXXX|XXXXXXX|
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | Shift |_RAINBW|_SNAKE |_GRADIE|RGB_HuD|RGB_SaD|RGB_VaD| |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR|
+ * | Shift | | | | | | | |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR|
* |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- * | DEBUG |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| Left | Down | Up | Right |
+ * | DEBUG |XXXXXXX|XXXXXXX| | |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX| | Left | Down | Up | Right |
* `-------------------------------------------------------' `-------------------------------------------------------'
*/
+
[_ADJUST] = KEYMAP( \
- RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \
- RESET, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \
- DEBUG, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \
+ RESET, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, QWERTY, GAME, XXXXXXX, XXXXXXX, XXXXXXX, \
+ KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \
+ DEBUG, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
};
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
+// RGB Underglow使用時のレイヤー毎のカラー切り替え
+uint32_t layer_state_set_keymap (uint32_t state) {
+ return state;
+}
+
+void matrix_init_user(void) {
+#ifdef RGBLIGHT_ENABLE
+ rgblight_enable();
+ rgblight_setrgb_teal();
+#endif
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+ state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
+#ifdef RGBLIGHT_ENABLE
+ switch (biton32(state)) {
+ case _RAISE:
+ rgblight_setrgb_chartreuse(); // RAISE:シャルトリューズ
+ break;
+ case _LOWER:
+ rgblight_setrgb_pink(); // LOWER:ピンク
+ break;
+ case _ADJUST:
+ rgblight_setrgb_red(); // ADJUST:レッド
+ break;
+ default: // for any other layers, or the default layer
+ rgblight_setrgb_teal(); // 他:ティール
+ break;
+ }
+#endif
+return state;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -151,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
- persistent_default_layer_set(1UL<<_QWERTY);
+ set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
@@ -171,19 +200,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
case MCR1:
if (record->event.pressed) {
- SEND_STRING("hogehoge"); // 送信文字列
+ SEND_STRING("hoge"); // 送信文字列
}
return false;
break;
case MCR2:
if (record->event.pressed) {
- SEND_STRING("hogehogehoge"SS_TAP(X_ENTER)); // 送信文字列
+ SEND_STRING("hogehoge"SS_TAP(X_ENTER)); // 送信文字列
}
return false;
break;
case MCR3:
if (record->event.pressed) {
- SEND_STRING("hoge@hoge.co.jp"); // 送信文字列
+ SEND_STRING("hoge@hoge.hoge"); // 送信文字列
}
return false;
break;
diff --git a/keyboards/ergo42/keymaps/hdbx/readme.md b/keyboards/ergo42/keymaps/hdbx/readme.md
index fe76fc7cf7..aa05362e99 100644
--- a/keyboards/ergo42/keymaps/hdbx/readme.md
+++ b/keyboards/ergo42/keymaps/hdbx/readme.md
@@ -6,62 +6,62 @@ Designed for Japanese Keyboardists using JIS on the Ergo42.
````
QWERTY
-,-------------------------------------------------------. ,-------------------------------------------------------.
-|Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-|ZH/Ctrl| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| TT | GUI | \ | Esc/ | LOWER | Enter | Del | | End | Space | RAISE | Left | Down | Up | Right |
-|(_GAME)| | |_ADJUST| –³•ÏŠ·| | | | | | •ÏŠ· | | | | |
-`-------------------------------------------------------' `-------------------------------------------------------'
+ ,-------------------------------------------------------. ,-------------------------------------------------------.
+ |Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ |ZH/Ctrl| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ |WN CAPS| GUI | \ | Esc | MHEN/ | Enter | Del | | End | Space | HENK/ | Left | Down | Up | Right |
+ | | | | | LOWER | | | | | | RAISE | | | | |
+ `-------------------------------------------------------' `-------------------------------------------------------'
LOWER
-,-------------------------------------------------------. ,-------------------------------------------------------.
-|Tab/Alt| 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | O | = | BSPC |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Ctrl | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Shift | F7 | F8 | F9 | F10 | F11 | F12 | | Home | 1 | 2 | 3 | + | * | Shift |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-|XXXXXXX| GUI |XXXXXXX| Esc | | Enter | Del | | End | 0 | . | Left | Down | Up | Right |
-`-------------------------------------------------------' `-------------------------------------------------------'
+ ,-------------------------------------------------------. ,-------------------------------------------------------.
+ | | 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | . | = | |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | + | * | Shift |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | | |XXXXXXX| | | | | | | 0 | | | | | |
+ `-------------------------------------------------------' `-------------------------------------------------------'
RAISE
-,-------------------------------------------------------. ,-------------------------------------------------------.
-|Tab/Alt| ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| BSPC |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Ctrl |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Shift |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-|XXXXXXX| GUI | | | Esc |XXXXXXX| Enter | Del | |PageDwn| Space | | Left | Down | Up | Right |
-`-------------------------------------------------------' `-------------------------------------------------------'
-
-GAME
-,-------------------------------------------------------. ,-------------------------------------------------------.
-| Esc | Q | W | E | R | T |PrntScr| | | | | | | | |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Ctrl | A | S | D | F | G | F5 | | | | | | | | |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Shift | Z | X | C | V | B | F2 | |PageUp | | | | | | |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| | GUI | Tab | Alt | Space | Enter | Del | |PageDwn| Space |XXXXXXX| Left | Down | Up | Right |
-`-------------------------------------------------------' `-------------------------------------------------------'
+ ,-------------------------------------------------------. ,-------------------------------------------------------.
+ | | ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | | M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | | | | | | | | | |PageDwn| | | | | | |
+ `-------------------------------------------------------' `-------------------------------------------------------'
ADJUST
-,-------------------------------------------------------. ,-------------------------------------------------------.
-|RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC |
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| RESET |RGB_MOD|_PLAIN |_BREATH|RGB_HuI|RGB_SaI|RGB_VaI| |XXXXXXX|QWERTY |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| Shift |_RAINBW|_SNAKE |_GRADIE|RGB_HuD|RGB_SaD|RGB_VaD| |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR|
-|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
-| DEBUG |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX|XXXXXXX| Left | Down | Up | Right |
-`-------------------------------------------------------' `-------------------------------------------------------'
+ ,-------------------------------------------------------. ,-------------------------------------------------------.
+ |RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | RESET | | | | | | | |XXXXXXX|XXXXXXX|QWERTY | GAME |XXXXXXX|XXXXXXX|XXXXXXX|
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | Shift | | | | | | | |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR|
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | DEBUG |XXXXXXX|XXXXXXX| | |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX| | Left | Down | Up | Right |
+ `-------------------------------------------------------' `-------------------------------------------------------'
+
+GAME
+ ,-------------------------------------------------------. ,-------------------------------------------------------.
+ | Tab | Q | W | E | R | T |PrntScr| | Esc | 7 | 8 | 9 | . | = | BSPC |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | Ctrl | A | S | D | F | G | F1 | | F2 | 4 | 5 | 6 | - | / | Enter |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | Shift | Z | X | C | V | B | F2 | | Home | 1 | 2 | 3 | + | * | Shift |
+ |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
+ | Del | GUI | Alt | Esc | LOWER | Space | Enter | | End | 0 | RAISE | Left | Down | Up | Right |
+ `-------------------------------------------------------' `-------------------------------------------------------'
````
## Notes
-Supports RGB Underglow and Dynamic Macros.
+Supports RGB Underglow color sync to layer switching.
diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h
new file mode 100644
index 0000000000..d424404865
--- /dev/null
+++ b/keyboards/facew/config.h
@@ -0,0 +1,49 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef FACEW_CONFIG_H
+#define FACEW_CONFIG_H
+
+#include "config_common.h"
+
+#define VENDOR_ID 0x20A0
+#define PRODUCT_ID 0x422D
+#define MANUFACTURER NotActuallyWinkeyless
+#define PRODUCT facew
+
+#define RGBLED_NUM 16
+
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 11
+
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6}
+#define UNUSED_PINS
+
+#define DIODE_DIRECTION COL2ROW
+#define DEBOUNCING_DELAY 5
+
+#define NO_BACKLIGHT_CLOCK
+#define BACKLIGHT_LEVELS 1
+#define RGBLIGHT_ANIMATIONS
+
+#define NO_UART 1
+
+/* key combination for command */
+#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+#endif
diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c
new file mode 100644
index 0000000000..9c255c68f4
--- /dev/null
+++ b/keyboards/facew/facew.c
@@ -0,0 +1,66 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "facew.h"
+#ifdef BACKLIGHT_ENABLE
+#include "backlight.h"
+#endif
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.h"
+#endif
+
+#include <avr/pgmspace.h>
+
+#include "action_layer.h"
+#include "i2c.h"
+#include "quantum.h"
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ }
+ }
+
+ i2c_init();
+ i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+}
+#endif
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+void backlight_init_ports(void) {
+ DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6);
+ PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6);
+}
+
+void backlight_set(uint8_t level) {
+ if (level == 0) {
+ // Turn out the lights
+ PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6);
+ } else {
+ // Turn on the lights
+ PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6);
+ }
+}
diff --git a/keyboards/facew/facew.h b/keyboards/facew/facew.h
new file mode 100644
index 0000000000..7d949de98e
--- /dev/null
+++ b/keyboards/facew/facew.h
@@ -0,0 +1,57 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef FACEW_H
+#define FACEW_H
+
+#include "quantum.h"
+
+#define LAYOUT_all( \
+ K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\
+ K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \
+ K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \
+ K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\
+ K09, K00, K39, K30, K59, K69, K57, K29\
+){ \
+ { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \
+ { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \
+ { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \
+ { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \
+ { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \
+ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \
+}
+
+#define LAYOUT_60_ansi( \
+ K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K60,\
+ K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \
+ K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \
+ K19, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, \
+ K09, K00, K39, K30, K59, K69, K57, K29\
+){ \
+ { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \
+ { KC_NO, K11, K12, KC_NO, K14, K15, K16, KC_NO, K18, K19, KC_NO}, \
+ { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \
+ { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, KC_NO}, \
+ { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \
+ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \
+}
+
+#endif
diff --git a/keyboards/facew/i2c.c b/keyboards/facew/i2c.c
new file mode 100644
index 0000000000..a4f9521352
--- /dev/null
+++ b/keyboards/facew/i2c.c
@@ -0,0 +1,106 @@
+/*
+Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+// Please do not modify this file
+
+#include <avr/io.h>
+#include <util/twi.h>
+
+#include "i2c.h"
+
+void i2c_set_bitrate(uint16_t bitrate_khz) {
+ uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
+ if (bitrate_div >= 16) {
+ bitrate_div = (bitrate_div - 16) / 2;
+ }
+ TWBR = bitrate_div;
+}
+
+void i2c_init(void) {
+ // set pull-up resistors on I2C bus pins
+ PORTC |= 0b11;
+
+ i2c_set_bitrate(400);
+
+ // enable TWI (two-wire interface)
+ TWCR |= (1 << TWEN);
+
+ // enable TWI interrupt and slave address ACK
+ TWCR |= (1 << TWIE);
+ TWCR |= (1 << TWEA);
+}
+
+uint8_t i2c_start(uint8_t address) {
+ // reset TWI control register
+ TWCR = 0;
+
+ // begin transmission and wait for it to end
+ TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
+ while (!(TWCR & (1<<TWINT)));
+
+ // check if the start condition was successfully transmitted
+ if ((TWSR & 0xF8) != TW_START) {
+ return 1;
+ }
+
+ // transmit address and wait
+ TWDR = address;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+ while (!(TWCR & (1<<TWINT)));
+
+ // check if the device has acknowledged the READ / WRITE mode
+ uint8_t twst = TW_STATUS & 0xF8;
+ if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
+ return 1;
+ }
+
+ return 0;
+}
+
+void i2c_stop(void) {
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
+}
+
+uint8_t i2c_write(uint8_t data) {
+ TWDR = data;
+
+ // transmit data and wait
+ TWCR = (1<<TWINT) | (1<<TWEN);
+ while (!(TWCR & (1<<TWINT)));
+
+ if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
+ return 1;
+ }
+
+ return 0;
+}
+
+uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
+ if (i2c_start(address)) {
+ return 1;
+ }
+
+ for (uint16_t i = 0; i < length; i++) {
+ if (i2c_write(data[i])) {
+ return 1;
+ }
+ }
+
+ i2c_stop();
+
+ return 0;
+}
diff --git a/keyboards/facew/i2c.h b/keyboards/facew/i2c.h
new file mode 100644
index 0000000000..93a69c94da
--- /dev/null
+++ b/keyboards/facew/i2c.h
@@ -0,0 +1,27 @@
+/*
+Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+// Please do not modify this file
+
+#ifndef __I2C_H__
+#define __I2C_H__
+
+void i2c_init(void);
+void i2c_set_bitrate(uint16_t bitrate_khz);
+uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
+
+#endif
diff --git a/keyboards/facew/info.json b/keyboards/facew/info.json
new file mode 100644
index 0000000000..3f94985b2d
--- /dev/null
+++ b/keyboards/facew/info.json
@@ -0,0 +1,16 @@
+{
+ "keyboard_name": "FaceW",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_60_ansi": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
+ }
+ }
+}
diff --git a/keyboards/facew/keymaps/default/keymap.c b/keyboards/facew/keymaps/default/keymap.c
new file mode 100644
index 0000000000..a237f8489e
--- /dev/null
+++ b/keyboards/facew/keymaps/default/keymap.c
@@ -0,0 +1,43 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
+ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL
+ ),
+ [1] = LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL,
+ MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [2] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+};
+
diff --git a/keyboards/facew/keymaps/mechmerlin/keymap.c b/keyboards/facew/keymaps/mechmerlin/keymap.c
new file mode 100644
index 0000000000..35b59e6a42
--- /dev/null
+++ b/keyboards/facew/keymaps/mechmerlin/keymap.c
@@ -0,0 +1,51 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL
+ ),
+ [1] = LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [2] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+ [3] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+};
+
diff --git a/keyboards/facew/keymaps/mechmerlin/readme.md b/keyboards/facew/keymaps/mechmerlin/readme.md
new file mode 100644
index 0000000000..eeb83b0a16
--- /dev/null
+++ b/keyboards/facew/keymaps/mechmerlin/readme.md
@@ -0,0 +1,18 @@
+MechMerlin's FaceW Sprit Edition Layout
+======================
+
+This is the preferred 60% layout used by u/merlin36, host of the [MechMerlin YouTube channel](www.youtube.com/mechmerlin).
+
+## Keyboard Notes
+- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com)
+- Uses ps2avru instead of ps2avrgb
+- To put in reset mode hold `q` while inserting the USB cable
+- Use flashing instructions from ps2avrgb QMK port
+
+## Keymap Notes
+- Does not support any form of inswitch lighting as Merlin hates them.
+- Arrow toggle switch to the right of right shift
+- Reset is FN + Left Shift + R
+
+### Build
+To build this keymap, simply run `make facew:mechmerlin` from the qmk_firmware directory.
diff --git a/keyboards/facew/matrix.c b/keyboards/facew/matrix.c
new file mode 100644
index 0000000000..57aa36b5ff
--- /dev/null
+++ b/keyboards/facew/matrix.c
@@ -0,0 +1,106 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <avr/io.h>
+#include <util/delay.h>
+
+#include "matrix.h"
+
+#ifndef DEBOUNCE
+#define DEBOUNCE 5
+#endif
+
+static uint8_t debouncing = DEBOUNCE;
+
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+void matrix_init(void) {
+ // all outputs for rows high
+ DDRB = 0xFF;
+ PORTB = 0xFF;
+ // all inputs for columns
+ DDRA = 0x00;
+ DDRC &= ~(0x111111<<2);
+ DDRD &= ~(1<<PIND7);
+ // all columns are pulled-up
+ PORTA = 0xFF;
+ PORTC |= (0b111111<<2);
+ PORTD |= (1<<PIND7);
+
+ // initialize matrix state: all keys off
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ matrix[row] = 0x00;
+ matrix_debouncing[row] = 0x00;
+ }
+}
+
+void matrix_set_row_status(uint8_t row) {
+ DDRB = (1 << row);
+ PORTB = ~(1 << row);
+}
+
+uint8_t bit_reverse(uint8_t x) {
+ x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
+ x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
+ x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
+ return x;
+}
+
+uint8_t matrix_scan(void) {
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ matrix_set_row_status(row);
+ _delay_us(5);
+
+ matrix_row_t cols = (
+ // cols 0..7, PORTA 0 -> 7
+ (~PINA) & 0xFF
+ ) | (
+ // cols 8..13, PORTC 7 -> 0
+ bit_reverse((~PINC) & 0xFF) << 8
+ ) | (
+ // col 14, PORTD 7
+ ((~PIND) & (1 << PIND7)) << 7
+ );
+
+ if (matrix_debouncing[row] != cols) {
+ matrix_debouncing[row] = cols;
+ debouncing = DEBOUNCE;
+ }
+ }
+
+ if (debouncing) {
+ if (--debouncing) {
+ _delay_ms(1);
+ } else {
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = matrix_debouncing[i];
+ }
+ }
+ }
+
+ matrix_scan_user();
+
+ return 1;
+}
+
+inline matrix_row_t matrix_get_row(uint8_t row) {
+ return matrix[row];
+}
+
+void matrix_print(void) {
+}
diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md
new file mode 100644
index 0000000000..727c04d931
--- /dev/null
+++ b/keyboards/facew/readme.md
@@ -0,0 +1,24 @@
+# FaceW
+
+A 60% no frills keyboard.
+
+The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs
+but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It
+is designed and manufactured in Korea. It originally uses BootMapperClient for programming but
+can now also use QMK.
+
+Keyboard Maintainer: [MechMerlin](www.github.com/mechmerlin)
+Hardware Supported: FaceW Sprit Edition PCB
+Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1352
+
+## Keyboard Notes
+- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com)
+- Uses ps2avru instead of ps2avrgb
+- To put in reset mode hold `q` while inserting the USB cable
+- When flashing, type `bootloadHID -r yourfile.hex` and wait awhile
+
+Make example for this keyboard (after setting up your build environment):
+
+ make facew:default
+
+See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk
new file mode 100644
index 0000000000..77d29b3320
--- /dev/null
+++ b/keyboards/facew/rules.mk
@@ -0,0 +1,52 @@
+# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# MCU name
+MCU = atmega32a
+PROTOCOL = VUSB
+
+# unsupported features for now
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+
+# processor frequency
+F_CPU = 12000000
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
+# build options
+BOOTMAGIC_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = yes
+COMMAND_ENABLE = yes
+BACKLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
+RGBLIGHT_CUSTOM_DRIVER = yes
+
+OPT_DEFS = -DDEBUG_LEVEL=0
+
+# custom matrix setup
+CUSTOM_MATRIX = yes
+SRC = matrix.c i2c.c
+
+# programming options
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
+
+LAYOUTS = 60_ansi
diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h
new file mode 100644
index 0000000000..d2d848fcdc
--- /dev/null
+++ b/keyboards/facew/usbconfig.h
@@ -0,0 +1,396 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#ifndef __usbconfig_h_included__
+#define __usbconfig_h_included__
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT 3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT 2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC 0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT 4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER 3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT 0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE 0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL 1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED 0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+#define USB_CFG_MAX_BUS_POWER 500
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE 1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ 0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL 0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE 0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS 0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF 1
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ * in YL, TCNT0
+ * sts timer0Snapshot, YL
+ * endm
+ * #endif
+ * #define USB_SOF_HOOK myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING 0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC 0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION 0x00, 0x02
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
+#define USB_CFG_VENDOR_NAME_LEN 13
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
+#define USB_CFG_DEVICE_NAME_LEN 8
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
+/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS 0
+#define USB_CFG_DEVICE_SUBCLASS 0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS 3 /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
+ * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ * in static memory is in RAM, not in flash memory.
+ * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ * the driver must know the descriptor's length. The descriptor itself is
+ * found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ * char usbDescriptorDevice[];
+ * char usbDescriptorConfiguration[];
+ * char usbDescriptorHidReport[];
+ * char usbDescriptorString0[];
+ * int usbDescriptorStringVendor[];
+ * int usbDescriptorStringDevice[];
+ * int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ * USB_CFG_DESCR_PROPS_DEVICE
+ * USB_CFG_DESCR_PROPS_CONFIGURATION
+ * USB_CFG_DESCR_PROPS_STRINGS
+ * USB_CFG_DESCR_PROPS_STRING_0
+ * USB_CFG_DESCR_PROPS_STRING_VENDOR
+ * USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ * USB_CFG_DESCR_PROPS_HID
+ * USB_CFG_DESCR_PROPS_HID_REPORT
+ * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE 0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
+#define USB_CFG_DESCR_PROPS_STRINGS 0
+#define USB_CFG_DESCR_PROPS_STRING_0 0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
+#define USB_CFG_DESCR_PROPS_UNKNOWN 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG MCUCR */
+/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE GIMSK */
+/* #define USB_INTR_ENABLE_BIT INT0 */
+/* #define USB_INTR_PENDING GIFR */
+/* #define USB_INTR_PENDING_BIT INTF0 */
+/* #define USB_INTR_VECTOR INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE EIMSK */
+#define USB_INTR_ENABLE_BIT INT1
+/* #define USB_INTR_PENDING EIFR */
+#define USB_INTR_PENDING_BIT INTF1
+#define USB_INTR_VECTOR INT1_vect
+
+#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h
index 32307ece5f..ac293df0f2 100644
--- a/keyboards/frosty_flake/frosty_flake.h
+++ b/keyboards/frosty_flake/frosty_flake.h
@@ -87,4 +87,6 @@
/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
}
+#define LAYOUT_tkl_ansi KEYMAP_TKL
+
#endif
diff --git a/keyboards/frosty_flake/rules.mk b/keyboards/frosty_flake/rules.mk
index f9c43d3eda..94619e03d1 100644
--- a/keyboards/frosty_flake/rules.mk
+++ b/keyboards/frosty_flake/rules.mk
@@ -68,4 +68,6 @@ AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
CUSTOM_MATRIX = yes
-SRC += matrix.c \ No newline at end of file
+SRC += matrix.c
+
+LAYOUTS = tkl_ansi
diff --git a/keyboards/iris/info.json b/keyboards/iris/info.json
index 984ac56255..ed4528b9d2 100644
--- a/keyboards/iris/info.json
+++ b/keyboards/iris/info.json
@@ -5,7 +5,7 @@
"width": 14.5,
"height": 5,
"layouts": {
- "KEYMAP": {
+ "LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4}]
}
}
diff --git a/keyboards/iris/keymaps/drashna/rules.mk b/keyboards/iris/keymaps/drashna/rules.mk
index 0e49adf4af..8f19384f62 100644
--- a/keyboards/iris/keymaps/drashna/rules.mk
+++ b/keyboards/iris/keymaps/drashna/rules.mk
@@ -8,4 +8,4 @@ RGBLIGHT_ENABLE = yes
AUDIO_ENABLE = yes
NKRO_ENABLE = yes
BACKLIGHT_ENABLE = no
-
+SWAP_HANDS_ENABLE = yes
diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/iris/keymaps/hag/keymap.c
index a708b56022..a690f8761a 100644
--- a/keyboards/iris/keymaps/hag/keymap.c
+++ b/keyboards/iris/keymaps/hag/keymap.c
@@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// `----+----+----' `----+----+----'
),
- [_ADJUST] = KEYMAP(
+ [_ADJUST] = LAYOUT(
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , KC_RST, _______, _______, _______, _______, KC_PWR, RESET,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/iris/keymaps/swedish/keymap.c b/keyboards/iris/keymaps/swedish/keymap.c
index 70699bce1a..015e26aec9 100644
--- a/keyboards/iris/keymaps/swedish/keymap.c
+++ b/keyboards/iris/keymaps/swedish/keymap.c
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// `----+----+----' `----+----+----'
),
- [_LOWER] = KEYMAP(
+ [_LOWER] = LAYOUT(
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
@@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// `-------+-------+-------' `-------+-------+-------'
),
- [_RAISE] = KEYMAP(
+ [_RAISE] = LAYOUT(
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/iris/keymaps/transmogrified/keymap.c
index 714b826ac5..43d6cc6002 100644
--- a/keyboards/iris/keymaps/transmogrified/keymap.c
+++ b/keyboards/iris/keymaps/transmogrified/keymap.c
@@ -27,6 +27,8 @@ enum custom_keycodes {
ONEHANDL,
RLAYER,
LLAYER,
+ RLOCK,
+ LLOCK,
DUAL,
CONFIG,
};
@@ -44,13 +46,15 @@ enum {
/* LAYERS */
#define KC_LLAY LLAYER
#define KC_RLAY RLAYER
+#define KC_RLOK RLOCK
+#define KC_LLOK LLOCK
#define KC_QWER QWERTY
#define KC_DVOR DVORAK
#define KC_COLE COLEMAK
#define KC_ONER ONEHANDR
#define KC_ONEL ONEHANDL
#define KC_DUAL DUAL
-#define KC_CONF OSL(_CONFIG)
+#define KC_CONF CONFIG
/* Custom Shortened Keys */
#define KC_MCTB LCTL(KC_TAB)
@@ -71,7 +75,7 @@ enum {
#define KC_BLUP BL_INC
#define KC_BLDN BL_DEC
#define KC_SYSR KC_SYSREQ
-#define KC_FLASH RESET
+#define KC_REST RESET
/* Tap Dance */
#define KC_LGUA TD(TD_LGUIAPP)
@@ -82,13 +86,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
CTEC, A , S , D , F , G , H , J , K , L ,SCLN,ENT ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SHCL, Z , X , C , V , B ,XXXX, XXXX, N , M ,COMM,DOT ,SLSH,RSFT,
+ SHCL, Z , X , C , V , B ,LLOK, RLOK, N , M ,COMM,DOT ,SLSH,RSFT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
LALT,LLAY,TAB , SPC ,RLAY,LGUA
// `----+----+----' `----+----+----'
@@ -96,13 +100,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_COLEMAK] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,DEL ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTEC, A , R , S , T , D , H , N , E , I ,SCLN,ENT ,
+ CTEC, A , R , S , T , D , H , N , E , I , O ,ENT ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SHCL, Z , X , C , V , B ,XXXX, XXXX, K , M ,COMM,DOT ,SLSH,RSFT,
+ SHCL, Z , X , C , V , B ,LLOK, RLOK, K , M ,COMM,DOT ,SLSH,RSFT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
LALT,LLAY,TAB , SPC ,RLAY,LGUA
// `----+----+----' `----+----+----'
@@ -110,13 +114,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DVORAK] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- LEAD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ XXXX, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
CTEC, A , O , E , U , I , D , H , T , N , S ,ENT ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SHCL,SCLN, Q , J , K , X ,XXXX, XXXX, B , M , W , V , Z ,EQL ,
+ SHCL,SCLN, Q , J , K , X ,LLOK, RLOK, B , M , W , V , Z ,EQL ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
LALT,LLAY,TAB , SPC ,RLAY,LGUA
// `----+----+----' `----+----+----'
@@ -138,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ONEHANDL] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,LEAD,
+ XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, 5 , 4 , 3 , 2 , 1 ,XXXX,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, T , R , E , W , Q ,TAB ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -152,14 +156,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RLAYER] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ,XXXX,XXXX,XXXX,XXXX,XXXX, MUTE,VOLD,VOLU,BLDN,BLUP, ,
+ ,SLCK,SYSR,PSCR,INS ,PAUS, MUTE,VOLD,VOLU,BLDN,BLUP, ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,TILD,GRV ,EQL ,LBRC,RBRC, PGUP,ASTR, UP ,AMPR,CIRC, ,
+ ,TILD,GRV ,EQL ,LBRC,RBRC, ASTR,HOME, UP ,PGUP,PLUS, ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM,PIPE,DLR ,LPRN,RPRN, HOME,LEFT,DOWN,RGHT,END ,QUOT,
+ ,EXLM,PIPE,DLR ,LPRN,RPRN, AMPR,LEFT,DOWN,RGHT,MINS,QUOT,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , AT ,HASH,PERC,LCBR,RCBR,LGUI, ,PGDN,UNDS,MINS,PLUS,BSLS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
+ , AT ,HASH,PERC,LCBR,RCBR, , ,CIRC,END ,UNDS,PGDN,BSLS, ,
+ //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
, , , , ,
// `----+----+----' `----+----+----'
),
@@ -172,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----| |----+----+----+----+----+----|
,XXXX,MCST,DOWN,MCTB,ENT , SLSH, 4 , 5 , 6 ,MINS, ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,XXXX,XXXX,BSPC,SPC ,SINS,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , ,
+ ,XXXX,XXXX,BSPC,SINS,SPC ,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
, , , 0 , ,
// `----+----+----' `----+----+----'
@@ -180,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DUAL] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ,XXXX,XXXX,PSCR,INS ,XXXX, XXXX,SLEP,SLCK,PAUS,SYSR,XXXX,
+ ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,MS_U,XXXX,XXXX,MCAD,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -194,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_CONFIG] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- FLASH,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
+ REST,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
XXXX,QWER,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,ONER,XXXX,XXXX,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -237,6 +241,11 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
+/* Variables for layer light toggling */
+static uint16_t currentBL = 0;
+static uint16_t rlocked = 0;
+static uint16_t llocked = 0;
+
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
@@ -263,14 +272,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
+ case CONFIG:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_CONFIG);
+ backlight_toggle();
+ }
+ return false;
+ break;
case RLAYER:
if (record->event.pressed) {
layer_on(_RLAYER);
update_tri_layer(_RLAYER, _LLAYER, _DUAL);
+ /* add logic to toggle backlight change when on a layer */
+ currentBL = get_backlight_level();
+ if ( currentBL == 0 || currentBL == 1 ) {
+ backlight_set(5);
+ } else {
+ backlight_set(0);
+ }
} else {
unregister_code(KC_LGUI);
+ rlocked = 0;
layer_off(_RLAYER);
update_tri_layer(_RLAYER, _LLAYER, _DUAL);
+ if ( llocked == 0 ) {
+ backlight_set(currentBL);
+ } else {
+ }
}
return false;
break;
@@ -278,9 +306,51 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
layer_on(_LLAYER);
update_tri_layer(_RLAYER, _LLAYER, _DUAL);
+ /* add logic to toggle backlight change when on a layer */
+ currentBL = get_backlight_level();
+ if ( currentBL == 0 || currentBL == 1 ) {
+ backlight_set(5);
+ } else {
+ backlight_set(0);
+ }
} else {
+ llocked = 0;
layer_off(_LLAYER);
update_tri_layer(_RLAYER, _LLAYER, _DUAL);
+ if ( rlocked == 0 ) {
+ backlight_set(currentBL);
+ } else {
+ }
+ }
+ return false;
+ break;
+ case RLOCK:
+ if (record->event.pressed) {
+ layer_on(_RLAYER);
+ /* add logic to toggle backlight change when on a layer */
+ rlocked = 1;
+ currentBL = get_backlight_level();
+ if ( currentBL == 0 || currentBL == 1 ) {
+ backlight_set(5);
+ } else {
+ backlight_set(0);
+ }
+ } else {
+ }
+ return false;
+ break;
+ case LLOCK:
+ if (record->event.pressed) {
+ layer_on(_LLAYER);
+ /* add logic to toggle backlight change when on a layer */
+ llocked = 1;
+ currentBL = get_backlight_level();
+ if ( currentBL == 0 || currentBL == 1 ) {
+ backlight_set(5);
+ } else {
+ backlight_set(0);
+ }
+ } else {
}
return false;
break;
diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/iris/rev1/rev1.c
index 609c479eb3..3fdfaa94bc 100644
--- a/keyboards/iris/rev1/rev1.c
+++ b/keyboards/iris/rev1/rev1.c
@@ -20,3 +20,23 @@ void matrix_init_kb(void) {
matrix_init_user();
};
+
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
+ {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
+ {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
+ {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
+ {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
+ /* Right hand, matrix positions */
+ {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
+ {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
+ {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
+ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
+ {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
+};
+#endif
diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/iris/rev1_led/rev1_led.c
index 7a4c874884..681625f4b0 100644
--- a/keyboards/iris/rev1_led/rev1_led.c
+++ b/keyboards/iris/rev1_led/rev1_led.c
@@ -20,3 +20,23 @@ void matrix_init_kb(void) {
matrix_init_user();
};
+
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
+ {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
+ {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
+ {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
+ {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
+ /* Right hand, matrix positions */
+ {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
+ {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
+ {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
+ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
+ {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
+};
+#endif
diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/iris/rev2/rev2.c
index fb53f283ee..133fce66ad 100644
--- a/keyboards/iris/rev2/rev2.c
+++ b/keyboards/iris/rev2/rev2.c
@@ -20,3 +20,23 @@ void matrix_init_kb(void) {
matrix_init_user();
};
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
+ {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
+ {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
+ {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
+ {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
+ /* Right hand, matrix positions */
+ {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
+ {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
+ {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
+ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
+ {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
+};
+#endif
+
diff --git a/keyboards/jj40/jj40.h b/keyboards/jj40/jj40.h
index 44d8b0f375..bb7068fdc0 100644
--- a/keyboards/jj40/jj40.h
+++ b/keyboards/jj40/jj40.h
@@ -67,6 +67,28 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards
{ K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
}
+#define KC_KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+ ) \
+ KEYMAP_GRID( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
+ )
+
+
#define KEYMAP KEYMAP_MIT
+#define LAYOUT_ortho_4x12 KEYMAP_GRID
+
+#define LAYOUT_2U_space KEYMAP_MIT
+#define LAYOUT_planck_mit KEYMAP_MIT
+
+#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
+#define LAYOUT_kc_ortho_4x12 KC_KEYMAP
+
#endif
diff --git a/keyboards/jj40/keymaps/ajp10304/jj40.h b/keyboards/jj40/keymaps/ajp10304/jj40.h
deleted file mode 100644
index a6162d9c08..0000000000
--- a/keyboards/jj40/keymaps/ajp10304/jj40.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
-
-#include "quantum.h"
-// #include "keycode.h"
-// #include "action.h"
-
-#define KEYMAP_GRID( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_MIT( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_OFFSET( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP KEYMAP_GRID
-#define LAYOUT_ortho_4x12 LAYOUT_planck_grid
-
-#endif
diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c
index b6d4d7b55e..c0d0062c7b 100644
--- a/keyboards/jj40/keymaps/ajp10304/keymap.c
+++ b/keyboards/jj40/keymaps/ajp10304/keymap.c
@@ -1,6 +1,4 @@
-#include "jj40.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#include "keymap_uk.h"
extern keymap_config_t keymap_config;
@@ -54,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP(\
+[_QWERTY] = LAYOUT_ortho_4x12(\
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,\
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,\
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,\
@@ -72,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNC] = KEYMAP(\
+[_FUNC] = LAYOUT_ortho_4x12(\
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,\
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,\
KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,\
@@ -90,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP(\
+[_LOWER] = LAYOUT_ortho_4x12(\
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,\
LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,\
KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,\
@@ -108,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Mouse| | | | | Alt | Enter|Raise | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = KEYMAP(\
+[_RAISE] = LAYOUT_ortho_4x12(\
KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,\
KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,\
_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,\
@@ -126,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = KEYMAP(\
+[_ADJUST] = LAYOUT_ortho_4x12(\
M(0), RESET, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\
KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\
TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\
@@ -144,7 +142,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_MOUSE] = KEYMAP(\
+[_MOUSE] = LAYOUT_ortho_4x12(\
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______,\
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______,\
@@ -162,42 +160,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNC2] = KEYMAP(\
+[_FUNC2] = LAYOUT_ortho_4x12(\
_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,\
_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,\
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98), \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
-[_MAC]= KEYMAP(\
+[_MAC]= LAYOUT_ortho_4x12(\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 \
),
-[_MLWR] = KEYMAP(\
+[_MLWR] = LAYOUT_ortho_4x12(\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
-[_MRSE] = KEYMAP(\
+[_MRSE] = LAYOUT_ortho_4x12(\
_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,\
_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
-[_MFNC]= KEYMAP(\
+[_MFNC]= LAYOUT_ortho_4x12(\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
-[_MFNC2] = KEYMAP(\
+[_MFNC2] = LAYOUT_ortho_4x12(\
_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,\
_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,\
_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99), \
diff --git a/keyboards/jj40/keymaps/cockpit/keymap.c b/keyboards/jj40/keymaps/cockpit/keymap.c
index e8534b63d2..02deaaa8e3 100644
--- a/keyboards/jj40/keymaps/cockpit/keymap.c
+++ b/keyboards/jj40/keymaps/cockpit/keymap.c
@@ -1,5 +1,4 @@
-#include "jj40.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#define LT_1 RALT(KC_1)
#define LT_2 RALT(KC_2)
@@ -64,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Fn | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP( \
+[_QWERTY] = LAYOUT_2U_space( \
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -86,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | | | Alt |Lower|| Space | | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP( \
+[_LOWER] = LAYOUT_2U_space( \
KC_GRV, LT_A_OG, LT_C_CA, LT_E_OG, LT_E_DO, LT_I_OG, LT_S_CA, LT_U_OG, LT_U_MA, LT_Z_CA, KC_MINS, KC_BSPC, \
KC_TAB, LT_EXLM, LT_AT, LT_HASH, LT_DLR, LT_PERC, LT_CIRC, LT_AMPR, LT_ASTR, KC_LPRN, KC_RPRN, KC_DEL , \
KC_LSFT, KC_PEQL, KC_PPLS, KC_PMNS, KC_PIPE, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KC_INS , \
@@ -108,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | | | Alt | | Space |Raise|| Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = KEYMAP( \
+[_RAISE] = LAYOUT_2U_space( \
KC_GRV, LT_1, LT_2, LT_3, LT_4, LT_5, LT_6, LT_7, LT_8, LT_9, LT_0, KC_BSPC, \
KC_TAB, LT_4, LT_5, LT_6, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, \
KC_LSFT, LT_7, LT_8, LT_9, LT_0, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -131,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl |||Fn||| Mode | Alt | | Space |MPrev |MStop |MNext |MPlay | Lock |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNC] = KEYMAP( \
+[_FUNC] = LAYOUT_2U_space( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, _______, _______, KC_VOLU, \
KC_LSFT, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, _______, KC_PSCR, KC_VOLD, \
diff --git a/keyboards/jj40/keymaps/default/keymap.c b/keyboards/jj40/keymaps/default/keymap.c
index 70c73c9669..1db887bd01 100644
--- a/keyboards/jj40/keymaps/default/keymap.c
+++ b/keyboards/jj40/keymaps/default/keymap.c
@@ -1,5 +1,5 @@
-#include "jj40.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
+
#define _QWERTY 0
#define _LOWER 1
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP( \
+[_QWERTY] = LAYOUT_2U_space( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP( \
+[_LOWER] = LAYOUT_2U_space( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
@@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = KEYMAP( \
+[_RAISE] = LAYOUT_2U_space( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
diff --git a/keyboards/jj40/keymaps/fun40/jj40.h b/keyboards/jj40/keymaps/fun40/jj40.h
deleted file mode 100644
index a6162d9c08..0000000000
--- a/keyboards/jj40/keymaps/fun40/jj40.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
-
-#include "quantum.h"
-// #include "keycode.h"
-// #include "action.h"
-
-#define KEYMAP_GRID( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_MIT( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_OFFSET( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP KEYMAP_GRID
-#define LAYOUT_ortho_4x12 LAYOUT_planck_grid
-
-#endif
diff --git a/keyboards/jj40/keymaps/fun40/keymap.c b/keyboards/jj40/keymaps/fun40/keymap.c
index d6fcfe7c24..bbe6279e3e 100644
--- a/keyboards/jj40/keymaps/fun40/keymap.c
+++ b/keyboards/jj40/keymaps/fun40/keymap.c
@@ -1,9 +1,4 @@
-#include "jj40.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
#define _QWERTY 0
#define _LOWER 1
@@ -31,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Del | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP( \
+[_QWERTY] = LAYOUT_ortho_4x12( \
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
@@ -49,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | nkro | Alt | NKRO |Lower | PgDn | PgUp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP( \
+[_LOWER] = LAYOUT_ortho_4x12( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, \
KC_LSFT, KC_PSCR, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, _______, _______, BL_ON, BL_STEP, KC_ENT, \
@@ -67,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | | Alt | |Lower | | |Raise | 0 | | Home | End |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = KEYMAP( \
+[_RAISE] = LAYOUT_ortho_4x12( \
KC_CAPS, KC_MINS, KC_PLUS, KC_EQL, KC_LPRN, KC_RPRN, _______, KC_7, KC_8, KC_9, KC_BSPC, KC_DEL, \
KC_LOCK, KC_TILD, KC_UNDS, _______,KC_LBRC, KC_RBRC, _______, KC_4, KC_5, KC_6, _______, _______, \
KC_INS, KC_GRV, KC_BSLS, KC_PIPE, KC_LCBR, KC_RCBR, _______, KC_1, KC_2, KC_3, KC_DOT, _______, \
diff --git a/keyboards/jj40/keymaps/krusli/keymap.c b/keyboards/jj40/keymaps/krusli/keymap.c
index 2e6e9a76e7..73dd0b2877 100644
--- a/keyboards/jj40/keymaps/krusli/keymap.c
+++ b/keyboards/jj40/keymaps/krusli/keymap.c
@@ -1,5 +1,4 @@
-#include "jj40.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#define _QWERTY 0
#define _LOWER 1
@@ -36,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT_2U_space( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -54,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play | |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT_2U_space( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, \
@@ -72,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Prev | Play | Next | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT_2U_space( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \
@@ -90,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Qwerty| 0 | . | . |Enter |Enter | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_NUMPAD] = KEYMAP( \
+ [_NUMPAD] = LAYOUT_2U_space( \
KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \
KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \
_______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/jj40/keymaps/oscillope/keymap.c b/keyboards/jj40/keymaps/oscillope/keymap.c
index d4bca0e492..710fa16f7a 100644
--- a/keyboards/jj40/keymaps/oscillope/keymap.c
+++ b/keyboards/jj40/keymaps/oscillope/keymap.c
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "jj40.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#ifdef KEYMAP
#undef KEYMAP
diff --git a/keyboards/jj40/keymaps/suzuken/jj40.h b/keyboards/jj40/keymaps/suzuken/jj40.h
deleted file mode 100644
index a6162d9c08..0000000000
--- a/keyboards/jj40/keymaps/suzuken/jj40.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
-
-#include "quantum.h"
-// #include "keycode.h"
-// #include "action.h"
-
-#define KEYMAP_GRID( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_MIT( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_OFFSET( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP KEYMAP_GRID
-#define LAYOUT_ortho_4x12 LAYOUT_planck_grid
-
-#endif
diff --git a/keyboards/jj40/keymaps/suzuken/keymap.c b/keyboards/jj40/keymaps/suzuken/keymap.c
index 10288ac8ae..269e26cd76 100644
--- a/keyboards/jj40/keymaps/suzuken/keymap.c
+++ b/keyboards/jj40/keymaps/suzuken/keymap.c
@@ -1,5 +1,4 @@
-#include "jj40.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
enum jj40_layers {
_QWERTY,
@@ -27,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Fn | Ctrl | Alt | GUI |Space |Lower |Raise |Space | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP( \
+[_QWERTY] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
@@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP( \
+[_LOWER] = LAYOUT_ortho_4x12( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_PIPE, \
@@ -63,13 +62,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = KEYMAP( \
+[_RAISE] = LAYOUT_ortho_4x12( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_BSLS, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
-
+
/* Functions
* Note: Terminal uses Calculator shortcut, change your OS keyboard shortcut appropriately.
* ,-----------------------------------------------------------------------------------.
@@ -86,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | |||Fn||| Mode | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNC] = KEYMAP( \
+[_FUNC] = LAYOUT_ortho_4x12( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
_______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, _______, _______, KC_VOLU, \
_______, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, _______, KC_PSCR, KC_VOLD, \
diff --git a/keyboards/jj40/keymaps/waples/jj40.h b/keyboards/jj40/keymaps/waples/jj40.h
deleted file mode 100644
index a6162d9c08..0000000000
--- a/keyboards/jj40/keymaps/waples/jj40.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef KEYMAP_COMMON_H
-#define KEYMAP_COMMON_H
-
-#include "quantum.h"
-// #include "keycode.h"
-// #include "action.h"
-
-#define KEYMAP_GRID( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_MIT( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP_OFFSET( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \
- K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \
- K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \
-) \
-{ \
- { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \
- { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \
- { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
-}
-
-#define KEYMAP KEYMAP_GRID
-#define LAYOUT_ortho_4x12 LAYOUT_planck_grid
-
-#endif
diff --git a/keyboards/jj40/keymaps/waples/keymap.c b/keyboards/jj40/keymaps/waples/keymap.c
index a8f2f631a8..81416f9820 100644
--- a/keyboards/jj40/keymaps/waples/keymap.c
+++ b/keyboards/jj40/keymaps/waples/keymap.c
@@ -1,6 +1,4 @@
-#include "jj40.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -28,42 +26,42 @@ enum jj40_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = KEYMAP( \
+[_QWERTY] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SHFTENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
KC_PSCR, KC_BSPC, KC_LALT, _______, LEFTY, KC_LGUI, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
-[_DVORAK] = KEYMAP( \
+[_DVORAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
CTLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, SHFTENT, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, \
KC_PSCR, KC_LGUI, KC_LALT, KC_CAPS, LEFTY, KC_BSPC, KC_SPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
-[_GAME] = KEYMAP( \
+[_GAME] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, _______, _______, QWERTY, \
CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, _______, _______, _______, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, _______, _______, \
KC_LCTL, KC_1, KC_2, KC_3, LEFTY, KC_SPC, KC_BSPC, RIGHTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \
),
-[_LEFTY] = KEYMAP( \
+[_LEFTY] = LAYOUT_ortho_4x12( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
),
-[_RIGHTY] = KEYMAP( \
+[_RIGHTY] = LAYOUT_ortho_4x12( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, _______, KC_EQL, KC_MINS, KC_BSLS, KC_SLSH, _______, _______, \
_______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______,
_______, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______ \
),
-[_DUAL] = KEYMAP( \
+[_DUAL] = LAYOUT_ortho_4x12( \
RESET, _______, _______, _______, _______, QWERTY, GAME, _______, _______, _______, BL_BRTG, RESET, \
_______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, AG_NORM, AG_SWAP, _______, _______, _______, BL_TOGG, _______, \
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, TG_NKRO, _______, _______, _______, _______, _______, \
diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk
index 42b3d11551..4e6f626175 100644
--- a/keyboards/jj40/rules.mk
+++ b/keyboards/jj40/rules.mk
@@ -56,3 +56,5 @@ SRC = matrix.c i2c.c backlight.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
+
+LAYOUTS = ortho_4x12 planck_mit planck_grid
diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md
index 39cfc69ca0..4c208bcbe4 100644
--- a/keyboards/jj50/README.md
+++ b/keyboards/jj50/README.md
@@ -13,6 +13,8 @@ USB report options are supported.
Hardware Supported: JJ50 with the ATmega32a chip.
Hardware Availability: The JJ50 PCB is available from kprepublic on AliExpress and suchlike.
+This version by Wayne K Jones (github.com/WarmCatUK)
+
## Installing and Building
@@ -70,8 +72,10 @@ And flash the compiled hex file with `HIDBootFlash`. Simply put the board in fla
1. Try plugging the board in while pressing `Backspace` (`Key below the top right key`). This will force it to boot only the bootloader without loading the firmware. Once this is done, just reflash the board with the original firmware.
2. Sometimes USB hubs can act weird, so try connecting the board directly to your computer or plugging/unplugging the USB hub.
3. If you get an error such as "Resource Unavailable" when attemting to flash on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` for more info.
-4. I was occasionally finding that I wasn't flashing changes that I was making to my keymap. If that happens, simply force rebuild by making with:
+4. I was occasionally finding that I wasn't flashing changes that I was making to my keymap. If that happens, remove the previous build and simply force rebuild by making with:
```
+$ rm jj50_default.hex
+$ make -B jj50:default
$ make -B jj50:default:program
```
diff --git a/keyboards/jj50/backlight.c b/keyboards/jj50/backlight.c
new file mode 100644
index 0000000000..079c410ff5
--- /dev/null
+++ b/keyboards/jj50/backlight.c
@@ -0,0 +1,212 @@
+/**
+ * Backlighting code for PS2AVRGB boards (ATMEGA32A)
+ * Kenneth A. (github.com/krusli | krusli.me)
+ */
+
+#include "backlight.h"
+#include "quantum.h"
+
+#include <avr/pgmspace.h>
+#include <avr/interrupt.h>
+
+#include "backlight_custom.h"
+#include "breathing_custom.h"
+
+// DEBUG
+#include <stdlib.h>
+#include <stdio.h>
+
+// Port D: digital pins of the AVR chipset
+#define NUMLOCK_PORT (1 << 1) // 1st pin of Port D (digital)
+#define CAPSLOCK_PORT (1 << 2) // 2nd pin
+#define BACKLIGHT_PORT (1 << 4) // 4th pin
+#define SCROLLLOCK_PORT (1 << 6) // 6th pin
+
+#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64
+#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default
+
+#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask
+
+#define PWM_MAX 0xFF
+#define TIMER_TOP 255 // 8 bit PWM
+
+extern backlight_config_t backlight_config;
+
+/**
+ * References
+ * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation
+ * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b
+ * Timers: http://www.avrbeginners.net/architecture/timers/timers.html
+ * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/
+ * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware
+ */
+
+// @Override
+// turn LEDs on and off depending on USB caps/num/scroll lock states.
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+ // turn on
+ DDRD |= NUMLOCK_PORT;
+ PORTD |= NUMLOCK_PORT;
+ } else {
+ // turn off
+ DDRD &= ~NUMLOCK_PORT;
+ PORTD &= ~NUMLOCK_PORT;
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ DDRD |= CAPSLOCK_PORT;
+ PORTD |= CAPSLOCK_PORT;
+ } else {
+ DDRD &= ~CAPSLOCK_PORT;
+ PORTD &= ~CAPSLOCK_PORT;
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+ DDRD |= SCROLLLOCK_PORT;
+ PORTD |= SCROLLLOCK_PORT;
+ } else {
+ DDRD &= ~SCROLLLOCK_PORT;
+ PORTD &= ~SCROLLLOCK_PORT;
+ }
+}
+
+#ifdef BACKLIGHT_ENABLE
+
+// sets up Timer 1 for 8-bit PWM
+void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE
+ // default 8 bit mode
+ TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH
+ TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW
+
+ // clear output compare value A
+ // outb(OCR1AH, 0);
+ // outb(OCR1AL, 0);
+
+ // clear output comparator registers for B
+ OCR1BH = 0; // outb(OCR1BH, 0);
+ OCR1BL = 0; // outb(OCR1BL, 0);
+}
+
+bool is_init = false;
+void timer1Init(void) {
+ // timer1SetPrescaler(TIMER1PRESCALE)
+ // set to DIV/64
+ (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE;
+
+ // reset TCNT1
+ TCNT1H = 0; // outb(TCNT1H, 0);
+ TCNT1L = 0; // outb(TCNT1L, 0);
+
+ // TOIE1: Timer Overflow Interrupt Enable (Timer 1);
+ TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1);
+
+ is_init = true;
+}
+
+void timer1UnInit(void) {
+ // set prescaler back to NONE
+ (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP
+
+ // disable timer overflow interrupt
+ TIMSK &= ~_BV(TOIE1); // overflow bit?
+
+ setPWM(0);
+
+ is_init = false;
+}
+
+
+// handle TCNT1 overflow
+//! Interrupt handler for tcnt1 overflow interrupt
+ISR(TIMER1_OVF_vect, ISR_NOBLOCK)
+{
+ // sei();
+ // handle breathing here
+ #ifdef BACKLIGHT_BREATHING
+ if (is_breathing()) {
+ custom_breathing_handler();
+ }
+ #endif
+
+ // TODO call user defined function
+}
+
+// enable timer 1 PWM
+// timer1PWMBOn()
+void timer1PWMBEnable(void) {
+ // turn on channel B (OC1B) PWM output
+ // set OC1B as non-inverted PWM
+ TCCR1A |= _BV(COM1B1);
+ TCCR1A &= ~_BV(COM1B0);
+}
+
+// disable timer 1 PWM
+// timer1PWMBOff()
+void timer1PWMBDisable(void) {
+ TCCR1A &= ~_BV(COM1B1);
+ TCCR1A &= ~_BV(COM1B0);
+}
+
+void enableBacklight(void) {
+ DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
+ PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
+}
+
+void disableBacklight(void) {
+ // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
+ PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
+}
+
+void startPWM(void) {
+ timer1Init();
+ timer1PWMBEnable();
+ enableBacklight();
+}
+
+void stopPWM(void) {
+ timer1UnInit();
+ disableBacklight();
+ timer1PWMBDisable();
+}
+
+void b_led_init_ports(void) {
+ /* turn backlight on/off depending on user preference */
+ #if BACKLIGHT_ON_STATE == 0
+ // DDRx register: sets the direction of Port D
+ // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
+ PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
+ #else
+ DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
+ PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
+ #endif
+
+ timer1PWMSetup();
+ startPWM();
+
+ #ifdef BACKLIGHT_BREATHING
+ breathing_enable();
+ #endif
+}
+
+void b_led_set(uint8_t level) {
+ if (level > BACKLIGHT_LEVELS) {
+ level = BACKLIGHT_LEVELS;
+ }
+
+ setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS));
+}
+
+// called every matrix scan
+void b_led_task(void) {
+ // do nothing for now
+}
+
+void setPWM(uint16_t xValue) {
+ if (xValue > TIMER_TOP) {
+ xValue = TIMER_TOP;
+ }
+ OCR1B = xValue; // timer1PWMBSet(xValue);
+}
+
+#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/jj50/backlight_custom.h b/keyboards/jj50/backlight_custom.h
new file mode 100644
index 0000000000..7210be840e
--- /dev/null
+++ b/keyboards/jj50/backlight_custom.h
@@ -0,0 +1,15 @@
+/**
+ * Backlighting code for PS2AVRGB boards (ATMEGA32A)
+ * Kenneth A. (github.com/krusli | krusli.me)
+ */
+
+#ifndef BACKLIGHT_CUSTOM_H
+#define BACKLIGHT_CUSTOM_H
+
+#include <avr/pgmspace.h>
+void b_led_init_ports(void);
+void b_led_set(uint8_t level);
+void b_led_task(void);
+void setPWM(uint16_t xValue);
+
+#endif // BACKLIGHT_CUSTOM_H
diff --git a/keyboards/jj50/breathing_custom.h b/keyboards/jj50/breathing_custom.h
new file mode 100644
index 0000000000..71416b1b45
--- /dev/null
+++ b/keyboards/jj50/breathing_custom.h
@@ -0,0 +1,140 @@
+/**
+ * Breathing effect code for PS2AVRGB boards (ATMEGA32A)
+ * Works in conjunction with `backlight.c`.
+ *
+ * Code adapted from `quantum.c` to register with the existing TIMER1 overflow
+ * handler in `backlight.c` instead of setting up its own timer.
+ * Kenneth A. (github.com/krusli | krusli.me)
+ */
+
+#ifdef BACKLIGHT_ENABLE
+#ifdef BACKLIGHT_BREATHING
+
+#include "backlight_custom.h"
+
+#ifndef BREATHING_PERIOD
+#define BREATHING_PERIOD 6
+#endif
+
+#define breathing_min() do {breathing_counter = 0;} while (0)
+#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0)
+
+// TODO make this share code with quantum.c
+
+#define BREATHING_NO_HALT 0
+#define BREATHING_HALT_OFF 1
+#define BREATHING_HALT_ON 2
+#define BREATHING_STEPS 128
+
+static uint8_t breathing_period = BREATHING_PERIOD;
+static uint8_t breathing_halt = BREATHING_NO_HALT;
+static uint16_t breathing_counter = 0;
+
+static bool breathing = false;
+
+bool is_breathing(void) {
+ return breathing;
+}
+
+// See http://jared.geek.nz/2013/feb/linear-led-pwm
+static uint16_t cie_lightness(uint16_t v) {
+ if (v <= 5243) // if below 8% of max
+ return v / 9; // same as dividing by 900%
+ else {
+ uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
+ // to get a useful result with integer division, we shift left in the expression above
+ // and revert what we've done again after squaring.
+ y = y * y * y >> 8;
+ if (y > 0xFFFFUL) // prevent overflow
+ return 0xFFFFU;
+ else
+ return (uint16_t) y;
+ }
+}
+
+void breathing_enable(void) {
+ breathing = true;
+ breathing_counter = 0;
+ breathing_halt = BREATHING_NO_HALT;
+ // interrupt already registered
+}
+
+void breathing_pulse(void) {
+ if (get_backlight_level() == 0)
+ breathing_min();
+ else
+ breathing_max();
+ breathing_halt = BREATHING_HALT_ON;
+ // breathing_interrupt_enable();
+ breathing = true;
+}
+
+void breathing_disable(void) {
+ breathing = false;
+ // backlight_set(get_backlight_level());
+ b_led_set(get_backlight_level()); // custom implementation of backlight_set()
+}
+
+void breathing_self_disable(void)
+{
+ if (get_backlight_level() == 0)
+ breathing_halt = BREATHING_HALT_OFF;
+ else
+ breathing_halt = BREATHING_HALT_ON;
+}
+
+void breathing_toggle(void) {
+ if (is_breathing())
+ breathing_disable();
+ else
+ breathing_enable();
+}
+
+void breathing_period_set(uint8_t value)
+{
+ if (!value)
+ value = 1;
+ breathing_period = value;
+}
+
+void breathing_period_default(void) {
+ breathing_period_set(BREATHING_PERIOD);
+}
+
+void breathing_period_inc(void)
+{
+ breathing_period_set(breathing_period+1);
+}
+
+void breathing_period_dec(void)
+{
+ breathing_period_set(breathing_period-1);
+}
+
+/* To generate breathing curve in python:
+ * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)]
+ */
+static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+// Use this before the cie_lightness function.
+static inline uint16_t scale_backlight(uint16_t v) {
+ return v / BACKLIGHT_LEVELS * get_backlight_level();
+}
+
+void custom_breathing_handler(void) {
+ uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS;
+ // resetting after one period to prevent ugly reset at overflow.
+ breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
+ uint8_t index = breathing_counter / interval % BREATHING_STEPS;
+
+ if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) ||
+ ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1)))
+ {
+ // breathing_interrupt_disable();
+ }
+
+ setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U)));
+}
+
+#endif // BACKLIGHT_BREATHING
+#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h
index 240732594d..6aa7628837 100644
--- a/keyboards/jj50/config.h
+++ b/keyboards/jj50/config.h
@@ -35,11 +35,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 15
#define DIODE_DIRECTION ROW2COL
-#define BACKLIGHT_PIN D4
-#define BACKLIGHT_LEVELS 3
+//#define BACKLIGHT_PIN D4
+#define BACKLIGHT_LEVELS 12
-//#define RGB_DI_PIN C0
-#define RGBLED_NUM 5
+#define RGB_DI_PIN E2
+#define RGBLED_NUM 12
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 15
diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c
index a75b12c4ea..d4a70f68d0 100644
--- a/keyboards/jj50/jj50.c
+++ b/keyboards/jj50/jj50.c
@@ -16,7 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "jj50.h"
-#include "rgblight.h"
#include <avr/pgmspace.h>
@@ -24,22 +23,72 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c.h"
#include "quantum.h"
+#include "backlight.h"
+#include "backlight_custom.h"
+
+// for keyboard subdirectory level init functions
+// @Override
+void matrix_init_kb(void) {
+ // call user level keymaps, if any
+ matrix_init_user();
+}
+
+#ifdef BACKLIGHT_ENABLE
+/// Overrides functions in `quantum.c`
+void backlight_init_ports(void) {
+ b_led_init_ports();
+}
+
+void backlight_task(void) {
+ b_led_task();
+}
+
+void backlight_set(uint8_t level) {
+ b_led_set(level);
+}
+#endif
+
+#ifdef RGBLIGHT_ENABLE
extern rgblight_config_t rgblight_config;
+// custom RGB driver
void rgblight_set(void) {
if (!rgblight_config.enable) {
- for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ for (uint8_t i=0; i<RGBLED_NUM; i++) {
led[i].r = 0;
led[i].g = 0;
led[i].b = 0;
}
}
-
+
i2c_init();
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
}
-__attribute__ ((weak))
-void matrix_scan_user(void) {
+bool rgb_init = false;
+
+void matrix_scan_kb(void) {
+ // if LEDs were previously on before poweroff, turn them back on
+ if (rgb_init == false && rgblight_config.enable) {
+ i2c_init();
+ i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ rgb_init = true;
+ }
+
rgblight_task();
-}
+#else
+ void matrix_scan_kb(void) {
+#endif
+ matrix_scan_user();
+ /* Nothing else for now. */
+ }
+
+ __attribute__((weak)) // overridable
+ void matrix_init_user(void) {
+
+ }
+
+ __attribute__((weak)) // overridable
+ void matrix_scan_user(void) {
+
+ }
diff --git a/keyboards/jj50/jj50.h b/keyboards/jj50/jj50.h
index 09664f77f6..f0a2efddda 100644
--- a/keyboards/jj50/jj50.h
+++ b/keyboards/jj50/jj50.h
@@ -20,11 +20,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KEYMAP_COMMON_H
#define KEYMAP_COMMON_H
+#include "quantum.h"
#include "quantum_keycodes.h"
#include "keycode.h"
#include "action.h"
-#define KEYMAP( \
+void matrix_init_user(void);
+
+#define LAYOUT( \
K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \
K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \
K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \
diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c
index 8a32efd0c0..9d753eb8e6 100644
--- a/keyboards/jj50/keymaps/default/keymap.c
+++ b/keyboards/jj50/keymaps/default/keymap.c
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public LicensezZZ
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "jj50.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
#include "rgblight.h"
@@ -25,9 +25,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define _DEFLT 0
#define _RAISE 1
#define _LOWER 2
+#define _FN 3
+
+enum custom_keycodes {
+ P_MACRO = SAFE_RANGE
+};
+
+// GBP £ Macro (sends alt 156 - windows users only)
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch(keycode) {
+ case P_MACRO:
+ SEND_STRING(SS_DOWN(X_LALT));
+ SEND_STRING(SS_TAP(X_KP_1));
+ SEND_STRING(SS_TAP(X_KP_5));
+ SEND_STRING(SS_TAP(X_KP_6));
+ SEND_STRING(SS_UP(X_LALT));
+ return false; break;
+ }
+ }
+ return true;
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
+
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |
@@ -36,20 +57,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | (Hold for shift / tap for enter)
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * | _FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DEFLT] = KEYMAP( \
+ [_DEFLT] = LAYOUT( \
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT),\
- BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC,KC_SPC, MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ MO(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
-
-
+
/* Raise
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
@@ -63,15 +83,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+
+ [_RAISE] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
- RESET, BL_INC, RGB_SAI, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \
- _______, BL_DEC, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \
+ RESET, BL_INC, RGB_SAI, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \
+ _______, BL_DEC, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
-
-
+
/* Lower
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
@@ -85,12 +105,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+
+ [_LOWER] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
- RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
- )
+ BL_STEP, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+ ),
+ /* Fn
+ * ,-----------------------------------------------------------------------------------.
+ * | | | £ | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | |BL_OFF|BL_DEC|BL_INC|BL_ON |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_FN] = LAYOUT( \
+ _______, _______, P_MACRO, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, BL_OFF, BL_DEC, BL_INC, BL_ON \
+ )
};
diff --git a/keyboards/jj50/matrix.c b/keyboards/jj50/matrix.c
index 8f9c67fe47..95c6057e7c 100644
--- a/keyboards/jj50/matrix.c
+++ b/keyboards/jj50/matrix.c
@@ -1,5 +1,6 @@
/*
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2018 by Wayne K Jones <github.com/WarmCatUK>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,17 +37,20 @@ void matrix_init(void) {
// all inputs for columns
DDRA = 0x00;
DDRC &= ~(0x111111<<2);
- DDRD &= ~(1<<PIND7);
+ //----> DDRD &= ~(1<<PIND7);
+ // Port D not used on this keyboard
// all columns are pulled-up
PORTA = 0xFF;
PORTC |= (0b111111<<2);
//PORTD |= (1<<PIND7);
+ // Port D not used on this keyboard
// initialize matrix state: all keys off
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
matrix[row] = 0x00;
matrix_debouncing[row] = 0x00;
}
+ matrix_init_quantum(); // missing from original port by Luiz
}
void matrix_set_row_status(uint8_t row) {
@@ -72,9 +76,6 @@ uint8_t matrix_scan(void) {
) | (
// cols 8..13, PORTC 7 -> 0
bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
);
if (matrix_debouncing[row] != cols) {
@@ -92,8 +93,8 @@ uint8_t matrix_scan(void) {
}
}
}
-
- matrix_scan_user();
+ matrix_scan_quantum(); // also missing in original PS2AVRGB implementation
+ //matrix_scan_user();
return 1;
}
diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk
index 1b7826e505..13e8131485 100644
--- a/keyboards/jj50/rules.mk
+++ b/keyboards/jj50/rules.mk
@@ -36,16 +36,30 @@ BOOTMAGIC_ENABLE = yes
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
-COMMAND_ENABLE = no
+COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
+NKRO_ENABLE = no
+# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-OPT_DEFS = -DDEBUG_LEVEL=0
+
+DISABLE_WS2812 = no
+
+KEY_LOCK_ENABLE = yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+
+#OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = matrix.c i2c.c backlight.c
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
# programming options
PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
diff --git a/keyboards/jj50/usbconfig.h b/keyboards/jj50/usbconfig.h
index d2d848fcdc..59f29d04dd 100644
--- a/keyboards/jj50/usbconfig.h
+++ b/keyboards/jj50/usbconfig.h
@@ -241,8 +241,8 @@ section at the end of this file).
#define USB_CFG_DEVICE_VERSION 0x00, 0x02
/* Version number of the device: Minor number first, then major number.
*/
-#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
-#define USB_CFG_VENDOR_NAME_LEN 13
+#define USB_CFG_VENDOR_NAME 'K', 'P', 'R', 'e', 'p', 'u', 'b', 'l', 'i', 'c'
+#define USB_CFG_VENDOR_NAME_LEN 10
/* These two values define the vendor name returned by the USB device. The name
* must be given as a list of characters under single quotes. The characters
* are interpreted as Unicode (UTF-16) entities.
@@ -251,8 +251,8 @@ section at the end of this file).
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
* details.
*/
-#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
-#define USB_CFG_DEVICE_NAME_LEN 8
+#define USB_CFG_DEVICE_NAME 'J','J','5','0',' ','K','e','y','b','o','a','r','d'
+#define USB_CFG_DEVICE_NAME_LEN 13
/* Same as above for the device name. If you don't want a device name, undefine
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
* you use a shared VID/PID.
diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c
index 3857140b3d..d329bea4c0 100644
--- a/keyboards/lets_split/keymaps/DE_simple/keymap.c
+++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c
@@ -1,6 +1,4 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#include "keymap_german.h"
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c
index bef896b589..5eccbcf1ac 100644
--- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c
+++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c
@@ -1,11 +1,5 @@
-#include "lets_split.h"
-#include "bootloader.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#include "LUFA/Drivers/Peripheral/TWI.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
#ifdef SSD1306OLED
#include "ssd1306.h"
#endif
diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c
index b1733eaf7e..b986ab780b 100644
--- a/keyboards/lets_split/keymaps/adam/keymap.c
+++ b/keyboards/lets_split/keymaps/adam/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c
index 60c864d7d9..9c3eb94752 100644
--- a/keyboards/lets_split/keymaps/cpeters1982/keymap.c
+++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c
index fc0fe9c7c9..f782781843 100644
--- a/keyboards/lets_split/keymaps/default/keymap.c
+++ b/keyboards/lets_split/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -40,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = LAYOUT(
+[_QWERTY] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -58,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = LAYOUT( \
+[_COLEMAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -76,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = LAYOUT( \
+[_DVORAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -94,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = LAYOUT( \
+[_LOWER] = LAYOUT_ortho_4x12( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
@@ -112,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = LAYOUT( \
+[_RAISE] = LAYOUT_ortho_4x12( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
@@ -130,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = LAYOUT( \
+[_ADJUST] = LAYOUT_ortho_4x12( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/lets_split/keymaps/dlaroe/keymap.c b/keyboards/lets_split/keymaps/dlaroe/keymap.c
index a51aad73ad..b2282e0fe8 100644
--- a/keyboards/lets_split/keymaps/dlaroe/keymap.c
+++ b/keyboards/lets_split/keymaps/dlaroe/keymap.c
@@ -4,12 +4,7 @@
// Also, I like me some numpad
-#include "lets_split.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c
index c56cb7b6da..37053a8e4b 100644
--- a/keyboards/lets_split/keymaps/fabian/keymap.c
+++ b/keyboards/lets_split/keymaps/fabian/keymap.c
@@ -14,9 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/heartrobotninja/keymap.c b/keyboards/lets_split/keymaps/heartrobotninja/keymap.c
index 9fee027863..3a7ef9db39 100644
--- a/keyboards/lets_split/keymaps/heartrobotninja/keymap.c
+++ b/keyboards/lets_split/keymaps/heartrobotninja/keymap.c
@@ -1,8 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "action_util.h"
-#include "debug.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/henxing/keymap.c b/keyboards/lets_split/keymaps/henxing/keymap.c
index c47180586f..aab75dc543 100644
--- a/keyboards/lets_split/keymaps/henxing/keymap.c
+++ b/keyboards/lets_split/keymaps/henxing/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c
index 4a18a6e263..53b7a2c7fd 100644
--- a/keyboards/lets_split/keymaps/khord/keymap.c
+++ b/keyboards/lets_split/keymaps/khord/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/kris/keymap.c b/keyboards/lets_split/keymaps/kris/keymap.c
index 75533bf881..34d2e86da0 100644
--- a/keyboards/lets_split/keymaps/kris/keymap.c
+++ b/keyboards/lets_split/keymaps/kris/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/krusli/keymap.c b/keyboards/lets_split/keymaps/krusli/keymap.c
index 177aa71683..9b49bab3b4 100644
--- a/keyboards/lets_split/keymaps/krusli/keymap.c
+++ b/keyboards/lets_split/keymaps/krusli/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
@@ -43,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Numpad| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = KEYMAP( \
+[_QWERTY] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -61,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = KEYMAP( \
+[_COLEMAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -79,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = KEYMAP( \
+[_DVORAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -97,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = KEYMAP( \
+[_LOWER] = LAYOUT_ortho_4x12( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
@@ -115,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = KEYMAP( \
+[_RAISE] = LAYOUT_ortho_4x12( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \
@@ -133,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Qwerty| 0 | . | . |Enter |Enter | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_NUMPAD] = KEYMAP( \
+[_NUMPAD] = LAYOUT_ortho_4x12( \
KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \
KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \
_______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \
@@ -151,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = KEYMAP( \
+[_ADJUST] = LAYOUT_ortho_4x12( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/lets_split/keymaps/mbsurfer/keymap.c b/keyboards/lets_split/keymaps/mbsurfer/keymap.c
index e9e6d6ef65..5f6589337f 100644
--- a/keyboards/lets_split/keymaps/mbsurfer/keymap.c
+++ b/keyboards/lets_split/keymaps/mbsurfer/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern rgblight_config_t rgblight_config;
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c
index 47f2ff2f89..2c61cce3bc 100644
--- a/keyboards/lets_split/keymaps/mjt/keymap.c
+++ b/keyboards/lets_split/keymaps/mjt/keymap.c
@@ -1,9 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/normacos/keymap.c b/keyboards/lets_split/keymaps/normacos/keymap.c
index 63c39f1dd0..9868fab6ec 100644
--- a/keyboards/lets_split/keymaps/normacos/keymap.c
+++ b/keyboards/lets_split/keymaps/normacos/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
@@ -58,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right|
* `-----------------------------------------' `-----------------------------------------'
*/
-[_NORMAN] = KEYMAP( \
+[_NORMAN] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSPC, \
CTL_ESC, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
@@ -76,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Lock | Home | End | Alt | Lower| GUI | | . | Raise| 0 | Spot |Chrome| |
* `-----------------------------------------' `-----------------------------------------'
*/
-[_LOWER] = KEYMAP( \
+[_LOWER] = LAYOUT_ortho_4x12( \
_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PEQL, _______, \
_______, KC_F5, KC_F6, KC_F8, KC_F9, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_DEL, \
_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PSLS, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, \
@@ -94,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Lock | Home | End | Alt | Lower| GUI | | Space| Raise| Left | Down | Up | Right|
* `-----------------------------------------' `-----------------------------------------'
*/
-[_RAISE] = KEYMAP( \
+[_RAISE] = LAYOUT_ortho_4x12( \
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
_______, SH_SUDO, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \
_______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______, \
@@ -112,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | Lower| | | | Raise| | | | |
* `-----------------------------------------' `-----------------------------------------'
*/
-[_ADJUST] = KEYMAP( \
+[_ADJUST] = LAYOUT_ortho_4x12( \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, XXXXXXX, NORMAN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c
index fca96bf39a..d789b7a8be 100644
--- a/keyboards/lets_split/keymaps/piemod/keymap.c
+++ b/keyboards/lets_split/keymaps/piemod/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/pitty/keymap.c b/keyboards/lets_split/keymaps/pitty/keymap.c
index 35b558bcfb..0fd4c1384f 100644
--- a/keyboards/lets_split/keymaps/pitty/keymap.c
+++ b/keyboards/lets_split/keymaps/pitty/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
diff --git a/keyboards/lets_split/keymaps/poker/keymap.c b/keyboards/lets_split/keymaps/poker/keymap.c
index a07143d585..cce0ca4741 100644
--- a/keyboards/lets_split/keymaps/poker/keymap.c
+++ b/keyboards/lets_split/keymaps/poker/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c
index f4f44c144f..090cf78b7c 100644
--- a/keyboards/lets_split/keymaps/smt/keymap.c
+++ b/keyboards/lets_split/keymaps/smt/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/waples/keymap.c b/keyboards/lets_split/keymaps/waples/keymap.c
index 79f2d91cdd..7b25bc51f5 100644
--- a/keyboards/lets_split/keymaps/waples/keymap.c
+++ b/keyboards/lets_split/keymaps/waples/keymap.c
@@ -1,9 +1,8 @@
// Waples layout for Let's Split (rev2)
// Made changes from the default
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c
index 07074759a3..c032b865aa 100755
--- a/keyboards/lets_split/keymaps/xk/keymap.c
+++ b/keyboards/lets_split/keymaps/xk/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/keymaps/xyverz/keymap.c b/keyboards/lets_split/keymaps/xyverz/keymap.c
index 9ed58b55f6..838f579835 100644
--- a/keyboards/lets_split/keymaps/xyverz/keymap.c
+++ b/keyboards/lets_split/keymaps/xyverz/keymap.c
@@ -1,6 +1,5 @@
-#include "lets_split.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
+
extern keymap_config_t keymap_config;
diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h
index 7896e4467e..1765857475 100644
--- a/keyboards/lets_split/lets_split.h
+++ b/keyboards/lets_split/lets_split.h
@@ -27,5 +27,6 @@
)
#define KC_LAYOUT_ortho_4x12 LAYOUT_kc
+#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
#endif
diff --git a/keyboards/levinson/keymaps/default/keymap.c b/keyboards/levinson/keymaps/default/keymap.c
index aa5143d67d..dac8068a42 100644
--- a/keyboards/levinson/keymaps/default/keymap.c
+++ b/keyboards/levinson/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
-#include "levinson.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -41,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = LAYOUT( \
+[_QWERTY] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -59,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = LAYOUT( \
+[_COLEMAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -77,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = LAYOUT( \
+[_DVORAK] = LAYOUT_ortho_4x12( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -95,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = LAYOUT( \
+[_LOWER] = LAYOUT_ortho_4x12( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
@@ -113,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = LAYOUT( \
+[_RAISE] = LAYOUT_ortho_4x12( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
@@ -131,7 +129,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = LAYOUT( \
+[_ADJUST] = LAYOUT_ortho_4x12( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/levinson/keymaps/treadwell/keymap.c b/keyboards/levinson/keymaps/treadwell/keymap.c
index a0d4f4913d..10d7d30355 100644
--- a/keyboards/levinson/keymaps/treadwell/keymap.c
+++ b/keyboards/levinson/keymaps/treadwell/keymap.c
@@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = LAYOUT( \
+ [_ADJUST] = LAYOUT_ortho_4x12( \
_______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/levinson/keymaps/valgrahf/keymap.c b/keyboards/levinson/keymaps/valgrahf/keymap.c
index 5956ad27b0..89c1864423 100644
--- a/keyboards/levinson/keymaps/valgrahf/keymap.c
+++ b/keyboards/levinson/keymaps/valgrahf/keymap.c
@@ -1,6 +1,4 @@
-#include "levinson.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -28,7 +26,7 @@ extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = KC_KEYMAP(
+ [_BASE] = KC_LAYOUT_ortho_4x12(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
TAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -40,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
- [_FN1] = KC_KEYMAP(
+ [_FN1] = KC_LAYOUT_ortho_4x12(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
GRV, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
- [_FN2] = KC_KEYMAP(
+ [_FN2] = KC_LAYOUT_ortho_4x12(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
@@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----| |----+----+----+----+----+----|
,RHUD,RSAD,RVAD, , , , , , , , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,RTOG,RMOD, , , , , , , , ,
+ ,RTOG,RMOD, , , , , , , , ,
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
diff --git a/keyboards/levinson/levinson.h b/keyboards/levinson/levinson.h
index 279a65c517..b952ad3650 100644
--- a/keyboards/levinson/levinson.h
+++ b/keyboards/levinson/levinson.h
@@ -24,5 +24,6 @@
)
#define KC_LAYOUT_ortho_4x12 LAYOUT_kc
+#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
#endif
diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h
index 6c82b2c74f..cf3326d7bf 100644
--- a/keyboards/mt40/config.h
+++ b/keyboards/mt40/config.h
@@ -35,17 +35,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 8
#define MATRIX_COLS 15
-#define RGB_DI_PIN C0
-#define RGBLED_NUM 12
-#define RGBLIGHT_ANIMATIONS
-
-#define RGBLIGHT_HUE_STEP 12
-#define RGBLIGHT_SAT_STEP 15
-#define RGBLIGHT_VAL_STEP 18
#define NO_UART 1
-#define TAPPING_TERM 200
+#define RGB_DI_PIN C0
+#define RGBLED_NUM 12
+#define RGBLIGHT_ANIMATIONS
/*
* Keyboard Matrix Assignments
diff --git a/keyboards/mt40/keymaps/default/config.h b/keyboards/mt40/keymaps/default/config.h
new file mode 100644
index 0000000000..9f9a9fc107
--- /dev/null
+++ b/keyboards/mt40/keymaps/default/config.h
@@ -0,0 +1,11 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#define TAPPING_TERM 200
+
+
+#define RGBLIGHT_HUE_STEP 12
+#define RGBLIGHT_SAT_STEP 15
+#define RGBLIGHT_VAL_STEP 18
+
+#endif
diff --git a/keyboards/mt40/keymaps/default/keymap.c b/keyboards/mt40/keymaps/default/keymap.c
index 2da5dd6458..193e548f9e 100644
--- a/keyboards/mt40/keymaps/default/keymap.c
+++ b/keyboards/mt40/keymaps/default/keymap.c
@@ -13,9 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "mt40.h"
-#include "action_layer.h"
-#include "rgblight.h"
+#include QMK_KEYBOARD_H
+
#define _______ KC_TRNS
#define OOOOOOO KC_TRNS
@@ -30,7 +29,7 @@
#define C_ENT MT(MOD_RCTL, KC_ENT)
-/*
+/*
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -42,31 +41,31 @@
* `-----------------------------------------------------------------------------------'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = KEYMAP(
+ [0] = LAYOUT_ortho_4x12(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
C_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, C_ENT, \
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \
C_LCTL, C_LGUI, MOD_LALT, MO(3), MO(1), KC_SPC, KC_SPC, MO(2), MO(4), MOD_RALT, C_RGUI, C_RCTL),
- [1] = KEYMAP(
+ [1] = LAYOUT_ortho_4x12(
_______, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, \
_______, KC_F5, KC_F6, KC_F7, KC_F8, RGB_VAD, RGB_VAI, KC_P4, KC_P5, KC_P6, KC_PAST, _______, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, BL_TOGG, BL_INC, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP, \
_______, _______, _______, _______, OOOOOOO, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN),
- [2] = KEYMAP(
+ [2] = LAYOUT_ortho_4x12(
_______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_EQL, KC_LBRC, KC_RBRC, KC_NUBS, \
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, OOOOOOO, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END),
- [3] = KEYMAP(
+ [3] = LAYOUT_ortho_4x12(
_______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL, \
_______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, \
_______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______),
- [4] = KEYMAP(
+ [4] = LAYOUT_ortho_4x12(
_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, \
KC_PSCR, KC_INS, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, \
KC_CAPS, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, \
@@ -75,10 +74,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_MOMENTARY(1),
- [1] = ACTION_LAYER_MOMENTARY(2),
- [2] = ACTION_LAYER_MOMENTARY(3),
- [3] = ACTION_LAYER_MOMENTARY(4),
-};
+
diff --git a/keyboards/mt40/matrix.c b/keyboards/mt40/matrix.c
index 140026013f..d75fcc221a 100644
--- a/keyboards/mt40/matrix.c
+++ b/keyboards/mt40/matrix.c
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <util/delay.h>
#include "matrix.h"
+#include "config.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
@@ -29,6 +30,26 @@ static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+
+
void matrix_init(void) {
// all outputs for rows high
DDRB = 0xFF;
@@ -47,6 +68,7 @@ void matrix_init(void) {
matrix[row] = 0x00;
matrix_debouncing[row] = 0x00;
}
+ matrix_init_kb();
}
void matrix_set_row_status(uint8_t row) {
@@ -93,7 +115,7 @@ uint8_t matrix_scan(void) {
}
}
- matrix_scan_user();
+ matrix_scan_kb();
return 1;
}
diff --git a/keyboards/mt40/mt40.c b/keyboards/mt40/mt40.c
index 0e7a30d99f..555689f872 100644
--- a/keyboards/mt40/mt40.c
+++ b/keyboards/mt40/mt40.c
@@ -38,6 +38,7 @@ void rgblight_set(void) {
}
__attribute__ ((weak))
-void matrix_scan_user(void) {
+void matrix_scan_kb(void) {
rgblight_task();
+ matrix_init_user();
}
diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h
index 18cefd827b..23a3d3c2bd 100644
--- a/keyboards/mt40/mt40.h
+++ b/keyboards/mt40/mt40.h
@@ -16,9 +16,8 @@
#ifndef MT40_H
#define MT40_H
-#include "quantum_keycodes.h"
-#include "keycode.h"
-#include "action.h"
+#include "quantum.h"
+
// This a shortcut to help you visually see your layout.
// The following is an example using the Planck MIT layout
@@ -40,48 +39,24 @@
{ KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \
}
-/* #define KC_KEYMAP( \ */
-/* k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ */
-/* k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ */
-/* k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ */
-/* k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ */
-/* ) \ */
-/* { \ */
-/* { KC_##k31, KC_##k32, KC_##k33, KC_NO, KC_##k34, KC_##k35, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k37, KC_NO, KC_NO, KC_NO, KC_NO }, \ */
-/* { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k2a, KC_NO, KC_NO, KC_NO }, \ */
-/* { KC_##k30, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k1b, KC_##k1a, KC_NO, KC_NO, KC_NO }, \ */
-/* { KC_##k10, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k0a, KC_NO, KC_NO, KC_NO }, \ */
-/* { KC_##k00, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k0b }, \ */
-/* { KC_NO, KC_NO, KC_##k06, KC_##k16, KC_##k26, KC_##k36, KC_##k38, KC_##k3a, KC_##k17, KC_##k07, KC_NO, KC_NO, KC_##k3b, KC_##k39, KC_##k27 } \ */
-/* { KC_NO, KC_NO, KC_##k09, KC_##k19, KC_##k29, KC_NO, KC_NO, KC_##k2b, KC_##k18, KC_##k08, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k28 } \ */
-/* } */
+#define KC_KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+ ) \
+ KEYMAP( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
+ )
+
+#define LAYOUT KEYMAP
+#define LAYOUT_ortho_4x12 KEYMAP
+#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
+#define LAYOUT_kc_ortho_4x12 KC_KEYMAP
-/* #define FR_A KC_A */
-/* #define FR_B KC_B */
-/* #define FR_C KC_C */
-/* #define FR_D KC_D */
-/* #define FR_E KC_E */
-/* #define FR_F KC_F */
-/* #define FR_G KC_G */
-/* #define FR_H KC_H */
-/* #define FR_I KC_I */
-/* #define FR_J KC_J */
-/* #define FR_K KC_K */
-/* #define FR_L KC_L */
-/* #define FR_M KC_M */
-/* #define FR_N KC_N */
-/* #define FR_O KC_O */
-/* #define FR_P KC_P */
-/* #define FR_Q KC_Q */
-/* #define FR_R KC_R */
-/* #define FR_S KC_S */
-/* #define FR_T KC_T */
-/* #define FR_U KC_U */
-/* #define FR_V KC_V */
-/* #define FR_W KC_W */
-/* #define FR_X KC_X */
-/* #define FR_Y KC_Y */
-/* #define FR_Z KC_Z */
#endif
diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk
index 9d230d2388..e7dc061eca 100644
--- a/keyboards/mt40/rules.mk
+++ b/keyboards/mt40/rules.mk
@@ -11,7 +11,7 @@ F_CPU = 12000000
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
+# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = bootloadHID
@@ -39,3 +39,6 @@ SRC = matrix.c i2c.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
+
+LAYOUTS = ortho_4x12 planck_mit planck_grid
+LAYOUTS_HAS_RGB = no
diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c
index 39aa01090a..778a2b9a60 100644
--- a/keyboards/niu_mini/keymaps/default/keymap.c
+++ b/keyboards/niu_mini/keymaps/default/keymap.c
@@ -2,40 +2,28 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = {
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT},
- {KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
- },
-
- [1] = {
- {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
- },
-
- [2] = {
- {KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS},
- {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
- }
+ [0] = LAYOUT_ortho_4x12(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ [1] = LAYOUT_ortho_4x12(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+
+ [2] = LAYOUT_ortho_4x12(
+ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
- keyevent_t event = record->event;
-
- switch (id) {
- case 1:
- // do nothing for now
- if (event.pressed) {
- ;
- }
- }
- return MACRO_NONE;
-}
void matrix_init_user(void) {
}
diff --git a/keyboards/niu_mini/keymaps/mason/keymap.c b/keyboards/niu_mini/keymaps/mason/keymap.c
index c6185f7ec7..25f28752f8 100644
--- a/keyboards/niu_mini/keymaps/mason/keymap.c
+++ b/keyboards/niu_mini/keymaps/mason/keymap.c
@@ -25,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Caps | Esc | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+ [_QWERTY] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -43,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = {
- {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
- },
+ [_LOWER] = LAYOUT_ortho_4x12(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -61,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = {
- {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {_______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
- {_______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
- },
+ [_RAISE] = LAYOUT_ortho_4x12(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
+ _______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -79,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER},
- {_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- }
+ [_ADJUST] = LAYOUT_ortho_4x12(
+ _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/niu_mini/keymaps/planck/keymap.c b/keyboards/niu_mini/keymaps/planck/keymap.c
index b4661bfd2d..2ada7a673d 100644
--- a/keyboards/niu_mini/keymaps/planck/keymap.c
+++ b/keyboards/niu_mini/keymaps/planck/keymap.c
@@ -15,7 +15,6 @@
*/
#include QMK_KEYBOARD_H
-#include "action_layer.h"
extern keymap_config_t keymap_config;
@@ -53,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_QWERTY] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -71,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -89,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
- {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
- {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_DVORAK] = LAYOUT_ortho_4x12(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -107,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC},
- {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_LOWER] = LAYOUT_ortho_4x12(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -125,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
- {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_RAISE] = LAYOUT_ortho_4x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -144,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
- {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_PLOVER] = LAYOUT_ortho_4x12(
+ KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1,
+ XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -162,12 +161,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_ortho_4x12(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/niu_mini/keymaps/readme.md b/keyboards/niu_mini/keymaps/readme.md
index d4c2bbc805..8a263ed0b4 100644
--- a/keyboards/niu_mini/keymaps/readme.md
+++ b/keyboards/niu_mini/keymaps/readme.md
@@ -21,3 +21,4 @@ When adding your keymap to this list, keep it organised alphabetically (select l
- **default** default layout from KBDFans
- **mason**
- **planck** Planck default layout
+- **xtonhasvim** A Planck-like layout with a few tweaks and a vim emulation layer.
diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/config.h b/keyboards/niu_mini/keymaps/xtonhasvim/config.h
new file mode 100644
index 0000000000..a22bcab0f4
--- /dev/null
+++ b/keyboards/niu_mini/keymaps/xtonhasvim/config.h
@@ -0,0 +1,49 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+// help for fast typist+dual function keys?
+#define PERMISSIVE_HOLD
+
+/* disable debug print */
+#define NO_DEBUG
+
+/* disable print */
+#define NO_PRINT
+
+/* speed up mousekeys a bit */
+#define MOUSEKEY_DELAY 50
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 8
+#define MOUSEKEY_TIME_TO_MAX 30
+#define MOUSEKEY_WHEEL_MAX_SPEED 8
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
+
+#endif
diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c b/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c
new file mode 100644
index 0000000000..6a23c0a2ca
--- /dev/null
+++ b/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c
@@ -0,0 +1,200 @@
+ /* Copyright 2015-2017 Christon DeWan
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "action_layer.h"
+#include "xtonhasvim.h"
+
+/************************************
+ * states
+ ************************************/
+
+enum layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+ _MOVE,
+ _MOUSE
+};
+
+/************************************
+ * keymaps!
+ ************************************/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl*| A* | S | D | F | G | H | J | K | L | ;* | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Mouse| | Alt | GUI |Lower*| Space |Raise*| GUI | Alt | | Vim |
+ * `-----------------------------------------------------------------------------------'
+ *
+ * - Ctrl acts as Esc when tapped.
+ * - Holding A or ; switches to movement layer.
+ * - Raise and Lower are one-shot layers.
+ */
+[_QWERTY] = {
+ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
+ {LCTL_T(KC_ESC), LT(_MOVE,KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,KC_SCLN), KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) },
+ {TG(_MOUSE), X_____X, KC_LALT, KC_LGUI, OSL(_LOWER), KC_SPC, KC_SPC, OSL(_RAISE), KC_LGUI, KC_LALT, X_____X, VIM_START }
+},
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Bail | | | | | | | | Bail | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = {
+ {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC},
+ {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY},
+ {X_____X, TO(_QWERTY), _______, _______, _______, KC_BSPC, KC_BSPC, OSL(_ADJUST), _______, _______, TO(_QWERTY), X_____X}
+},
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | Next | Vol- | Vol+ | Play |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Bail | | | | | | | | Bail | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = {
+ {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC},
+ {KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS},
+ {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY},
+ {X_____X, TO(_QWERTY), _______, _______, OSL(_ADJUST), X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X}
+},
+
+
+/* Adjust (Lower + Raise)
+ * ,-------------------------------------------------------------------------------------.
+ * |RGBPlain| Reset| | | | | | | | | | Del |
+ * |--------+------+------+------+------+-------------+------+------+------+------+------|
+ * |RGBMode-| | |Aud on|Audoff|AGnorm|AGswap| | | | |Lite+ |
+ * |--------+------+------+------+------+------|------+------+------+------+------+------|
+ * |RGBMode+|Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | |Lite- |
+ * |--------+------+------+------+------+------+------+------+------+------+------+------|
+ * | RGB | Bail | | | | | | | | Bail | |
+ * `-------------------------------------------------------------------------------------'
+ */
+[_ADJUST] = {
+ {RGB_MODE_PLAIN, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
+ {RGB_MODE_REVERSE, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, RGB_VAI},
+ {RGB_MODE_FORWARD, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, RGB_VAD},
+ {RGB_TOG, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X}
+},
+
+
+/* movement layer (hold semicolon)
+ */
+[_MOVE] = {
+ {TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X},
+ {_______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X},
+ {_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______},
+ {X_____X, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X}
+},
+
+/* mouse layer
+ */
+[_MOUSE] = {
+ {TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X },
+ {_______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X},
+ {_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______},
+ {_______, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X}
+},
+
+/* vim edit mode. just has an escape -> _CMD key */
+[_EDIT] = {
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {VIM_START, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {_______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), _______}
+},
+
+/* vim command layer.
+ */
+[_CMD] = {
+ {X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X},
+ {VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X},
+ {VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT},
+ {X_____X, TO(_QWERTY), _______, _______, X_____X, X_____X, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X}
+}
+
+};
+
+/** Set just 4 LEDs closest to the user. Slightly less annoying to bystanders.*/
+void rgbflag(uint8_t r, uint8_t g, uint8_t b) {
+ for(int i = 0; i < RGBLED_NUM; i++){
+ switch(i) {
+ case 9 ... 12:
+ // rgblight_setrgb_at(r,g,b,i);
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+ break;
+ default:
+ // rgblight_setrgb_at(0,0,0,i);
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ break;
+ }
+ }
+ rgblight_set();
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+ if(rgblight_get_mode() == 1) {
+ switch (biton32(state)) {
+ case _RAISE:
+ case _LOWER:
+ case _ADJUST:
+ rgbflag(0x00, 0x00, 0xFF);
+ break;
+ case _MOVE:
+ case _MOUSE:
+ rgbflag(0xFF, 0x00, 0x00);
+ break;
+ case _CMD:
+ rgbflag(0x00, 0xFF, 0x00);
+ break;
+ case _EDIT:
+ rgbflag(0x7A, 0x00, 0xFF);
+ break;
+ default: // for any other layers, or the default layer
+ rgbflag(0x00, 0xFF, 0xFF);
+ break;
+ }
+ }
+ return state;
+}
diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/readme.md b/keyboards/niu_mini/keymaps/xtonhasvim/readme.md
new file mode 100644
index 0000000000..9ff4ce1f19
--- /dev/null
+++ b/keyboards/niu_mini/keymaps/xtonhasvim/readme.md
@@ -0,0 +1,9 @@
+# Xton has a tiny keyboard! With Vim!
+
+Based on the standard Planck layout with a few changes:
+
+* Escape moved to dual-function with control.
+* Dedicated movement and mouse layers.
+* Top and middle row swapped in `_RAISE` and `_LOWER` because I never use F-keys.
+* Vim layers! See `users/xtonhasvim`.
+
diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk
new file mode 100644
index 0000000000..3a93f9fd8c
--- /dev/null
+++ b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk
@@ -0,0 +1,6 @@
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
+
+MOUSEKEY_ENABLE = yes
+BACKLIGHT_ENABLE = no
diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h
index 2dd707ede6..a92c4db9ec 100644
--- a/keyboards/niu_mini/niu_mini.h
+++ b/keyboards/niu_mini/niu_mini.h
@@ -29,7 +29,23 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
+// Used to create a keymap using only KC_ prefixed keys
+#define KC_KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+ ) \
+ LAYOUT_grid( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
+ )
+
#define LAYOUT LAYOUT_grid
#define LAYOUT_ortho_4x12 LAYOUT_grid
+#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
+#define LAYOUT_kc_ortho_4x12 KC_KEYMAP
#endif
diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk
index 64ef5f303a..c2efc3266d 100644
--- a/keyboards/niu_mini/rules.mk
+++ b/keyboards/niu_mini/rules.mk
@@ -66,3 +66,7 @@ API_SYSEX_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+LAYOUTS = ortho_4x12 planck_mit planck_grid
+LAYOUTS_HAS_RGB = no
+
diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h
index 9e685054b2..3df957b84c 100644
--- a/keyboards/orthodox/keymaps/default/config.h
+++ b/keyboards/orthodox/keymaps/default/config.h
@@ -35,4 +35,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
#define EE_HANDS
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+
#endif
diff --git a/keyboards/orthodox/keymaps/default/keymap.c b/keyboards/orthodox/keymaps/default/keymap.c
index 79077cdfb4..c7a48d82d0 100644
--- a/keyboards/orthodox/keymaps/default/keymap.c
+++ b/keyboards/orthodox/keymaps/default/keymap.c
@@ -19,11 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "orthodox.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@@ -39,10 +35,7 @@ extern keymap_config_t keymap_config;
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
- DVORAK,
- LOWER,
- RAISE,
- ADJUST,
+ DVORAK
};
// Fillers to make layering more clear
@@ -50,113 +43,71 @@ enum custom_keycodes {
#define XXXXXXX KC_NO
#define LS__SPC MT(MOD_LSFT, KC_SPC)
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_ENT, KC_RALT, LS__SPC, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI \
),
- [_COLEMAK] = KEYMAP(\
+ [_COLEMAK] = LAYOUT(\
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_LGUI \
),
- [_DVORAK] = KEYMAP(\
+ [_DVORAK] = LAYOUT(\
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
KC_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LGUI \
),
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCTL, _______, _______, KC_RCTL, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
),
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \
),
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
- _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
)
};
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-float tone_dvorak[][2] = SONG(DVORAK_SOUND);
-float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
-#ifdef AUDIO_ENABLE
- PLAY_SONG(tone_qwerty);
-#endif
- persistent_default_layer_set(1UL<<_QWERTY);
+ set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
-#ifdef AUDIO_ENABLE
- PLAY_SONG(tone_colemak);
-#endif
- persistent_default_layer_set(1UL<<_COLEMAK);
+ set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
-#ifdef AUDIO_ENABLE
- PLAY_SONG(tone_dvorak);
-#endif
- persistent_default_layer_set(1UL<<_DVORAK);
- }
- return false;
- break;
- case LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
+ set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c
index fd10faa5ee..3c99e9cb8a 100644
--- a/keyboards/orthodox/keymaps/drashna/keymap.c
+++ b/keyboards/orthodox/keymaps/drashna/keymap.c
@@ -57,25 +57,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS,
KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI
),
-[_MODS] = LAYOUT(\
+[_MODS] = LAYOUT_wrapper(\
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
-[_LOWER] = LAYOUT(\
+[_LOWER] = LAYOUT_wrapper(\
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
),
-[_RAISE] = LAYOUT(\
+[_RAISE] = LAYOUT_wrapper(\
KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC,
_______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______
),
-[_ADJUST] = LAYOUT(\
+[_ADJUST] = LAYOUT_wrapper(\
KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS),
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY
diff --git a/keyboards/orthodox/keymaps/oscillope/keymap.c b/keyboards/orthodox/keymaps/oscillope/keymap.c
index 28fea02c4d..ad07b3ed43 100644
--- a/keyboards/orthodox/keymaps/oscillope/keymap.c
+++ b/keyboards/orthodox/keymaps/oscillope/keymap.c
@@ -19,11 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "orthodox.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
-extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@@ -53,25 +50,25 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, TT(_RAISE), TT(_LOWER), TT(_LOWER), TT(_RAISE), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_TAP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT \
),
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU \
),
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, _______, _______, \
_______, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \
CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_DOT, KC_BSLS, KC_PIPE \
),
- [_NAV] = KEYMAP( \
+ [_NAV] = LAYOUT( \
_______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h
index 932f8fd124..51c5245527 100644
--- a/keyboards/orthodox/orthodox.h
+++ b/keyboards/orthodox/orthodox.h
@@ -12,7 +12,7 @@
#endif
// Used to create a keymap using only KC_ prefixed keys
-#define KC_KEYMAP( \
+#define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \
diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json
index be9738f2ed..54afc306d8 100644
--- a/keyboards/orthodox/rev1/info.json
+++ b/keyboards/orthodox/rev1/info.json
@@ -1,11 +1,11 @@
{
- "keyboard_name": "Monkeebs Orthodox Rev.1",
- "maintainer": "qmk",
- "width": 17,
- "height": 17.24,
+ "keyboard_name": "Monkeebs Orthodox Rev.1",
+ "maintainer": "qmk",
+ "width": 17,
+ "height": 17.24,
"layouts": {
- "KEYMAP": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
+ "LAYOUT": {
+ "layout": [{"label":"TAB", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "y":0}, {"label":"ESC", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}]
}
}
}
diff --git a/keyboards/orthodox/rev1/rev1.c b/keyboards/orthodox/rev1/rev1.c
index ae45e34b19..ecb908b3ae 100644
--- a/keyboards/orthodox/rev1/rev1.c
+++ b/keyboards/orthodox/rev1/rev1.c
@@ -33,3 +33,18 @@ void matrix_init_kb(void) {
matrix_init_user();
};
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}},
+ {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}},
+ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5}, {7,5}, {8,5}},
+ /* Right hand, matrix positions */
+ {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}},
+ {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}, {6,1}, {7,1}, {8,1}},
+ {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, {6,2}, {7,2}, {8,2}},
+};
+#endif
diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h
index 8211234a5b..e73263fb68 100644
--- a/keyboards/orthodox/rev1/rev1.h
+++ b/keyboards/orthodox/rev1/rev1.h
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//void promicro_bootloader_jmp(bool program);
-#define KEYMAP( \
+#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \
diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json
index 579167f6d3..fd0b324cff 100644
--- a/keyboards/orthodox/rev3/info.json
+++ b/keyboards/orthodox/rev3/info.json
@@ -1,11 +1,11 @@
{
- "keyboard_name": "Monkeebs Orthodox Rev.3",
- "maintainer": "qmk",
- "width": 17,
- "height": 17.24,
+ "keyboard_name": "Monkeebs Orthodox Rev.3",
+ "maintainer": "qmk",
+ "width": 17,
+ "height": 17.24,
"layouts": {
- "KEYMAP": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
+ "LAYOUT": {
+ "layout": [{"label":"TAB", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "y":0}, {"label":"ESC", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}]
}
}
}
diff --git a/keyboards/orthodox/rev3/rev3.c b/keyboards/orthodox/rev3/rev3.c
index ae45e34b19..ecb908b3ae 100644
--- a/keyboards/orthodox/rev3/rev3.c
+++ b/keyboards/orthodox/rev3/rev3.c
@@ -33,3 +33,18 @@ void matrix_init_kb(void) {
matrix_init_user();
};
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}},
+ {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}},
+ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5}, {7,5}, {8,5}},
+ /* Right hand, matrix positions */
+ {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}},
+ {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}, {6,1}, {7,1}, {8,1}},
+ {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, {6,2}, {7,2}, {8,2}},
+};
+#endif
diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h
index 8aff9e39f4..2be9b9605c 100644
--- a/keyboards/orthodox/rev3/rev3.h
+++ b/keyboards/orthodox/rev3/rev3.h
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//void promicro_bootloader_jmp(bool program);
-#define KEYMAP( \
+#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \
diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json
index 579167f6d3..fd0b324cff 100644
--- a/keyboards/orthodox/rev3_teensy/info.json
+++ b/keyboards/orthodox/rev3_teensy/info.json
@@ -1,11 +1,11 @@
{
- "keyboard_name": "Monkeebs Orthodox Rev.3",
- "maintainer": "qmk",
- "width": 17,
- "height": 17.24,
+ "keyboard_name": "Monkeebs Orthodox Rev.3",
+ "maintainer": "qmk",
+ "width": 17,
+ "height": 17.24,
"layouts": {
- "KEYMAP": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
+ "LAYOUT": {
+ "layout": [{"label":"TAB", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "y":0}, {"label":"ESC", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}]
}
}
}
diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.c b/keyboards/orthodox/rev3_teensy/rev3_teensy.c
index ae45e34b19..ecb908b3ae 100644
--- a/keyboards/orthodox/rev3_teensy/rev3_teensy.c
+++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.c
@@ -33,3 +33,18 @@ void matrix_init_kb(void) {
matrix_init_user();
};
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}, {6,3}, {7,3}, {8,3}},
+ {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}, {6,4}, {7,4}, {8,4}},
+ {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}, {6,5}, {7,5}, {8,5}},
+ /* Right hand, matrix positions */
+ {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}},
+ {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}, {6,1}, {7,1}, {8,1}},
+ {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}, {6,2}, {7,2}, {8,2}},
+};
+#endif
diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h
index 18b47671c7..0081a0df01 100644
--- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h
+++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//void promicro_bootloader_jmp(bool program);
-#define KEYMAP( \
+#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \
L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \
diff --git a/keyboards/paladin64/info.json b/keyboards/paladin64/info.json
new file mode 100644
index 0000000000..42c3618bb2
--- /dev/null
+++ b/keyboards/paladin64/info.json
@@ -0,0 +1,28 @@
+{
+ "keyboard_name": "paladin64",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_60_ansi": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_infinity": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
+ },
+
+ "LAYOUT_aek_103": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
+ },
+
+ "LAYOUT_iso": {
+ "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
+ }
+ }
+ } \ No newline at end of file
diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/paladin64/keymaps/default/keymap.c
index 1ac670fa0f..8a3f57c0bf 100755
--- a/keyboards/paladin64/keymaps/default/keymap.c
+++ b/keyboards/paladin64/keymaps/default/keymap.c
@@ -1,10 +1,10 @@
-#include "paladin64.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM fn_actions[] = {};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY */
- KEYMAP(
+ LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL),
/* DVORAK */
- KEYMAP(
+ LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS,
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC,
MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT,
@@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL),
/* COLEMAK */
- KEYMAP(
+ LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC,
MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT,
@@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL),
/* FUNCTION */
- KEYMAP(
+ LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC,
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG),
/* AutoMouse */
- KEYMAP(
+ LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
diff --git a/keyboards/paladin64/paladin64.h b/keyboards/paladin64/paladin64.h
index 1bbf9ea530..9666b08988 100755
--- a/keyboards/paladin64/paladin64.h
+++ b/keyboards/paladin64/paladin64.h
@@ -3,7 +3,7 @@
#include "quantum.h"
-#define KEYMAP( \
+#define LAYOUT_all( \
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
@@ -20,4 +20,73 @@
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
}
+#define LAYOUT_iso( \
+ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
+ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+ K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
+ K30, K40, K50, K60, K70, K00, K20 \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
+ { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67 }, \
+ { K70, K71, K72, K73, K74, K75, K76, K77 } \
+}
+
+#define LAYOUT_60_ansi( \
+ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
+ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+ K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
+ K30, K40, K50, K60, K70, K00, K10, K20 \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67 }, \
+ { K70, K71, K72, K73, K74, K75, K76, K77 } \
+}
+
+#define LAYOUT_infinity( \
+ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
+ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+ K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \
+ K30, K40, K50, K60, K70, K00, K10, K20 \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67 }, \
+ { K70, K71, K72, K73, K74, K75, K76, K77 } \
+}
+
+#define LAYOUT_aek_103( \
+ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \
+ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
+ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
+ K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
+ K30, K40, K50, K60, K70, K00, K20 \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
+ { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67 }, \
+ { K70, K71, K72, K73, K74, K75, K76, K77 } \
+}
+
+
#endif
diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk
index b24dc49d06..3b79256abe 100755
--- a/keyboards/paladin64/rules.mk
+++ b/keyboards/paladin64/rules.mk
@@ -58,3 +58,5 @@ RGBLIGHT_ENABLE ?= yes
#PS2_MOUSE_ENABLE ?= yes
#PS2_USE_USART ?= yes
#PS2_USE_INT ?= yes
+
+LAYOUTS = 60_ansi \ No newline at end of file
diff --git a/keyboards/pk60/config.h b/keyboards/pk60/config.h
new file mode 100644
index 0000000000..06101349cc
--- /dev/null
+++ b/keyboards/pk60/config.h
@@ -0,0 +1,58 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Play Keyboard
+#define PRODUCT pk60
+#define DESCRIPTION A 60% keyboard PCB
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B7
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 5
+#endif
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* prevent stuck modifiers */
+#define PREVENT_STUCK_MODIFIERS
+
+#define RGB_DI_PIN E2
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#endif
+
+#endif \ No newline at end of file
diff --git a/keyboards/pk60/info.json b/keyboards/pk60/info.json
new file mode 100644
index 0000000000..7e2d90b6c9
--- /dev/null
+++ b/keyboards/pk60/info.json
@@ -0,0 +1,32 @@
+{
+ "keyboard_name": "pk60",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_ansi": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0}, {"label":"Bs", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_iso": {
+ "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"Enter", "x":13.75, "y":1.25, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"@", "x":11.75, "y":2.25}, {"label":"~", "x":12.75, "y":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":1.25}, {"label":"|", "x":1.25, "y":3.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"?", "x":11.25, "y":3.25}, {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25, "w":1.25}, {"label":"Win", "x":11.25, "y":4.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4.25, "w":1.25}]
+ },
+
+ "LAYOUT_225u_arrow": {
+ "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"Shift", "x":11.25, "y":3.25, "w":1.75}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}]
+ },
+
+ "LAYOUT_2u_arrow": {
+ "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}]
+ },
+
+ "LAYOUT_minila": {
+ "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"label":"Alt", "x":8.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":9.75, "y":4.25, "w":1.25}, {"x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}]
+ },
+
+ "LAYOUT_all": {
+ "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"\"", "x":12.75, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}, {"label":"Shift", "x":0, "y":3.25}, {"x":1, "y":3.25}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25}, {"x":4.75, "y":4.25, "w":5.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/pk60/keymaps/default/keymap.c b/keyboards/pk60/keymaps/default/keymap.c
new file mode 100644
index 0000000000..c96499b0e4
--- /dev/null
+++ b/keyboards/pk60/keymaps/default/keymap.c
@@ -0,0 +1,59 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT,
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1),
+ KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
+
+ LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
+ RESET, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PSCR, KC_CALC,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_SLCK, KC_TRNS,
+ KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ DDRF |= (1 << 4); PORTF &= ~(1 << 4);
+ } else {
+ DDRF &= ~(1 << 4); PORTF &= ~(1 << 4);
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+} \ No newline at end of file
diff --git a/keyboards/pk60/keymaps/default/readme.md b/keyboards/pk60/keymaps/default/readme.md
new file mode 100644
index 0000000000..911cb37c59
--- /dev/null
+++ b/keyboards/pk60/keymaps/default/readme.md
@@ -0,0 +1,3 @@
+# Default Play Keyboard60 Layout
+
+This is the default layout that comes flashed on every Play Keyboard60. All key pins are shown in the file. \ No newline at end of file
diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c
new file mode 100644
index 0000000000..909230def2
--- /dev/null
+++ b/keyboards/pk60/pk60.c
@@ -0,0 +1 @@
+#include "pk60.h"
diff --git a/keyboards/pk60/pk60.h b/keyboards/pk60/pk60.h
new file mode 100644
index 0000000000..8d31600d6e
--- /dev/null
+++ b/keyboards/pk60/pk60.h
@@ -0,0 +1,90 @@
+#ifndef pk60_H
+#define pk60_H
+
+#include "quantum.h"
+
+#define LAYOUT_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
+ K40, K41, K42, K47, K49, K4A, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \
+}
+
+#define LAYOUT_iso( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
+ K40, K41, K42, K47, K49, K4A, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \
+}
+
+#define LAYOUT_225u_arrow( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
+ K40, K41, K42, K47, K49, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO } \
+}
+
+#define LAYOUT_2u_arrow( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K47, K49, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO } \
+}
+
+#define LAYOUT_minila( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \
+}
+
+#define LAYOUT_all( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \
+}
+
+#endif \ No newline at end of file
diff --git a/keyboards/pk60/readme.md b/keyboards/pk60/readme.md
new file mode 100644
index 0000000000..53d57272b0
--- /dev/null
+++ b/keyboards/pk60/readme.md
@@ -0,0 +1,13 @@
+# Play Keyboard60
+
+![Play Keyboard60](https://i.imgur.com/3pvC6I4.png)
+
+A 60% keyboard PCB made by Play Keyboard.
+It supports GH60 layout and mutultiple layouts like arrows, 2u shift, minila, etc.
+Fitted with all stock GH60 cases, with WS2812 RGB underglow.
+
+Keyboard Maintainer: [Barry Huang](https://github.com/yj7272098)
+Hardware Supported: Play Keyboard60
+Hardware Availability: [Play Keyboard](http://playkeyboard.qdm.com.tw/)
+
+Powered by QMK Firmware. \ No newline at end of file
diff --git a/keyboards/pk60/rules.mk b/keyboards/pk60/rules.mk
new file mode 100644
index 0000000000..cf3f54c714
--- /dev/null
+++ b/keyboards/pk60/rules.mk
@@ -0,0 +1,56 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+BOOTLOADER=amtel-dfu
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c
index 0ec7c01b5c..ae268756b1 100644
--- a/keyboards/planck/keymaps/sascha/keymap.c
+++ b/keyboards/planck/keymaps/sascha/keymap.c
@@ -4,34 +4,38 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = {
/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
- * │ Esc │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bksp │
+ * │ Esc │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Bksp │
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
- * │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; : │ Entr │
+ * │ Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; : │ Entr │
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
- * │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , < │ . > │ / ? │ ' " │
+ * │ Shft │ Y │ X │ C │ V │ B │ N │ M │ , < │ . > │ / ? │ ' " │
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
- * │ Alt │ GUI │ \ | │ - _ │ = + │ Spce │ Spce │ ( │ ) │ [ { │ ] } │ Lr 1 │
+ * │ Ctrl │ Alt │ GUI │ - _ │ = + │ Spce │ \ | │ ( │ ) │ [ { │ ] } │ Lr 1 │
* └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
*/
- { KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC } ,
- { KC_LCTL , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_ENT } ,
- { KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_QUOT } ,
- { KC_LALT , KC_LGUI , KC_BSLS , KC_MINS , KC_EQL , KC_SPC , KC_SPC , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , MO(1) }
+ { KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Z , KC_U , KC_I , KC_O , KC_P , KC_BSPC } ,
+ { KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_ENT } ,
+ { KC_LSFT , KC_Y , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_QUOT } ,
+ { KC_LCTL , KC_LALT , KC_LGUI , KC_MINS , KC_EQL , KC_SPC , KC_BSLS , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , MO(1) }
},
[1] = {
/* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
* │ ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
- * │ ` │ ! │ @ │ # │ $ │ % │ * │ & │ BL+ │ BL- │ BLTg │ BLBr │
+ * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ü │ ö │ ä │
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
- * │ Caps │ Home │ End │ PgUp │ PgDn │ F1 │ F2 │ F3 │ Left │ Down │ Up │ Rght │
+ * │ Caps │ Home │ End │ PgUp │ PgDn │ INS │ F1 │ ß │ Left │ Down │ Up │ Rght │
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
- * │ Powr │ Rset │ VoUp │ VoDn │ Play │ Stop │ Prev │ Next │ Alt │ Ctrl │ GUI │ │
+ * │ Powr │ Rset │ VoUp │ VoDn │ BLTg │ BLSt │ BLBr │ Shft │ Alt │ Ctrl │ GUI │ │
* └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
*/
- { KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL } ,
- { KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , BL_INC , BL_DEC , BL_TOGG , BL_BRTG } ,
- { KC_CAPS , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_F1 , KC_F2 , KC_F3 , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT } ,
- { KC_PWR , RESET , KC_VOLU , KC_VOLD , KC_MPLY , KC_MSTP , KC_MPRV , KC_MNXT , KC_RALT , KC_RCTL , KC_RGUI , KC_TRNS }
+ { KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL } ,
+ { KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä') } ,
+ { KC_CAPS , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_INS , KC_F1 , UC(L'ß') , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT } ,
+ { KC_PWR , RESET , KC_VOLU , KC_VOLD , BL_TOGG , BL_STEP , BL_BRTG , KC_RSFT , KC_RALT , KC_RCTL , KC_RGUI , KC_TRNS }
}
};
+
+void matrix_init_user(void) {
+ set_unicode_input_mode(UC_LNX);
+};
diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk
index e69de29bb2..d3918164df 100644
--- a/keyboards/planck/keymaps/sascha/rules.mk
+++ b/keyboards/planck/keymaps/sascha/rules.mk
@@ -0,0 +1,5 @@
+AUTO_SHIFT_ENABLE = yes
+AUTO_SHIFT_MODIFIERS = yes
+BACKLIGHT_ENABLE = yes
+UNICODE_ENABLE = yes
+DEFAULT_FOLDER = planck/rev5
diff --git a/keyboards/redox/keymaps/default/config.h b/keyboards/redox/keymaps/default/config.h
index ef1b4d944f..22e26c0041 100644
--- a/keyboards/redox/keymaps/default/config.h
+++ b/keyboards/redox/keymaps/default/config.h
@@ -1,5 +1,5 @@
/*
-Copyright 2017 Danny Nguyen <danny@hexwire.com>
+Copyright 2018 Mattia Dal Ben <matthewdibi@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/keyboards/redox/keymaps/default/keymap.c b/keyboards/redox/keymaps/default/keymap.c
index d8fd76d021..bbaf756c4d 100644
--- a/keyboards/redox/keymaps/default/keymap.c
+++ b/keyboards/redox/keymaps/default/keymap.c
@@ -28,28 +28,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* ,------------------------------------------------. ,------------------------------------------------.
- * |\-Lyr2| 1 | 2 | 3 | 4 | 5 | Lyr1 | | Lyr1 | 6 | 7 | 8 | 9 | 0 |'-Lyr2|
+ * |`-Lyr2| 1 | 2 | 3 | 4 | 5 | Lyr1 | | Lyr1 | 6 | 7 | 8 | 9 | 0 |--Lyr2|
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | è |
+ * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | = |
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Esc | A | S | D | F | G | PgUp | | End | H | J | K | L | ò | à |
+ * | Esc | A | S | D | F | G | PgUp | | End | H | J | K | L | ; | ' |
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | PgDn | | Home | N | M | , | . | ù |-(Sft)|
+ * | Shift| Z | X | C | V | B | PgDn | | Home | N | M | , | . | \ |Shift |
* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * |<(Gui)| + | - |*(Alt)|/(Ctr)|Bcksp | Del | |Enter |Space |ì(AlG)| Left | Down | Up | Right|
+ * | Gui | + | - |*(Alt)|/(Ctr)|Bcksp | Del | |Enter |Space | Alt | Left | Down | Up | Right|
* `------------------------------------------------' `------------------------------------------------'
*/
[_QWERTY] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
LT(_NAV, KC_GRV) , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,MO(_SYMB), MO(_SYMB), KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,LT(_NAV, KC_MINS),
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,RALT(KC_LBRC), RALT(KC_RBRC) , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_LBRC,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,KC_LBRC, KC_RBRC , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_EQL,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , LT(_ADJUST, KC_PGUP), LT( _ADJUST, KC_END) , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
+ KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , LT(_ADJUST, KC_PGUP), LT( _ADJUST, KC_END) , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PGDN, KC_HOME , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_BSLASH,RSFT_T(KC_SLSH),
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PGDN, KC_HOME , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_BSLASH, KC_RSFT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LGUI_T(KC_NONUS_BSLASH),KC_PPLS,KC_PMNS,LALT_T(KC_PAST),LCTL_T(KC_PSLS),KC_BSPC,KC_DEL , KC_ENT , KC_SPC, RALT_T(KC_EQL),KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
+ KC_LGUI,KC_PPLS,KC_PMNS,LALT_T(KC_PAST),LCTL_T(KC_PSLS),KC_BSPC,KC_DEL , KC_ENT , KC_SPC, KC_RALT,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
//`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
),
@@ -68,11 +68,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_SYMB] = LAYOUT(
- _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
- _______, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, _______, _______, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, XXXXXXX, XXXXXXX,
- _______, RALT(KC_QUOT), KC_DLR , RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_EQL), _______, _______, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, XXXXXXX,
- _______, KC_PERC, LSFT(KC_EQL) , LSFT(KC_8), LSFT(KC_9), RALT(KC_MINS), _______, _______, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, XXXXXXX,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, XXXXXXX, XXXXXXX
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
+ _______, KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, XXXXXXX, XXXXXXX,
+ _______, KC_HASH, KC_DLR , KC_LBRC, KC_RBRC, KC_GRV, _______, _______, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, XXXXXXX,
+ _______, KC_PERC, KC_CIRC, KC_LPRN, KC_RPRN, KC_TILD, _______, _______, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, XXXXXXX, XXXXXXX
),
/* Navigation
diff --git a/keyboards/redox/keymaps/default/readme.md b/keyboards/redox/keymaps/default/readme.md
index 7f086f6e12..8fa8ddf5ce 100644
--- a/keyboards/redox/keymaps/default/readme.md
+++ b/keyboards/redox/keymaps/default/readme.md
@@ -1 +1 @@
-# The default keymap for redox \ No newline at end of file
+# The default keymap for Redox
diff --git a/keyboards/redox/keymaps/italian/config.h b/keyboards/redox/keymaps/italian/config.h
new file mode 100644
index 0000000000..22e26c0041
--- /dev/null
+++ b/keyboards/redox/keymaps/italian/config.h
@@ -0,0 +1,41 @@
+/*
+Copyright 2018 Mattia Dal Ben <matthewdibi@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/* Use I2C or Serial, not both */
+
+// #define USE_SERIAL
+#define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 14
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+
+#endif
diff --git a/keyboards/redox/keymaps/italian/keymap.c b/keyboards/redox/keymaps/italian/keymap.c
new file mode 100644
index 0000000000..d8fd76d021
--- /dev/null
+++ b/keyboards/redox/keymaps/italian/keymap.c
@@ -0,0 +1,117 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+extern rgblight_config_t rgblight_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _SYMB 1
+#define _NAV 2
+#define _ADJUST 3
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ SYMB,
+ NAV,
+ ADJUST,
+};
+
+// Fillers to make layering more clear
+#define KC_ KC_TRNS
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * |\-Lyr2| 1 | 2 | 3 | 4 | 5 | Lyr1 | | Lyr1 | 6 | 7 | 8 | 9 | 0 |'-Lyr2|
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | è |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | PgUp | | End | H | J | K | L | ò | à |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | PgDn | | Home | N | M | , | . | ù |-(Sft)|
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * |<(Gui)| + | - |*(Alt)|/(Ctr)|Bcksp | Del | |Enter |Space |ì(AlG)| Left | Down | Up | Right|
+ * `------------------------------------------------' `------------------------------------------------'
+ */
+ [_QWERTY] = LAYOUT(
+ //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
+ LT(_NAV, KC_GRV) , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,MO(_SYMB), MO(_SYMB), KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,LT(_NAV, KC_MINS),
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,RALT(KC_LBRC), RALT(KC_RBRC) , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_LBRC,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , LT(_ADJUST, KC_PGUP), LT( _ADJUST, KC_END) , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PGDN, KC_HOME , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_BSLASH,RSFT_T(KC_SLSH),
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ LGUI_T(KC_NONUS_BSLASH),KC_PPLS,KC_PMNS,LALT_T(KC_PAST),LCTL_T(KC_PSLS),KC_BSPC,KC_DEL , KC_ENT , KC_SPC, RALT_T(KC_EQL),KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
+ //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
+ ),
+
+/* Symbols
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | # | $ | [ | ] | ~ | | | | | 4 | 5 | 6 | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | % | ^ | ( | ) | ` | | | | | 1 | 2 | 3 | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | | | | | | | | | 0 | 0 | . | | |
+ * `------------------------------------------------' `------------------------------------------------'
+ */
+
+ [_SYMB] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
+ _______, KC_EXLM, RALT(KC_SCLN), RALT(KC_LCBR), RALT(KC_RCBR), KC_TILD, _______, _______, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, XXXXXXX, XXXXXXX,
+ _______, RALT(KC_QUOT), KC_DLR , RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_EQL), _______, _______, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, XXXXXXX,
+ _______, KC_PERC, LSFT(KC_EQL) , LSFT(KC_8), LSFT(KC_9), RALT(KC_MINS), _______, _______, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, XXXXXXX, XXXXXXX
+ ),
+
+/* Navigation
+ * ,------------------------------------------------. ,------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | |MOUS_U| |WHEL_U| | | | | | | | | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | |MOUS_L|MOUS_D|MOUS_R|WHEL_D| | | | | LEFT | DOWN | UP |RIGHT | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
+ * | | | | |MOUS_1|MOUS_2| | | | | | | | | |
+ * `------------------------------------------------' `------------------------------------------------'
+ */
+ [_NAV] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, KC_WH_U, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT,XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ ),
+
+ [_ADJUST] = LAYOUT(
+ XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,
+ XXXXXXX, RESET , RGB_M_P, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, KC_DEL, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ )
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
diff --git a/keyboards/redox/keymaps/italian/readme.md b/keyboards/redox/keymaps/italian/readme.md
new file mode 100644
index 0000000000..85b48fdb6f
--- /dev/null
+++ b/keyboards/redox/keymaps/italian/readme.md
@@ -0,0 +1 @@
+# The italian keymap for Redox
diff --git a/keyboards/redox/keymaps/italian/rules.mk b/keyboards/redox/keymaps/italian/rules.mk
new file mode 100644
index 0000000000..1e57612788
--- /dev/null
+++ b/keyboards/redox/keymaps/italian/rules.mk
@@ -0,0 +1,5 @@
+RGBLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
diff --git a/keyboards/vitamins_included/config.h b/keyboards/vitamins_included/config.h
new file mode 100644
index 0000000000..c910d8f24f
--- /dev/null
+++ b/keyboards/vitamins_included/config.h
@@ -0,0 +1,24 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+#endif
diff --git a/keyboards/vitamins_included/i2c.c b/keyboards/vitamins_included/i2c.c
new file mode 100644
index 0000000000..49ada21433
--- /dev/null
+++ b/keyboards/vitamins_included/i2c.c
@@ -0,0 +1,163 @@
+#include <util/twi.h>
+#include <avr/io.h>
+#include <stdlib.h>
+#include <avr/interrupt.h>
+#include <util/twi.h>
+#include <stdbool.h>
+#include "i2c.h"
+
+#ifdef USE_I2C
+
+// Limits the amount of we wait for any one i2c transaction.
+// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
+// 9 bits, a single transaction will take around 90μs to complete.
+//
+// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
+// poll loop takes at least 8 clock cycles to execute
+#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
+
+#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
+
+volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
+
+static volatile uint8_t slave_buffer_pos;
+static volatile bool slave_has_register_set = false;
+
+// Wait for an i2c operation to finish
+inline static
+void i2c_delay(void) {
+ uint16_t lim = 0;
+ while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
+ lim++;
+
+ // easier way, but will wait slightly longer
+ // _delay_us(100);
+}
+
+// Setup twi to run at 100kHz
+void i2c_master_init(void) {
+ // no prescaler
+ TWSR = 0;
+ // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
+ // Check datasheets for more info.
+ TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
+}
+
+// Start a transaction with the given i2c slave address. The direction of the
+// transfer is set with I2C_READ and I2C_WRITE.
+// returns: 0 => success
+// 1 => error
+uint8_t i2c_master_start(uint8_t address) {
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
+
+ i2c_delay();
+
+ // check that we started successfully
+ if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
+ return 1;
+
+ TWDR = address;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+
+ i2c_delay();
+
+ if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
+ return 1; // slave did not acknowledge
+ else
+ return 0; // success
+}
+
+
+// Finish the i2c transaction.
+void i2c_master_stop(void) {
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
+
+ uint16_t lim = 0;
+ while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
+ lim++;
+}
+
+// Write one byte to the i2c slave.
+// returns 0 => slave ACK
+// 1 => slave NACK
+uint8_t i2c_master_write(uint8_t data) {
+ TWDR = data;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+
+ i2c_delay();
+
+ // check if the slave acknowledged us
+ return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
+}
+
+// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
+// if ack=0 the acknowledge bit is not set.
+// returns: byte read from i2c device
+uint8_t i2c_master_read(int ack) {
+ TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
+
+ i2c_delay();
+ return TWDR;
+}
+
+void i2c_reset_state(void) {
+ TWCR = 0;
+}
+
+void i2c_slave_init(uint8_t address) {
+ TWAR = address << 0; // slave i2c address
+ // TWEN - twi enable
+ // TWEA - enable address acknowledgement
+ // TWINT - twi interrupt flag
+ // TWIE - enable the twi interrupt
+ TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
+}
+
+ISR(TWI_vect);
+
+ISR(TWI_vect) {
+ uint8_t ack = 1;
+ switch(TW_STATUS) {
+ case TW_SR_SLA_ACK:
+ // this device has been addressed as a slave receiver
+ slave_has_register_set = false;
+ break;
+
+ case TW_SR_DATA_ACK:
+ // this device has received data as a slave receiver
+ // The first byte that we receive in this transaction sets the location
+ // of the read/write location of the slaves memory that it exposes over
+ // i2c. After that, bytes will be written at slave_buffer_pos, incrementing
+ // slave_buffer_pos after each write.
+ if(!slave_has_register_set) {
+ slave_buffer_pos = TWDR;
+ // don't acknowledge the master if this memory loctaion is out of bounds
+ if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
+ ack = 0;
+ slave_buffer_pos = 0;
+ }
+ slave_has_register_set = true;
+ } else {
+ i2c_slave_buffer[slave_buffer_pos] = TWDR;
+ BUFFER_POS_INC();
+ }
+ break;
+
+ case TW_ST_SLA_ACK:
+ case TW_ST_DATA_ACK:
+ // master has addressed this device as a slave transmitter and is
+ // requesting data.
+ TWDR = i2c_slave_buffer[slave_buffer_pos];
+ BUFFER_POS_INC();
+ break;
+
+ case TW_BUS_ERROR: // something went wrong, reset twi state
+ TWCR = 0;
+ default:
+ break;
+ }
+ // Reset everything, so we are ready for the next TWI interrupt
+ TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
+ contacted_by_master = true;
+}
+#endif
diff --git a/keyboards/vitamins_included/i2c.h b/keyboards/vitamins_included/i2c.h
new file mode 100644
index 0000000000..739d134bee
--- /dev/null
+++ b/keyboards/vitamins_included/i2c.h
@@ -0,0 +1,50 @@
+#ifndef I2C_H
+#define I2C_H
+
+#include <stdint.h>
+#include "split_util.h"
+
+#ifndef F_CPU
+#define F_CPU 16000000UL
+#endif
+
+#define I2C_READ 1
+#define I2C_WRITE 0
+
+#define I2C_ACK 1
+#define I2C_NACK 0
+
+#define SLAVE_BUFFER_SIZE 0x10
+
+// i2c SCL clock frequency
+#define SCL_CLOCK 400000L
+
+extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
+
+void i2c_master_init(void);
+uint8_t i2c_master_start(uint8_t address);
+void i2c_master_stop(void);
+uint8_t i2c_master_write(uint8_t data);
+uint8_t i2c_master_read(int);
+void i2c_reset_state(void);
+void i2c_slave_init(uint8_t address);
+
+
+static inline unsigned char i2c_start_read(unsigned char addr) {
+ return i2c_master_start((addr << 1) | I2C_READ);
+}
+
+static inline unsigned char i2c_start_write(unsigned char addr) {
+ return i2c_master_start((addr << 1) | I2C_WRITE);
+}
+
+// from SSD1306 scrips
+extern unsigned char i2c_rep_start(unsigned char addr);
+extern void i2c_start_wait(unsigned char addr);
+extern unsigned char i2c_readAck(void);
+extern unsigned char i2c_readNak(void);
+extern unsigned char i2c_read(unsigned char ack);
+
+#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
+
+#endif
diff --git a/keyboards/vitamins_included/keymaps/default/config.h b/keyboards/vitamins_included/keymaps/default/config.h
new file mode 100644
index 0000000000..35f641a94a
--- /dev/null
+++ b/keyboards/vitamins_included/keymaps/default/config.h
@@ -0,0 +1,44 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+//#define MASTER_LEFT
+// #define MASTER_RIGHT
+#define EE_HANDS
+
+#ifdef AUDIO_ENABLE
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(DVORAK_SOUND), \
+ SONG(COLEMAK_SOUND) \
+ }
+#endif
+
+#endif
diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c
new file mode 100644
index 0000000000..f25e2fd32e
--- /dev/null
+++ b/keyboards/vitamins_included/keymaps/default/keymap.c
@@ -0,0 +1,199 @@
+#include QMK_KEYBOARD_H
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _DVORAK 2
+#define _LOWER 3
+#define _RAISE 4
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ LOWER,
+ RAISE,
+ ADJUST
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G | H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Alt |Adjust|Lower |Space |Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_4x12( \
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
+ KC_LCTRL,KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_ortho_4x12( \
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
+ ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_ortho_4x12( \
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
+ ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |RESET | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12( \
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+ RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |RESET |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, RESET, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | |RGB_MOD|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12( \
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \
+)
+
+
+};
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ persistent_default_layer_set(1UL<<_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/vitamins_included/keymaps/default/rules.mk b/keyboards/vitamins_included/keymaps/default/rules.mk
new file mode 100644
index 0000000000..457a3d01d4
--- /dev/null
+++ b/keyboards/vitamins_included/keymaps/default/rules.mk
@@ -0,0 +1,3 @@
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c
new file mode 100644
index 0000000000..7079a8da93
--- /dev/null
+++ b/keyboards/vitamins_included/matrix.c
@@ -0,0 +1,510 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * scan matrix
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include "wait.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "split_util.h"
+#include "pro_micro.h"
+#include "config.h"
+#include "timer.h"
+#include <print.h>
+
+#if (defined(RGB_MIDI) | defined(RGBLIGHT_ANIMATIONS)) & defined(RGBLIGHT_ENABLE)
+ #include "rgblight.h"
+#endif
+
+
+#ifdef USE_I2C
+# include "i2c.h"
+#else // USE_SERIAL
+# include "serial.h"
+#endif
+
+#ifndef DEBOUNCING_DELAY
+# define DEBOUNCING_DELAY 5
+#endif
+
+#if (DEBOUNCING_DELAY > 0)
+ static uint16_t debouncing_time;
+ static bool debouncing = false;
+#endif
+
+#if (MATRIX_COLS <= 8)
+# define print_matrix_header() print("\nr/c 01234567\n")
+# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop(matrix[i])
+# define ROW_SHIFTER ((uint8_t)1)
+#else
+# error "Currently only supports 8 COLS"
+#endif
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+#define ERROR_DISCONNECT_COUNT 5
+
+#define ROWS_PER_HAND (MATRIX_ROWS/2)
+
+static uint8_t error_count = 0;
+
+static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+#if (DIODE_DIRECTION == COL2ROW)
+ static void init_cols(void);
+ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
+ static void unselect_rows(void);
+ static void select_row(uint8_t row);
+ static void unselect_row(uint8_t row);
+#elif (DIODE_DIRECTION == ROW2COL)
+ static void init_rows(void);
+ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
+ static void unselect_cols(void);
+ static void unselect_col(uint8_t col);
+ static void select_col(uint8_t col);
+#endif
+
+
+__attribute__ ((weak))
+void matrix_init_quantum(void) {
+ matrix_init_kb();
+}
+
+__attribute__ ((weak))
+void matrix_scan_quantum(void) {
+ matrix_scan_kb();
+}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+inline
+uint8_t matrix_rows(void) {
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void) {
+ return MATRIX_COLS;
+}
+
+bool has_usb(void) {
+ return UDADDR & _BV(ADDEN); // This will return true of a USB connection has been established
+}
+
+void matrix_init(void)
+{
+#ifdef DISABLE_JTAG
+ // JTAG disable for PORT F. write JTD bit twice within four cycles.
+ MCUCR |= (1<<JTD);
+ MCUCR |= (1<<JTD);
+#endif
+
+ // initialize row and col
+#if (DIODE_DIRECTION == COL2ROW)
+ unselect_rows();
+ init_cols();
+#elif (DIODE_DIRECTION == ROW2COL)
+ unselect_cols();
+ init_rows();
+#endif
+
+ TX_RX_LED_INIT;
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_init();
+ #endif
+
+ timer_init();
+ #ifdef USE_I2C
+ i2c_slave_init(SLAVE_I2C_ADDRESS);
+ #else
+ serial_slave_init();
+ #endif
+
+ sei();
+
+ matrix_init_quantum();
+ while(!has_usb() || contacted_by_master){
+ matrix_slave_scan();
+ }
+
+ // Set up as master
+ #ifdef USE_I2C
+ i2c_reset_state();
+ i2c_master_init();
+ #else
+ serial_master_init();
+ #endif
+}
+
+uint8_t _matrix_scan(void)
+{
+ int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
+#if (DIODE_DIRECTION == COL2ROW)
+ // Set row, read cols
+ for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
+# if (DEBOUNCING_DELAY > 0)
+ bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
+
+ if (matrix_changed) {
+ debouncing = true;
+ debouncing_time = timer_read();
+ PORTD ^= (1 << 2);
+ }
+
+# else
+ read_cols_on_row(matrix+offset, current_row);
+# endif
+
+ }
+
+#elif (DIODE_DIRECTION == ROW2COL)
+ // Set col, read rows
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+# if (DEBOUNCING_DELAY > 0)
+ bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
+ if (matrix_changed) {
+ debouncing = true;
+ debouncing_time = timer_read();
+ }
+# else
+ read_rows_on_col(matrix+offset, current_col);
+# endif
+
+ }
+#endif
+
+# if (DEBOUNCING_DELAY > 0)
+ if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
+ for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
+ matrix[i+offset] = matrix_debouncing[i+offset];
+ }
+ debouncing = false;
+ }
+# endif
+
+ return 1;
+}
+
+#ifdef USE_I2C
+
+// Get rows from other half over i2c
+int i2c_transaction(void) {
+ int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+
+ int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) goto i2c_error;
+
+ // start of matrix stored at 0x00
+ err = i2c_master_write(0x00);
+ if (err) goto i2c_error;
+
+ // Start read
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
+ if (err) goto i2c_error;
+
+ if (!err) {
+ int i;
+ for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+ matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
+ }
+ matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
+ i2c_master_stop();
+ } else {
+i2c_error: // the cable is disconnceted, or something else went wrong
+ i2c_reset_state();
+ return err;
+ }
+
+ return 0;
+}
+
+#else // USE_SERIAL
+
+int serial_transaction(void) {
+ int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+
+ if (serial_update_buffers()) {
+ return 1;
+ }
+
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[slaveOffset+i] = serial_slave_buffer[i];
+ }
+ return 0;
+}
+#endif
+
+uint8_t matrix_scan(void)
+{
+ uint8_t ret = _matrix_scan();
+
+#ifdef USE_I2C
+ if( i2c_transaction() ) {
+#else // USE_SERIAL
+ if( serial_transaction() ) {
+#endif
+ // turn on the indicator led when halves are disconnected
+ TXLED1;
+
+ error_count++;
+
+ if (error_count > ERROR_DISCONNECT_COUNT) {
+ // reset other half if disconnected
+ int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[slaveOffset+i] = 0;
+ }
+ }
+ } else {
+ // turn off the indicator led on no error
+ TXLED0;
+ error_count = 0;
+ }
+ matrix_scan_quantum();
+ return ret;
+}
+
+void matrix_slave_scan(void) {
+ #if defined(RGBLIGHT_ANIMATIONS) & defined(RGBLIGHT_ENABLE)
+ rgblight_task();
+ #endif
+ _matrix_scan();
+
+ int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
+
+#ifdef USE_I2C
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ i2c_slave_buffer[i] = matrix[offset+i];
+ }
+#else // USE_SERIAL
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ serial_slave_buffer[i] = matrix[offset+i];
+ }
+#endif
+}
+
+bool matrix_is_modified(void)
+{
+ if (debouncing) return false;
+ return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+#if (DIODE_DIRECTION == COL2ROW)
+
+static void init_cols(void)
+{
+ for(uint8_t x = 0; x < MATRIX_COLS; x++) {
+ uint8_t pin = col_pins[x];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+ }
+}
+
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
+{
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[current_row];
+
+ // Clear data in matrix row
+ current_matrix[current_row] = 0;
+
+ // Select row and wait for row selecton to stabilize
+ select_row(current_row);
+ wait_us(30);
+
+ // For each col...
+ for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+
+ // Select the col pin to read (active low)
+ uint8_t pin = col_pins[col_index];
+ uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
+
+ // Populate the matrix row with the state of the col pin
+ current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
+ }
+
+ // Unselect row
+ unselect_row(current_row);
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+static void select_row(uint8_t row)
+{
+ uint8_t pin = row_pins[row];
+ _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
+ _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
+}
+
+static void unselect_row(uint8_t row)
+{
+ uint8_t pin = row_pins[row];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+}
+
+static void unselect_rows(void)
+{
+ for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ uint8_t pin = row_pins[x];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+ }
+}
+
+#elif (DIODE_DIRECTION == ROW2COL)
+
+static void init_rows(void)
+{
+ for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ uint8_t pin = row_pins[x];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+ }
+}
+
+static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
+{
+ bool matrix_changed = false;
+
+ // Select col and wait for col selecton to stabilize
+ select_col(current_col);
+ wait_us(30);
+
+ // For each row...
+ for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
+ {
+
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[row_index];
+
+ // Check row pin state
+ if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
+ {
+ // Pin LO, set col bit
+ current_matrix[row_index] |= (ROW_SHIFTER << current_col);
+ }
+ else
+ {
+ // Pin HI, clear col bit
+ current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
+ }
+
+ // Determine if the matrix changed state
+ if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
+ {
+ matrix_changed = true;
+ }
+ }
+
+ // Unselect col
+ unselect_col(current_col);
+
+ return matrix_changed;
+}
+
+static void select_col(uint8_t col)
+{
+ uint8_t pin = col_pins[col];
+ _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
+ _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
+}
+
+static void unselect_col(uint8_t col)
+{
+ uint8_t pin = col_pins[col];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+}
+
+static void unselect_cols(void)
+{
+ for(uint8_t x = 0; x < MATRIX_COLS; x++) {
+ uint8_t pin = col_pins[x];
+ _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
+ _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
+ }
+}
+
+#endif
diff --git a/keyboards/vitamins_included/readme.md b/keyboards/vitamins_included/readme.md
new file mode 100644
index 0000000000..0163f154e0
--- /dev/null
+++ b/keyboards/vitamins_included/readme.md
@@ -0,0 +1,126 @@
+Let's Split Vitamins Included
+======
+![Let's Split Vitamins included, assmebled in 3D printed case](https://i.imgur.com/btl0vNQ.jpg)
+
+This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/
+
+
+**Hardware files for the Let's Split vitamins included are stored [here](http://github.com/duckle29/let-s-Split-v2/tree/onboardMCU)**
+
+## First Time Setup
+
+Clone the `qmk_firmware` repo and navigate to its top level directory. [Once your build environment is setup](https://docs.qmk.fm/getting_started_build_tools.html), you'll be able to generate the default .hex using the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) in the docs
+
+If everything worked correctly you will see a file:
+
+```bash
+lets_split_vitamins_rev1_YOUR_KEYMAP_NAME.hex
+```
+
+If you want, you can flash the hex file to the keyboard right after compilation, by adding `:avrdude` to the end of the make command like so:
+
+```bash
+make lets_split_vitamins/rev1:default:avrdude
+```
+
+This will both compile the hex, and flash the connected half.
+
+For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
+
+
+Features
+--------
+
+For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
+
+Some features supported by the firmware:
+
+* Either half can connect to the computer via USB, or both halves can be used
+ independently.
+* You only need 3 wires to connect the two halves. One for VCC, one for GND and one
+ for serial communication.
+* Optional support for I2C connection between the two halves if for some
+ reason you require a faster connection between the two halves. Note this
+ requires an extra wire between halves and pull-up resistors on the data lines.
+ This is supported on the vitamins included.
+ The extra data line can also be used for ws2812 type LEDs.
+ If neither I2C nor RGB underglow is used, a TRS cable can be used instead of the 4wire TRRS cables.
+
+Required Hardware
+-----------------
+|Amount| Description |
+|--|--|
+| 1 | PCB kit from novelkeys |
+| 48 | MX compatible switches |
+| 48 | 1U keycaps
+| 2 | Half cases. A 3D model for the left half is available [here](https://cad.onshape.com/documents/c6e5ae250d1e24fe46c9ef6c/w/d69f7049c0921df3d2b241f9/e/ecc2b176ab52a6d77bc55051). Mirror that to get a right-half case. Plate cases will be designed in the future.
+| 1 | USB-mini-B cable of your choice |
+| 1 | TRS / TRRS cable
+
+Optional Hardware
+-----------------
+
+A speaker can be hooked-up to the footprint on the PCBs. It is already enabled in the default firmware from github.
+
+A strip of WS2812 LEDs can be hooked up too, a guide will be written on how to do that once I get mine in the mail.
+The PCB and connectors can safely handle 1A of current, but the USB standard is only rated at 500mA. Keep that in mind when picking the amount of LEDs.
+
+
+## Using I2C
+
+On the left half PCB, there's two pads labled ***I2C Pullup*** if you want to use I2C, you need to bridge those two solder jumpers with a soldering iron.
+
+You can change your configuration between serial and i2c by modifying your `config.h` file.
+
+Notes on Software Configuration
+-------------------------------
+
+Configuring the firmware is similar to any other QMK project. One thing
+to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between
+the two halves, so because the let's split vitamins included has 4 rows in each half, it's
+`MATRIX_ROWS=8`.
+
+Also, the current implementation assumes a maximum of 8 columns, but it would
+not be very difficult to adapt it to support more if required.
+
+
+## Entering bootloader
+If the keyboard isn't new, and has been flashed before, you need to enter bootloader.
+To enter bootloader, either use the assigned keys on the keymap, or if none have been put in the keymap, quickly short the reset to gnd twice. (Bottom pins of programming header, see image) ![Reset pins](https://i.imgur.com/LCXlv9W.png)
+
+If using the default keymap, there's a reset key-combination on each half:
+***Lower (SW23) and left-shift (SW13)*** on the left half, or
+***Raise(SW44) and Enter(SW42)*** on the right half
+It is recommended to add such reset keys to any custom keymaps. It shouldn't be necesarry to have one on each half, but the default layout has that.
+
+The board exits bootloader mode after 8 seconds, if you haven't started flashing.
+
+## EEPROM
+
+If this is the first time you're flashing the boards, you have to flash EEPROM
+
+0. If your keyboard is plugged in, unplug it
+1. Open a terminal, and navigate to the qmk_firmware folder
+2. Run `ls /dev | grep tty` Note down which ports you see
+2. Plug the keyboard in, if it's new, it should enter bootloader, if it's not new, see **Entering bootloader** on how to enter bootloader mode
+4. Right after entering bootloader, run `ls /dev | grep tty` again. There should be a new tty, this is the bootloader TTY, note it down. If nothing shows see **Entering bootloader** on how to enter bootloader mode
+6. For the left hand side, run `avrdude -c avr109 -p m32u4 -P /dev/ttyS1 -U eeprom:w:"./keyboards/lets_split_vitamins/eeprom-lefthand.eep":a`
+Replace ***/dev/ttyS1*** with the port you noted down earlier. If you're on windows using msys2, replace ***/dev/ttyS1*** with COM2, note that the number is one higher than the tty number.
+Do the same For the right hand, but change the file to ***eeprom-righthand.eep***
+
+Your EEPROM should be flashed :)
+
+In the future, you shouldn't need to flash EEPROM (it will in fact wear the eeprom memory, so don't)
+
+## Flashing
+If you haven't flashed EEPROM before, do that first.
+
+To flash keymaps onto the keyboard, use:
+```bash
+make lets_split_vitamins/rev1:[KEYMAP]:avrdude
+```
+from the qmk_firmware folder. Default being the default keymap.
+
+You can plug either half into USB and it will work. you can also remove the TRS/TRRS cable, and plug both halves in. (which is why the default layout has reset on both halves)
+
+Enjoy your keyboard! :D
diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h
new file mode 100644
index 0000000000..50168237bc
--- /dev/null
+++ b/keyboards/vitamins_included/rev1/config.h
@@ -0,0 +1,92 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef REV1_CONFIG_H
+#define REV1_CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xBEE5
+#define PRODUCT_ID 0xF33D
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Duckle29
+#define PRODUCT Lets Split sockets vitamins included
+#define DESCRIPTION A split keyboard for the cheapish makers
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_ROW_PINS { F5, F6, C7, F7 }
+#define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6}
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN F0
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 16 // Number of LEDs
+#define ws2812_PORTREG PORTF
+#define ws2812_DDRREG DDRF
+#define RGBLIGHT_ANIMATIONS
+
+/* Audio settings */
+#ifdef AUDIO_ENABLE
+ #define C6_AUDIO // Define this to enable the buzzer
+#endif
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+
+#endif
diff --git a/keyboards/vitamins_included/rev1/rev1.c b/keyboards/vitamins_included/rev1/rev1.c
new file mode 100644
index 0000000000..56fbb87870
--- /dev/null
+++ b/keyboards/vitamins_included/rev1/rev1.c
@@ -0,0 +1,13 @@
+#include "rev1.h"
+
+
+#ifdef SSD1306OLED
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ led_set_user(usb_led);
+}
+#endif
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+};
diff --git a/keyboards/vitamins_included/rev1/rev1.h b/keyboards/vitamins_included/rev1/rev1.h
new file mode 100644
index 0000000000..743c341c3c
--- /dev/null
+++ b/keyboards/vitamins_included/rev1/rev1.h
@@ -0,0 +1,40 @@
+#ifndef REV1_H
+#define REV1_H
+#define DISABLE_JTAG // The keyboard uses PF4, PF5 and PF7, which are used by JTAG.
+#define EE_HANDS // This isn't optional for the vitamins included
+
+#include QMK_KEYBOARD_H
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/interrupt.h>
+#endif
+#endif
+
+//void promicro_bootloader_jmp(bool program);
+
+#define KEYMAP( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { L30, L31, L32, L33, L34, L35 }, \
+ { R00, R01, R02, R03, R04, R05 }, \
+ { R10, R11, R12, R13, R14, R15 }, \
+ { R20, R21, R22, R23, R24, R25 }, \
+ { R30, R31, R32, R33, R34, R35 } \
+ }
+
+#define LAYOUT_ortho_4x12 KEYMAP
+#endif
diff --git a/keyboards/vitamins_included/rev1/rules.mk b/keyboards/vitamins_included/rev1/rules.mk
new file mode 100644
index 0000000000..0542810ee6
--- /dev/null
+++ b/keyboards/vitamins_included/rev1/rules.mk
@@ -0,0 +1,5 @@
+BACKLIGHT_ENABLE = no
+AUDIO_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+DEBUG_ENABLE = no
+CONSOLE_ENABLE = no
diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk
new file mode 100644
index 0000000000..786f247bde
--- /dev/null
+++ b/keyboards/vitamins_included/rules.mk
@@ -0,0 +1,75 @@
+SRC += matrix.c \
+ i2c.c \
+ split_util.c \
+ serial.c \
+ ssd1306.c
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+USE_I2C = no
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+CUSTOM_MATRIX = yes
+
+LAYOUTS = ortho_4x12
+
+DEFAULT_FOLDER = vitamins_included/rev1
diff --git a/keyboards/vitamins_included/serial.c b/keyboards/vitamins_included/serial.c
new file mode 100644
index 0000000000..4d37eeb8d3
--- /dev/null
+++ b/keyboards/vitamins_included/serial.c
@@ -0,0 +1,229 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <stdbool.h>
+#include "serial.h"
+
+#ifndef USE_I2C
+
+// Serial pulse period in microseconds. Its probably a bad idea to lower this
+// value.
+#define SERIAL_DELAY 24
+
+uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+
+#define SLAVE_DATA_CORRUPT (1<<0)
+volatile uint8_t status = 0;
+
+inline static
+void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
+
+inline static
+void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static
+void serial_input(void) {
+ SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static
+uint8_t serial_read_pin(void) {
+ return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static
+void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static
+void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void serial_master_init(void) {
+ serial_output();
+ serial_high();
+}
+
+void serial_slave_init(void) {
+ serial_input();
+
+ // Enable INT0
+ EIMSK |= _BV(INT0);
+ // Trigger on falling edge of INT0
+ EICRA &= ~(_BV(ISC00) | _BV(ISC01));
+}
+
+// Used by the master to synchronize timing with the slave.
+static
+void sync_recv(void) {
+ serial_input();
+ // This shouldn't hang if the slave disconnects because the
+ // serial line will float to high if the slave does disconnect.
+ while (!serial_read_pin());
+ serial_delay();
+}
+
+// Used by the slave to send a synchronization signal to the master.
+static
+void sync_send(void) {
+ serial_output();
+
+ serial_low();
+ serial_delay();
+
+ serial_high();
+}
+
+// Reads a byte from the serial line
+static
+uint8_t serial_read_byte(void) {
+ uint8_t byte = 0;
+ serial_input();
+ for ( uint8_t i = 0; i < 8; ++i) {
+ byte = (byte << 1) | serial_read_pin();
+ serial_delay();
+ _delay_us(1);
+ }
+
+ return byte;
+}
+
+// Sends a byte with MSB ordering
+static
+void serial_write_byte(uint8_t data) {
+ uint8_t b = 8;
+ serial_output();
+ while( b-- ) {
+ if(data & (1 << b)) {
+ serial_high();
+ } else {
+ serial_low();
+ }
+ serial_delay();
+ }
+}
+
+// interrupt handle to be used by the slave device
+ISR(SERIAL_PIN_INTERRUPT) {
+ sync_send();
+
+ uint8_t checksum = 0;
+ for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
+ serial_write_byte(serial_slave_buffer[i]);
+ sync_send();
+ checksum += serial_slave_buffer[i];
+ }
+ serial_write_byte(checksum);
+ sync_send();
+
+ // wait for the sync to finish sending
+ serial_delay();
+
+ // read the middle of pulses
+ _delay_us(SERIAL_DELAY/2);
+
+ uint8_t checksum_computed = 0;
+ for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
+ serial_master_buffer[i] = serial_read_byte();
+ sync_send();
+ checksum_computed += serial_master_buffer[i];
+ }
+ uint8_t checksum_received = serial_read_byte();
+ sync_send();
+
+ serial_input(); // end transaction
+
+ if ( checksum_computed != checksum_received ) {
+ status |= SLAVE_DATA_CORRUPT;
+ } else {
+ status &= ~SLAVE_DATA_CORRUPT;
+ }
+ contacted_by_master = true;
+}
+
+inline
+bool serial_slave_DATA_CORRUPT(void) {
+ return status & SLAVE_DATA_CORRUPT;
+}
+
+// Copies the serial_slave_buffer to the master and sends the
+// serial_master_buffer to the slave.
+//
+// Returns:
+// 0 => no error
+// 1 => slave did not respond
+int serial_update_buffers(void) {
+ // this code is very time dependent, so we need to disable interrupts
+ cli();
+
+ // signal to the slave that we want to start a transaction
+ serial_output();
+ serial_low();
+ _delay_us(1);
+
+ // wait for the slaves response
+ serial_input();
+ serial_high();
+ _delay_us(SERIAL_DELAY);
+
+ // check if the slave is present
+ if (serial_read_pin()) {
+ // slave failed to pull the line low, assume not present
+ sei();
+ return 1;
+ }
+
+ // if the slave is present syncronize with it
+ sync_recv();
+
+ uint8_t checksum_computed = 0;
+ // receive data from the slave
+ for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
+ serial_slave_buffer[i] = serial_read_byte();
+ sync_recv();
+ checksum_computed += serial_slave_buffer[i];
+ }
+ uint8_t checksum_received = serial_read_byte();
+ sync_recv();
+
+ if (checksum_computed != checksum_received) {
+ sei();
+ return 1;
+ }
+
+ uint8_t checksum = 0;
+ // send data to the slave
+ for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
+ serial_write_byte(serial_master_buffer[i]);
+ sync_recv();
+ checksum += serial_master_buffer[i];
+ }
+ serial_write_byte(checksum);
+ sync_recv();
+
+ // always, release the line when not in use
+ serial_output();
+ serial_high();
+
+ sei();
+ return 0;
+}
+
+#endif
diff --git a/keyboards/vitamins_included/serial.h b/keyboards/vitamins_included/serial.h
new file mode 100644
index 0000000000..ade7620b7f
--- /dev/null
+++ b/keyboards/vitamins_included/serial.h
@@ -0,0 +1,27 @@
+#ifndef MY_SERIAL_H
+#define MY_SERIAL_H
+
+#include "config.h"
+#include <stdbool.h>
+#include "split_util.h"
+
+/* TODO: some defines for interrupt setup */
+#define SERIAL_PIN_DDR DDRD
+#define SERIAL_PIN_PORT PORTD
+#define SERIAL_PIN_INPUT PIND
+#define SERIAL_PIN_MASK _BV(PD0)
+#define SERIAL_PIN_INTERRUPT INT0_vect
+
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH 1
+
+// Buffers for master - slave communication
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(void);
+bool serial_slave_data_corrupt(void);
+
+#endif
diff --git a/keyboards/vitamins_included/split_util.c b/keyboards/vitamins_included/split_util.c
new file mode 100644
index 0000000000..b86ad137bf
--- /dev/null
+++ b/keyboards/vitamins_included/split_util.c
@@ -0,0 +1,20 @@
+#include <avr/io.h>
+#include <avr/wdt.h>
+#include <avr/power.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <avr/eeprom.h>
+#include "split_util.h"
+#include "matrix.h"
+#include "keyboard.h"
+#include "config.h"
+#include "timer.h"
+#include "debug.h"
+
+volatile bool isLeftHand = true;
+volatile bool contacted_by_master = false;
+
+// this code runs before the usb and keyboard is initialized
+void matrix_setup(void) {
+ isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
+}
diff --git a/keyboards/vitamins_included/split_util.h b/keyboards/vitamins_included/split_util.h
new file mode 100644
index 0000000000..5acf386e4f
--- /dev/null
+++ b/keyboards/vitamins_included/split_util.h
@@ -0,0 +1,18 @@
+#ifndef SPLIT_KEYBOARD_UTIL_H
+#define SPLIT_KEYBOARD_UTIL_H
+
+#include <stdbool.h>
+#include "eeconfig.h"
+
+#define SLAVE_I2C_ADDRESS 0x32
+
+extern volatile bool isLeftHand;
+extern volatile bool contacted_by_master;
+
+bool has_usb(void);
+
+// slave version of matix scan, defined in matrix.c
+void matrix_slave_scan(void);
+
+
+#endif
diff --git a/keyboards/vitamins_included/vitamins_included.c b/keyboards/vitamins_included/vitamins_included.c
new file mode 100644
index 0000000000..650f26001e
--- /dev/null
+++ b/keyboards/vitamins_included/vitamins_included.c
@@ -0,0 +1,16 @@
+#include QMK_KEYBOARD_H
+
+#ifdef ONEHAND_ENABLE
+__attribute__ ((weak))
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+
+ {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}},
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
+};
+#endif
diff --git a/keyboards/vitamins_included/vitamins_included.h b/keyboards/vitamins_included/vitamins_included.h
new file mode 100644
index 0000000000..b5fbd52940
--- /dev/null
+++ b/keyboards/vitamins_included/vitamins_included.h
@@ -0,0 +1,25 @@
+#ifndef VITAMINS_INCLUDED_H
+#define VITAMINS_INCLUDED_H
+
+#include "quantum.h"
+
+#include "rev1.h"
+
+
+// Used to create a keymap using only KC_ prefixed keys
+#define KC_KEYMAP( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ ) \
+ KEYMAP( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
+ )
+
+#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
+
+#endif
diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json
index f60493762d..ba3c4b5413 100644
--- a/keyboards/xd60/info.json
+++ b/keyboards/xd60/info.json
@@ -4,8 +4,12 @@
"width": 15,
"height": 5,
"layouts": {
- "LAYOUT_ALL": {
+ "LAYOUT_all": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}]
+ },
+
+ "LAYOUT_60_ansi": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
}
}
}
diff --git a/keyboards/xd60/keymaps/Jos/keymap.c b/keyboards/xd60/keymaps/Jos/keymap.c
index 5c5f93622c..87dbad159a 100644
--- a/keyboards/xd60/keymaps/Jos/keymap.c
+++ b/keyboards/xd60/keymaps/Jos/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
// TODO: THOSE ARE IDEAS:
@@ -34,7 +34,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, TD(0), KC_LALT, KC_SPC , KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function 1 Layers
- LAYOUT_ALL(
+ LAYOUT_all(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, KC_PSCR, \
KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS, \
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END),
// 2: GUI/Function 2 Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, KC_PSCR, \
KC_TRNS, KC_TRNS, AC_G_W, AC_G_E, KC_TRNS, AC_G_T, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, AC_G_S, AC_G_D, KC_TRNS, KC_TRNS, AC_G_H, KC_TRNS, KC_TRNS, AC_G_L, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, AC_G_SPC, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END),
// 3: NumPad/Function 3 Toggle Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PSLS, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_NO, KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_4, KC_5, KC_6, KC_PAST, KC_NO, KC_NO, KC_NO, \
KC_TRNS, KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_1, KC_2, KC_3, KC_PMNS, KC_PENT, KC_NO, KC_TRNS, \
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_PENT, KC_PENT, KC_TRNS, KC_TRNS, KC_TRNS) ,
// TRaNSparent layer for reference
-/* LAYOUT_ALL(
+/* LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \
diff --git a/keyboards/xd60/keymaps/birkir/keymap.c b/keyboards/xd60/keymaps/birkir/keymap.c
index 1f3b04e5ec..35b60ae810 100644
--- a/keyboards/xd60/keymaps/birkir/keymap.c
+++ b/keyboards/xd60/keymaps/birkir/keymap.c
@@ -1,10 +1,10 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- KEYMAP(
+ LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// 1: Function Layer
- KEYMAP(
+ LAYOUT_all(
KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, BL_DEC, BL_INC, KC_F13, KC_F14, \
KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// 2: Cool Layer
- KEYMAP(
+ LAYOUT_all(
RESET, BL_DEC, BL_INC, BL_ON, BL_OFF, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_MODE_PLAIN, KC_TRNS, \
KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c
index 5032d0fcc2..3c418c5dc0 100644
--- a/keyboards/xd60/keymaps/cheese/keymap.c
+++ b/keyboards/xd60/keymaps/cheese/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
// Each layer gets a name for readability.
@@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Ctrl|Gui |Alt | Space |FN|Left|Up|Down|Right|
* `-----------------------------------------------------------'
*/
- [_BL] = LAYOUT_ALL(
+ [_BL] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT),
// Function Layer
- [_FL] = LAYOUT_ALL(
+ [_FL] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CALC, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \
KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, \
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PGDN, KC_END),
// Left Shift Layer
- [_LS] = LAYOUT_ALL(
+ [_LS] = LAYOUT_all(
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Right Shift Layer
- [_RS] = LAYOUT_ALL(
+ [_RS] = LAYOUT_all(
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c
index 95dea16b48..f8b44dc0a7 100644
--- a/keyboards/xd60/keymaps/default/keymap.c
+++ b/keyboards/xd60/keymaps/default/keymap.c
@@ -1,10 +1,10 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
- LAYOUT_ALL(
+ LAYOUT_all(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/keymaps/edulpn/keymap.c b/keyboards/xd60/keymaps/edulpn/keymap.c
index 4e9b97da53..4ff00140aa 100644
--- a/keyboards/xd60/keymaps/edulpn/keymap.c
+++ b/keyboards/xd60/keymaps/edulpn/keymap.c
@@ -1,10 +1,10 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_NO, KC_RGUI, KC_RCTL),
// 1: Function Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, \
KC_NO, KC_NO, KC_UP, KC_NO, KC_INSERT, KC_HOME, KC_PGUP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_NO, KC_NO, KC_NO, \
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, KC_END, KC_PGDN, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c
index 2d8824017c..2ca2ea807b 100644
--- a/keyboards/xd60/keymaps/iso/keymap.c
+++ b/keyboards/xd60/keymaps/iso/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
#define _BL 0
@@ -7,7 +7,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- [_BL] = LAYOUT_ALL(
+ [_BL] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_NO, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
@@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
- [_FL] = LAYOUT_ALL(
+ [_FL] = LAYOUT_all(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, \
KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \
KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/keymaps/kmontag42/keymap.c b/keyboards/xd60/keymaps/kmontag42/keymap.c
index 78f7029940..719700d66c 100644
--- a/keyboards/xd60/keymaps/kmontag42/keymap.c
+++ b/keyboards/xd60/keymaps/kmontag42/keymap.c
@@ -1,11 +1,11 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
#include "backlight.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_LEAD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DOT, KC_ENT, \
@@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
// 1: Function Layer
- LAYOUT_ALL(
+ LAYOUT_all(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xd60/keymaps/krusli/keymap.c
index cf3edff403..6a460cd34a 100644
--- a/keyboards/xd60/keymaps/krusli/keymap.c
+++ b/keyboards/xd60/keymaps/krusli/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
#define _______ KC_TRNS
@@ -8,17 +8,17 @@
/* HHKB-like layout for standard 60% layout with split RShift */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = KEYMAP(
+ [_BASE] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, _______, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, F(0), \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, MO(1), \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, _______, KC_APP, KC_RCTL),
- [_FN] = KEYMAP(
+ [_FN] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, \
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_INS, \
- _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_NO, _______ \
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_NO, _______, \
_______, KC_NO, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______),
};
diff --git a/keyboards/xd60/keymaps/petesmom/keymap.c b/keyboards/xd60/keymaps/petesmom/keymap.c
index f89db54b68..d6c9035c28 100644
--- a/keyboards/xd60/keymaps/petesmom/keymap.c
+++ b/keyboards/xd60/keymaps/petesmom/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
#define BASE 0
@@ -9,7 +9,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- [BASE] = LAYOUT_ALL(
+ [BASE] = LAYOUT_all(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
CTL_SLSH, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(FN), KC_LEFT, KC_DOWN, KC_RIGHT
),
// 1: Function Layer
- [FN] = LAYOUT_ALL(
+ [FN] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \
KC_TRNS, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MRWD, KC_MFFD, KC_MSTP, \
KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xd60/keymaps/rooski/keymap.c
index 3083d42055..bea96a30d9 100644
--- a/keyboards/xd60/keymaps/rooski/keymap.c
+++ b/keyboards/xd60/keymaps/rooski/keymap.c
@@ -1,6 +1,6 @@
// XD60 Rev 2.0
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
//#include "action_tapping.h"
#include "backlight.h"
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
// 0: Base Layer
- [_BL] = LAYOUT_ALL(
+ [_BL] = LAYOUT_all(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
- [_FL] = LAYOUT_ALL(
+ [_FL] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_LK), _______, KC_HOME, _______, KC_END),
// 2: Lighting Keys
- [_LK] = LAYOUT_ALL(
+ [_LK] = LAYOUT_all(
TO(_BL), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, \
RESET , KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
diff --git a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c
index 100edaa78e..f0eaa97cb0 100644
--- a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c
+++ b/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_INS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, \
@@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_CAPS, KC_RSFT, KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \
KC_TRNS, BL_TOGG, BL_STEP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_DEL, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xd60/keymaps/stanleylai/keymap.c
index 675c4c5a5e..a0a69c476d 100644
--- a/keyboards/xd60/keymaps/stanleylai/keymap.c
+++ b/keyboards/xd60/keymaps/stanleylai/keymap.c
@@ -1,10 +1,10 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
- LAYOUT_ALL(
+ LAYOUT_all(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \
F(0), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \
@@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END),
// 2: RGB Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_NO, BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_NO, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
diff --git a/keyboards/xd60/keymaps/supercoffee/keymap.c b/keyboards/xd60/keymaps/supercoffee/keymap.c
index 22c4fbd8ec..d42e611e9c 100644
--- a/keyboards/xd60/keymaps/supercoffee/keymap.c
+++ b/keyboards/xd60/keymaps/supercoffee/keymap.c
@@ -1,10 +1,10 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_RALT, KC_NO, KC_RGUI, KC_RCTL),
// 1: Function Layer
- LAYOUT_ALL(
+ LAYOUT_all(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
KC_NO, KC_NO, KC_UP, KC_END, KC_NO, KC_NO, KC_CALC, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/keymaps/yuuki/keymap.c b/keyboards/xd60/keymaps/yuuki/keymap.c
index 31309464b8..7e2fd7a0dd 100644
--- a/keyboards/xd60/keymaps/yuuki/keymap.c
+++ b/keyboards/xd60/keymaps/yuuki/keymap.c
@@ -1,4 +1,4 @@
-#include "xd60.h"
+#include QMK_KEYBOARD_H
#include "action_layer.h"
#define BASE 0
@@ -9,7 +9,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 0: Base Layer
- [BASE] = LAYOUT_ALL(
+ [BASE] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
CTL_SLSH, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
@@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
MO(FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
// 1: Function Layer
- [FN] = LAYOUT_ALL(
+ [FN] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \
KC_TRNS, RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, \
KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \
diff --git a/keyboards/xd60/rules.mk b/keyboards/xd60/rules.mk
index 759347214b..50fba97e5f 100644
--- a/keyboards/xd60/rules.mk
+++ b/keyboards/xd60/rules.mk
@@ -63,3 +63,5 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+LAYOUTS = 60_ansi \ No newline at end of file
diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h
index 8dc0d7ee32..579d67dd34 100644
--- a/keyboards/xd60/xd60.h
+++ b/keyboards/xd60/xd60.h
@@ -14,24 +14,38 @@
* B0 not connected
*/
inline void xd60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
-inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }
+inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }
inline void xd60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
-inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
+inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
/* XD60 Keymap Definition Macro */
-#define LAYOUT_ALL( \
+#define LAYOUT_all( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K47, K3D, K3C, \
K40, K41, K42, K45, K4A, K4B, K48, K4C, K4D \
) { \
- { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
- { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
- { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
- { K40, K41, K42, KC_NO,KC_NO,K45, KC_NO,K47, K48, K49, K4A, K4B, K4C, K4D } \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
+ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D } \
+}
+
+#define LAYOUT_60_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
+ K40, K41, K42, K45, K4A, K4B, K4C, K4D \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \
+ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \
}
#endif
diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c
index b9f1b5c8ab..028fc270de 100644
--- a/keyboards/xd75/keymaps/default/keymap.c
+++ b/keyboards/xd75/keymaps/default/keymap.c
@@ -36,33 +36,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_QW] = { /* QWERTY */
- { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
- { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT },
- { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
- { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
- { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL },
+ { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
+ { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT },
+ { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
+ { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
+ { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL },
},
/* FUNCTION
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | SELECT | CALC | MYCOMP | MAIL | | | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PR SCR |
+ * | SELECT | CALC | MYCOMP | MAIL | RGB HD | RGB HI | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PAUSE |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | PREV | PLAY | NEXT | STOP | | | P4 | P5 | P6 | + | | | | | |
+ * | PREV | PLAY | NEXT | STOP | RGB SD | RGB SI | P4 | P5 | P6 | + | | RESET | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | VOL- | MUTE | VOL+ | | | | P1 | P2 | P3 | PENT | | | | | |
+ * | VOL- | MUTE | VOL+ | APP | RGB VD | RGB VI | P1 | P2 | P3 | PENT | | | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
- * | RESET | | | FN | | | P0 | | P. | PENT | PENT | FN | | | |
+ * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_FN] = { /* FUNCTION */
- { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
- { KC_MSEL, KC_CALC, KC_TRNS, KC_MAIL, KC_SPC, KC_SPC, KC_P7, KC_P8, KC_P9, KC_MINS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS },
- { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, KC_SPC, KC_SPC, KC_P6, KC_P5, KC_P4, KC_PLUS, KC_SPC, KC_TRNS, KC_SPC, KC_SPC, KC_SPC },
- { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, KC_SPC, KC_SPC, KC_P3, KC_P2, KC_P1, KC_TRNS, KC_SPC, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS },
- { RESET, KC_TRNS, KC_TRNS, MO(_FN), KC_SPC, KC_SPC, KC_KP_0, KC_TRNS, KC_PDOT, KC_PENT, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS },
+ { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
+ { KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS },
+ { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______ },
+ { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______ },
+ { _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ },
}
};
diff --git a/keyboards/xd75/keymaps/default/readme.md b/keyboards/xd75/keymaps/default/readme.md
index d53c0f34a8..b29295c748 100644
--- a/keyboards/xd75/keymaps/default/readme.md
+++ b/keyboards/xd75/keymaps/default/readme.md
@@ -1 +1 @@
-# The default keymap for xd75
+# The default keymap for xd75, with led controls
diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md
new file mode 100644
index 0000000000..6b1bce6a5b
--- /dev/null
+++ b/keyboards/ymd75/README.md
@@ -0,0 +1,83 @@
+YMD75 / MT84
+==========================
+
+This is a port of the QMK firmware for boards that are based on the
+ps2avrGB firmware, like the [ps2avrGB keyboard] (https://www.keyclack.com/product/gb-ps2avrgb/), for use on the YMD75, from YMDK. YMDK sell the board and name it "YMD75", however the PCB has "MT84" printed on both sides.
+
+Most of the code was taken and amended from YMD96 and my port JJ50, which in itself was taken from ps2avrGB and amended by Andrew Novak.
+
+Note that this is a complete replacement for the firmware, so you won't be
+using Bootmapper Client to change any keyboard settings, since not all the
+USB report options are supported.
+
+Hardware Supported: YMD75/MT84 with the ATmega32a chip.
+Hardware Availability: The YMD75/MT84 PCB is available from YMDK on AliExpress and suchlike.
+
+This version by Wayne K Jones (github.com/WarmCatUK)
+
+## Installing and Building
+
+Make example for this keyboard (after setting up your build environment):
+
+```
+$ make ymd75:default:program
+```
+It should detect the keyboard and set it to bootloader mode automatically, prior to flashing firmware.
+I've found that I need to remove the previous build/file before making a new one as it doesn't overwrite it; but this might just be my personal experience.
+
+See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
+
+Note that this is a complete replacement for the firmware, so you won't be
+using Bootmapper Client to change any keyboard settings, since not all the
+USB report options are supported.
+In addition you may need the AVR toolchain and `bootloadHID` for flashing:
+
+```
+$ brew cask install crosspack-avr
+$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+```
+
+In order to use the `./program` script, which can reboot the board into
+the bootloader, you'll need Python 2 with PyUSB installed:
+
+```
+$ pip install pyusb
+```
+
+If you prefer, you can just build it and flash the firmware directly with
+`bootloadHID` if you boot the board while holding down `Left Control` to keep it
+in the bootloader:
+
+```
+$ make ymd75
+$ bootloadHID -r ymd75_default.hex
+```
+I dont use windows personally, but the following is from ymd96 regarding flashing the atmega32a:
+
+Since the YMD75/MT84 uses an ATmega32a chip instead of the 32u4, you need to download [HIDBootFlash v.1.0](http://vusb.wikidot.com/project:hidbootflash) for Windows. If anyone knows of a Linux/Mac bootflasher that works, edit this readme!
+On Windows, I use [MINGw](http://www.mingw.org/) to compile the keymaps. On Linux or OSX you can simply use the terminal.
+
+Once you have those two pieces of software:
+Build the keyboard with
+```
+$ make ymd75:default
+```
+If you make your own layout, change the `default` word to whatever your layout is.
+
+And flash the compiled hex file with `HIDBootFlash`. Simply put the board in flashing mode by plugging it in while holding the key below the top right key, and click `find device`. Then you can specify the .hex file and flash it to the device.
+
+
+## Troubleshooting
+
+1. Try plugging the board in while pressing `Backspace` (`Key below the top right key`). This will force it to boot only the bootloader without loading the firmware. Once this is done, just reflash the board with the original firmware.
+2. Sometimes USB hubs can act weird, so try connecting the board directly to your computer or plugging/unplugging the USB hub.
+3. If you get an error such as "Resource Unavailable" when attemting to flash on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` for more info.
+4. I was occasionally finding that I wasn't flashing changes that I was making to my keymap. If that happens, remove the previous build and simply force rebuild by making with:
+```
+$ rm ymd75_default.hex
+$ make -B ymd75:default
+$ make -B ymd75:default:program
+```
+
+
+
diff --git a/keyboards/ymd75/backlight.c b/keyboards/ymd75/backlight.c
new file mode 100644
index 0000000000..1f5e196385
--- /dev/null
+++ b/keyboards/ymd75/backlight.c
@@ -0,0 +1,215 @@
+/**
+ * Backlighting code for PS2AVRGB boards (ATMEGA32A)
+ * Kenneth A. (github.com/krusli | krusli.me)
+ Modified by Wayne K Jones (github.com/WarmCatUK) 2018
+ */
+
+#include "backlight.h"
+#include "quantum.h"
+
+#include <avr/pgmspace.h>
+#include <avr/interrupt.h>
+
+#include "backlight_custom.h"
+#include "breathing_custom.h"
+
+// DEBUG
+#include <stdlib.h>
+#include <stdio.h>
+
+// Port D: digital pins of the AVR chipset
+//#define NUMLOCK_PORT (1 << 2) // 2nd pin of Port D (digital)
+#define CAPSLOCK_PORT (1 << 1) // 1st pin
+#define BACKLIGHT_PORT (1 << 4) // 4th pin
+//#define SCROLLLOCK_PORT (1 << 6) // 6th pin
+
+#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64
+#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default
+
+#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask
+
+#define PWM_MAX 0xFF
+#define TIMER_TOP 255 // 8 bit PWM
+
+extern backlight_config_t backlight_config;
+
+/**
+ * References
+ * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation
+ * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b
+ * Timers: http://www.avrbeginners.net/architecture/timers/timers.html
+ * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/
+ * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware
+ */
+
+// @Override
+// turn LEDs on and off depending on USB caps/num/scroll lock states.
+void led_set_user(uint8_t usb_led) {
+ /*
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+ // turn on
+ DDRD |= NUMLOCK_PORT;
+ PORTD |= NUMLOCK_PORT;
+ } else {
+ // turn off
+ DDRD &= ~NUMLOCK_PORT;
+ PORTD &= ~NUMLOCK_PORT;
+ }
+ */
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ DDRD |= CAPSLOCK_PORT;
+ PORTD |= CAPSLOCK_PORT;
+ } else {
+ DDRD &= ~CAPSLOCK_PORT;
+ PORTD &= ~CAPSLOCK_PORT;
+ }
+ /*
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+ DDRD |= SCROLLLOCK_PORT;
+ PORTD |= SCROLLLOCK_PORT;
+ } else {
+ DDRD &= ~SCROLLLOCK_PORT;
+ PORTD &= ~SCROLLLOCK_PORT;
+ }
+ */
+}
+
+#ifdef BACKLIGHT_ENABLE
+
+// sets up Timer 1 for 8-bit PWM
+void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE
+ // default 8 bit mode
+ TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH
+ TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW
+
+ // clear output compare value A
+ // outb(OCR1AH, 0);
+ // outb(OCR1AL, 0);
+
+ // clear output comparator registers for B
+ OCR1BH = 0; // outb(OCR1BH, 0);
+ OCR1BL = 0; // outb(OCR1BL, 0);
+}
+
+bool is_init = false;
+void timer1Init(void) {
+ // timer1SetPrescaler(TIMER1PRESCALE)
+ // set to DIV/64
+ (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE;
+
+ // reset TCNT1
+ TCNT1H = 0; // outb(TCNT1H, 0);
+ TCNT1L = 0; // outb(TCNT1L, 0);
+
+ // TOIE1: Timer Overflow Interrupt Enable (Timer 1);
+ TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1);
+
+ is_init = true;
+}
+
+void timer1UnInit(void) {
+ // set prescaler back to NONE
+ (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP
+
+ // disable timer overflow interrupt
+ TIMSK &= ~_BV(TOIE1); // overflow bit?
+
+ setPWM(0);
+
+ is_init = false;
+}
+
+
+// handle TCNT1 overflow
+//! Interrupt handler for tcnt1 overflow interrupt
+ISR(TIMER1_OVF_vect, ISR_NOBLOCK)
+{
+ // sei();
+ // handle breathing here
+ #ifdef BACKLIGHT_BREATHING
+ if (is_breathing()) {
+ custom_breathing_handler();
+ }
+ #endif
+
+ // TODO call user defined function
+}
+
+// enable timer 1 PWM
+// timer1PWMBOn()
+void timer1PWMBEnable(void) {
+ // turn on channel B (OC1B) PWM output
+ // set OC1B as non-inverted PWM
+ TCCR1A |= _BV(COM1B1);
+ TCCR1A &= ~_BV(COM1B0);
+}
+
+// disable timer 1 PWM
+// timer1PWMBOff()
+void timer1PWMBDisable(void) {
+ TCCR1A &= ~_BV(COM1B1);
+ TCCR1A &= ~_BV(COM1B0);
+}
+
+void enableBacklight(void) {
+ DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
+ PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
+}
+
+void disableBacklight(void) {
+ // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
+ PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
+}
+
+void startPWM(void) {
+ timer1Init();
+ timer1PWMBEnable();
+ enableBacklight();
+}
+
+void stopPWM(void) {
+ timer1UnInit();
+ disableBacklight();
+ timer1PWMBDisable();
+}
+
+void b_led_init_ports(void) {
+ /* turn backlight on/off depending on user preference */
+ #if BACKLIGHT_ON_STATE == 0
+ // DDRx register: sets the direction of Port D
+ // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input
+ PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low
+ #else
+ DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output
+ PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high
+ #endif
+
+ timer1PWMSetup();
+ startPWM();
+
+ #ifdef BACKLIGHT_BREATHING
+ breathing_enable();
+ #endif
+}
+
+void b_led_set(uint8_t level) {
+ if (level > BACKLIGHT_LEVELS) {
+ level = BACKLIGHT_LEVELS;
+ }
+
+ setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS));
+}
+
+// called every matrix scan
+void b_led_task(void) {
+ // do nothing for now
+}
+
+void setPWM(uint16_t xValue) {
+ if (xValue > TIMER_TOP) {
+ xValue = TIMER_TOP;
+ }
+ OCR1B = xValue; // timer1PWMBSet(xValue);
+}
+
+#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/ymd75/backlight_custom.h b/keyboards/ymd75/backlight_custom.h
new file mode 100644
index 0000000000..7210be840e
--- /dev/null
+++ b/keyboards/ymd75/backlight_custom.h
@@ -0,0 +1,15 @@
+/**
+ * Backlighting code for PS2AVRGB boards (ATMEGA32A)
+ * Kenneth A. (github.com/krusli | krusli.me)
+ */
+
+#ifndef BACKLIGHT_CUSTOM_H
+#define BACKLIGHT_CUSTOM_H
+
+#include <avr/pgmspace.h>
+void b_led_init_ports(void);
+void b_led_set(uint8_t level);
+void b_led_task(void);
+void setPWM(uint16_t xValue);
+
+#endif // BACKLIGHT_CUSTOM_H
diff --git a/keyboards/ymd75/breathing_custom.h b/keyboards/ymd75/breathing_custom.h
new file mode 100644
index 0000000000..71416b1b45
--- /dev/null
+++ b/keyboards/ymd75/breathing_custom.h
@@ -0,0 +1,140 @@
+/**
+ * Breathing effect code for PS2AVRGB boards (ATMEGA32A)
+ * Works in conjunction with `backlight.c`.
+ *
+ * Code adapted from `quantum.c` to register with the existing TIMER1 overflow
+ * handler in `backlight.c` instead of setting up its own timer.
+ * Kenneth A. (github.com/krusli | krusli.me)
+ */
+
+#ifdef BACKLIGHT_ENABLE
+#ifdef BACKLIGHT_BREATHING
+
+#include "backlight_custom.h"
+
+#ifndef BREATHING_PERIOD
+#define BREATHING_PERIOD 6
+#endif
+
+#define breathing_min() do {breathing_counter = 0;} while (0)
+#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0)
+
+// TODO make this share code with quantum.c
+
+#define BREATHING_NO_HALT 0
+#define BREATHING_HALT_OFF 1
+#define BREATHING_HALT_ON 2
+#define BREATHING_STEPS 128
+
+static uint8_t breathing_period = BREATHING_PERIOD;
+static uint8_t breathing_halt = BREATHING_NO_HALT;
+static uint16_t breathing_counter = 0;
+
+static bool breathing = false;
+
+bool is_breathing(void) {
+ return breathing;
+}
+
+// See http://jared.geek.nz/2013/feb/linear-led-pwm
+static uint16_t cie_lightness(uint16_t v) {
+ if (v <= 5243) // if below 8% of max
+ return v / 9; // same as dividing by 900%
+ else {
+ uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
+ // to get a useful result with integer division, we shift left in the expression above
+ // and revert what we've done again after squaring.
+ y = y * y * y >> 8;
+ if (y > 0xFFFFUL) // prevent overflow
+ return 0xFFFFU;
+ else
+ return (uint16_t) y;
+ }
+}
+
+void breathing_enable(void) {
+ breathing = true;
+ breathing_counter = 0;
+ breathing_halt = BREATHING_NO_HALT;
+ // interrupt already registered
+}
+
+void breathing_pulse(void) {
+ if (get_backlight_level() == 0)
+ breathing_min();
+ else
+ breathing_max();
+ breathing_halt = BREATHING_HALT_ON;
+ // breathing_interrupt_enable();
+ breathing = true;
+}
+
+void breathing_disable(void) {
+ breathing = false;
+ // backlight_set(get_backlight_level());
+ b_led_set(get_backlight_level()); // custom implementation of backlight_set()
+}
+
+void breathing_self_disable(void)
+{
+ if (get_backlight_level() == 0)
+ breathing_halt = BREATHING_HALT_OFF;
+ else
+ breathing_halt = BREATHING_HALT_ON;
+}
+
+void breathing_toggle(void) {
+ if (is_breathing())
+ breathing_disable();
+ else
+ breathing_enable();
+}
+
+void breathing_period_set(uint8_t value)
+{
+ if (!value)
+ value = 1;
+ breathing_period = value;
+}
+
+void breathing_period_default(void) {
+ breathing_period_set(BREATHING_PERIOD);
+}
+
+void breathing_period_inc(void)
+{
+ breathing_period_set(breathing_period+1);
+}
+
+void breathing_period_dec(void)
+{
+ breathing_period_set(breathing_period-1);
+}
+
+/* To generate breathing curve in python:
+ * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)]
+ */
+static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+// Use this before the cie_lightness function.
+static inline uint16_t scale_backlight(uint16_t v) {
+ return v / BACKLIGHT_LEVELS * get_backlight_level();
+}
+
+void custom_breathing_handler(void) {
+ uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS;
+ // resetting after one period to prevent ugly reset at overflow.
+ breathing_counter = (breathing_counter + 1) % (breathing_period * 244);
+ uint8_t index = breathing_counter / interval % BREATHING_STEPS;
+
+ if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) ||
+ ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1)))
+ {
+ // breathing_interrupt_disable();
+ }
+
+ setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U)));
+}
+
+#endif // BACKLIGHT_BREATHING
+#endif // BACKLIGHT_ENABLE
diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h
new file mode 100644
index 0000000000..748f43f26e
--- /dev/null
+++ b/keyboards/ymd75/config.h
@@ -0,0 +1,54 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+#define VENDOR_ID 0x20A0
+#define PRODUCT_ID 0x422D
+
+// TODO: share these strings with usbconfig.h
+// Edit usbconfig.h to change these.
+#define MANUFACTURER YMDK
+#define PRODUCT ymd75 / mt84
+#define DESCRIPTION 75% Keyboard
+
+/* matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 15
+#define DIODE_DIRECTION ROW2COL
+
+#define BACKLIGHT_LEVELS 12
+
+#define RGB_DI_PIN E2
+#define RGBLED_NUM 16
+#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_HUE_STEP 12
+#define RGBLIGHT_SAT_STEP 15
+#define RGBLIGHT_VAL_STEP 18
+
+#define NO_UART 1
+#define BOOTLOADHID_BOOTLOADER 1
+
+/* key combination for command */
+#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+#endif
diff --git a/keyboards/ymd75/i2c.c b/keyboards/ymd75/i2c.c
new file mode 100644
index 0000000000..c27f3e3d17
--- /dev/null
+++ b/keyboards/ymd75/i2c.c
@@ -0,0 +1,104 @@
+/*
+Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <avr/io.h>
+#include <util/twi.h>
+
+#include "i2c.h"
+
+void i2c_set_bitrate(uint16_t bitrate_khz) {
+ uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
+ if (bitrate_div >= 16) {
+ bitrate_div = (bitrate_div - 16) / 2;
+ }
+ TWBR = bitrate_div;
+}
+
+void i2c_init(void) {
+ // set pull-up resistors on I2C bus pins
+ PORTC |= 0b11;
+
+ i2c_set_bitrate(400);
+
+ // enable TWI (two-wire interface)
+ TWCR |= (1 << TWEN);
+
+ // enable TWI interrupt and slave address ACK
+ TWCR |= (1 << TWIE);
+ TWCR |= (1 << TWEA);
+}
+
+uint8_t i2c_start(uint8_t address) {
+ // reset TWI control register
+ TWCR = 0;
+
+ // begin transmission and wait for it to end
+ TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
+ while (!(TWCR & (1<<TWINT)));
+
+ // check if the start condition was successfully transmitted
+ if ((TWSR & 0xF8) != TW_START) {
+ return 1;
+ }
+
+ // transmit address and wait
+ TWDR = address;
+ TWCR = (1<<TWINT) | (1<<TWEN);
+ while (!(TWCR & (1<<TWINT)));
+
+ // check if the device has acknowledged the READ / WRITE mode
+ uint8_t twst = TW_STATUS & 0xF8;
+ if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
+ return 1;
+ }
+
+ return 0;
+}
+
+void i2c_stop(void) {
+ TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
+}
+
+uint8_t i2c_write(uint8_t data) {
+ TWDR = data;
+
+ // transmit data and wait
+ TWCR = (1<<TWINT) | (1<<TWEN);
+ while (!(TWCR & (1<<TWINT)));
+
+ if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
+ return 1;
+ }
+
+ return 0;
+}
+
+uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
+ if (i2c_start(address)) {
+ return 1;
+ }
+
+ for (uint16_t i = 0; i < length; i++) {
+ if (i2c_write(data[i])) {
+ return 1;
+ }
+ }
+
+ i2c_stop();
+
+ return 0;
+}
diff --git a/keyboards/ymd75/i2c.h b/keyboards/ymd75/i2c.h
new file mode 100644
index 0000000000..27c9d3d050
--- /dev/null
+++ b/keyboards/ymd75/i2c.h
@@ -0,0 +1,25 @@
+/*
+Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __I2C_H__
+#define __I2C_H__
+
+void i2c_init(void);
+void i2c_set_bitrate(uint16_t bitrate_khz);
+uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
+
+#endif
diff --git a/keyboards/ymd75/info.json b/keyboards/ymd75/info.json
new file mode 100644
index 0000000000..a0610afa3f
--- /dev/null
+++ b/keyboards/ymd75/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "ymd75",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"End", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}]
+ }
+ }
+}
diff --git a/keyboards/ymd75/keymaps/default/keymap.c b/keyboards/ymd75/keymaps/default/keymap.c
new file mode 100644
index 0000000000..17c5244bd2
--- /dev/null
+++ b/keyboards/ymd75/keymaps/default/keymap.c
@@ -0,0 +1,94 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2018 Wayne K Jones <github.com/WarmCatUK>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+#define _MAIN 0
+#define _FN 1
+
+enum custom_keycodes {
+ P_MACRO = SAFE_RANGE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* 0: Main Layer
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PRSCR│ DEL │ FN │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤
+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BACKSPACE │HOME │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤
+ * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ END │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ RETURN │PG_UP│
+ * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │ LSHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHIFT │ UP │PG_DN│
+ * ├──────┬─────┴┬────┴─┬───┴─────┴─────┴─────┴─────┴─────┴────┬┴─────┴─┬───┴────┬─────┼─────┼─────┤
+ * │LCTRL │L_GUI │L_ALT │ SPACE │ R_ALT │ R_CTRL │LEFT │DOWN │RIGHT│
+ * └──────┴──────┴──────┴──────────────────────────────────────┴────────┴────────┴─────┴─────┴─────┘
+ */
+ [_MAIN] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, MO(_FN),
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,KC_QUOT, KC_ENT, KC_PGUP,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ /* 1: Function Layer
+ * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
+ * │R_TOG│R_MOD│R_HUI│R_SAI│R_VAI│R_HUD│R_SAD│R_VAD│ │ │ │VOL- │VOL+ │ │ │ │
+ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤
+ * │BLTOG│BLINC│BLDEC│ £ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├──────┬─────┴┬────┴─┬───┴─────┴─────┴─────┴─────┴─────┴────┬┴─────┴─┬───┴────┬─────┼─────┼─────┤
+ * │ │ │ │ │ │ │ │ │ │
+ * └──────┴──────┴──────┴──────────────────────────────────────┴────────┴────────┴─────┴─────┴─────┘
+ */
+ [_FN] = LAYOUT(
+ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL_TOGG, BL_INC, BL_DEC, P_MACRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS ,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+};
+
+
+// GBP £ Macro (sends alt 156 - windows users only)
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch(keycode) {
+ case P_MACRO:
+ SEND_STRING(SS_DOWN(X_LALT));
+ SEND_STRING(SS_TAP(X_KP_1));
+ SEND_STRING(SS_TAP(X_KP_5));
+ SEND_STRING(SS_TAP(X_KP_6));
+ SEND_STRING(SS_UP(X_LALT));
+ return false; break;
+ }
+ }
+ return true;
+};
diff --git a/keyboards/ymd75/matrix.c b/keyboards/ymd75/matrix.c
new file mode 100644
index 0000000000..a726ee889f
--- /dev/null
+++ b/keyboards/ymd75/matrix.c
@@ -0,0 +1,108 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2018 by Wayne K Jones <github.com/WarmCatUK>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <avr/io.h>
+#include <util/delay.h>
+
+#include "matrix.h"
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+static uint8_t debouncing = DEBOUNCE;
+
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+void matrix_init(void) {
+ // all outputs for rows high
+ DDRB = 0xFF;
+ PORTB = 0xFF;
+ // all inputs for columns
+ DDRA = 0x00;
+ DDRC &= ~(0x111111<<2);
+ DDRD &= ~(1<<PIND7);
+ // all columns are pulled-up
+ PORTA = 0xFF;
+ PORTC |= (0b111111<<2);
+ PORTD |= (1<<PIND7);
+
+ // initialize matrix state: all keys off
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ matrix[row] = 0x00;
+ matrix_debouncing[row] = 0x00;
+ }
+ matrix_init_quantum(); // missing from original port by Luiz
+}
+
+void matrix_set_row_status(uint8_t row) {
+ DDRB = (1 << row);
+ PORTB = ~(1 << row);
+}
+
+uint8_t bit_reverse(uint8_t x) {
+ x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
+ x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
+ x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
+ return x;
+}
+
+uint8_t matrix_scan(void) {
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ matrix_set_row_status(row);
+ _delay_us(5);
+
+ matrix_row_t cols = (
+ // cols 0..7, PORTA 0 -> 7
+ (~PINA) & 0xFF
+ ) | (
+ // cols 8..13, PORTC 7 -> 0
+ bit_reverse((~PINC) & 0xFF) << 8
+ ) | (
+ // col 14, PORTD 7
+ ((~PIND) & (1 << PIND7)) << 7
+ );
+
+ if (matrix_debouncing[row] != cols) {
+ matrix_debouncing[row] = cols;
+ debouncing = DEBOUNCE;
+ }
+ }
+
+ if (debouncing) {
+ if (--debouncing) {
+ _delay_ms(1);
+ } else {
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = matrix_debouncing[i];
+ }
+ }
+ }
+ matrix_scan_quantum(); // also missing in original PS2AVRGB implementation
+ //matrix_scan_user();
+
+ return 1;
+}
+
+inline matrix_row_t matrix_get_row(uint8_t row) {
+ return matrix[row];
+}
+
+void matrix_print(void) {
+}
diff --git a/keyboards/ymd75/program b/keyboards/ymd75/program
new file mode 100644
index 0000000000..a88d9cd9b0
--- /dev/null
+++ b/keyboards/ymd75/program
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import print_function
+
+import os
+import sys
+import time
+import usb
+
+if len(sys.argv) < 2:
+ print('Usage: %s <firmware.hex>' % sys.argv[0])
+ sys.exit(1)
+
+print('Searching for ps2avrGB... ', end='')
+
+dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
+if dev is None:
+ raise ValueError('Device not found')
+
+print('Found', end='\n\n')
+
+print('Device Information:')
+print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
+print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
+print('Manufacturer: %s' % (dev.iManufacturer))
+print('Serial: %s' % (dev.iSerialNumber))
+print('Product: %s' % (dev.iProduct), end='\n\n')
+
+print('Transferring control to bootloader... ', end='')
+
+dev.set_configuration()
+
+request_type = usb.util.build_request_type(
+ usb.util.CTRL_OUT,
+ usb.util.CTRL_TYPE_CLASS,
+ usb.util.CTRL_RECIPIENT_DEVICE)
+
+USBRQ_HID_SET_REPORT = 0x09
+HID_REPORT_OPTION = 0x0301
+
+
+try:
+ dev.ctrl_transfer(
+ request_type,
+ USBRQ_HID_SET_REPORT,
+ HID_REPORT_OPTION,
+ 0,
+ [0, 0, 0xFF] + [0] * 5
+ )
+except usb.core.USBError:
+ # for some reason I keep getting USBError, but it works!
+ pass
+
+# wait a bit until bootloader starts up
+time.sleep(2)
+
+print('OK')
+print('Programming...')
+if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
+ print('\nDone!')
diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk
new file mode 100644
index 0000000000..c9baf13167
--- /dev/null
+++ b/keyboards/ymd75/rules.mk
@@ -0,0 +1,66 @@
+# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+# Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# MCU name
+MCU = atmega32a
+PROTOCOL = VUSB
+
+# unsupported features for now
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+
+# processor frequency
+F_CPU = 12000000
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
+# build options
+BOOTMAGIC_ENABLE = yes
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = yes
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+RGBLIGHT_CUSTOM_DRIVER = yes
+NKRO_ENABLE = no
+# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+
+
+DISABLE_WS2812 = no
+
+KEY_LOCK_ENABLE = yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+
+#OPT_DEFS = -DDEBUG_LEVEL=0
+
+# custom matrix setup
+CUSTOM_MATRIX = yes
+SRC = matrix.c i2c.c backlight.c
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
+
+
+# programming options
+PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
diff --git a/keyboards/ymd75/usbconfig.h b/keyboards/ymd75/usbconfig.h
new file mode 100644
index 0000000000..73afb18e67
--- /dev/null
+++ b/keyboards/ymd75/usbconfig.h
@@ -0,0 +1,396 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#ifndef __usbconfig_h_included__
+#define __usbconfig_h_included__
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT 3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT 2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC 0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT 4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER 3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT 0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE 0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL 1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED 0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+#define USB_CFG_MAX_BUS_POWER 500
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE 1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ 0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL 0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE 0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS 0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF 1
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ * in YL, TCNT0
+ * sts timer0Snapshot, YL
+ * endm
+ * #endif
+ * #define USB_SOF_HOOK myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING 0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC 0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION 0x00, 0x02
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME 'Y', 'M', 'D', 'K'
+#define USB_CFG_VENDOR_NAME_LEN 4
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME 'Y','M','D','7','5',' ','K','e','y','b','o','a','r','d'
+#define USB_CFG_DEVICE_NAME_LEN 14
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
+/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS 0
+#define USB_CFG_DEVICE_SUBCLASS 0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS 3 /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
+ * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ * in static memory is in RAM, not in flash memory.
+ * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ * the driver must know the descriptor's length. The descriptor itself is
+ * found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ * char usbDescriptorDevice[];
+ * char usbDescriptorConfiguration[];
+ * char usbDescriptorHidReport[];
+ * char usbDescriptorString0[];
+ * int usbDescriptorStringVendor[];
+ * int usbDescriptorStringDevice[];
+ * int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ * USB_CFG_DESCR_PROPS_DEVICE
+ * USB_CFG_DESCR_PROPS_CONFIGURATION
+ * USB_CFG_DESCR_PROPS_STRINGS
+ * USB_CFG_DESCR_PROPS_STRING_0
+ * USB_CFG_DESCR_PROPS_STRING_VENDOR
+ * USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ * USB_CFG_DESCR_PROPS_HID
+ * USB_CFG_DESCR_PROPS_HID_REPORT
+ * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE 0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
+#define USB_CFG_DESCR_PROPS_STRINGS 0
+#define USB_CFG_DESCR_PROPS_STRING_0 0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
+#define USB_CFG_DESCR_PROPS_UNKNOWN 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG MCUCR */
+/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE GIMSK */
+/* #define USB_INTR_ENABLE_BIT INT0 */
+/* #define USB_INTR_PENDING GIFR */
+/* #define USB_INTR_PENDING_BIT INTF0 */
+/* #define USB_INTR_VECTOR INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE EIMSK */
+#define USB_INTR_ENABLE_BIT INT1
+/* #define USB_INTR_PENDING EIFR */
+#define USB_INTR_PENDING_BIT INTF1
+#define USB_INTR_VECTOR INT1_vect
+
+#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c
new file mode 100644
index 0000000000..2259dfa5f0
--- /dev/null
+++ b/keyboards/ymd75/ymd75.c
@@ -0,0 +1,95 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "ymd75.h"
+//#include "rgblight.h"
+
+#include <avr/pgmspace.h>
+
+#include "action_layer.h"
+#include "i2c.h"
+#include "quantum.h"
+
+#include "backlight.h"
+#include "backlight_custom.h"
+
+// for keyboard subdirectory level init functions
+// @Override
+void matrix_init_kb(void) {
+ // call user level keymaps, if any
+ matrix_init_user();
+}
+
+#ifdef BACKLIGHT_ENABLE
+/// Overrides functions in `quantum.c`
+void backlight_init_ports(void) {
+ b_led_init_ports();
+}
+
+void backlight_task(void) {
+ b_led_task();
+}
+
+void backlight_set(uint8_t level) {
+ b_led_set(level);
+}
+#endif
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+
+// custom RGB driver
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ for (uint8_t i=0; i<RGBLED_NUM; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ }
+ }
+
+ i2c_init();
+ i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+}
+
+bool rgb_init = false;
+
+void matrix_scan_kb(void) {
+ // if LEDs were previously on before poweroff, turn them back on
+ if (rgb_init == false && rgblight_config.enable) {
+ i2c_init();
+ i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ rgb_init = true;
+ }
+
+ rgblight_task();
+#else
+ void matrix_scan_kb(void) {
+#endif
+ matrix_scan_user();
+ /* Nothing else for now. */
+ }
+
+ __attribute__((weak)) // overridable
+ void matrix_init_user(void) {
+
+ }
+
+ __attribute__((weak)) // overridable
+ void matrix_scan_user(void) {
+
+ }
diff --git a/keyboards/ymd75/ymd75.h b/keyboards/ymd75/ymd75.h
new file mode 100644
index 0000000000..e17dedeb31
--- /dev/null
+++ b/keyboards/ymd75/ymd75.h
@@ -0,0 +1,57 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef KEYMAP_COMMON_H
+#define KEYMAP_COMMON_H
+
+#include "quantum.h"
+#include "quantum_keycodes.h"
+#include "keycode.h"
+#include "action.h"
+
+void matrix_init_user(void);
+
+#define LAYOUT( \
+K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
+K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
+K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
+K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
+K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
+K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \
+){ \
+{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \
+{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
+{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
+{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
+{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
+{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
+{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
+{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
+}
+
+#endif
+
+
+
+
+
+
+
+
+
diff --git a/keyboards/ymd96/keymaps/JJ50/keymap.c b/keyboards/ymd96/keymaps/JJ50/keymap.c
index f59950d445..b70433ee1d 100644
--- a/keyboards/ymd96/keymaps/JJ50/keymap.c
+++ b/keyboards/ymd96/keymaps/JJ50/keymap.c
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DEFLT] = KEYMAP_JJ50( \
+ [_DEFLT] = LAYOUT_jj50( \
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
@@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP_JJ50( \
+ [_RAISE] = LAYOUT_jj50( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \
@@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP_JJ50( \
+ [_LOWER] = LAYOUT_jj50( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \
diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h
index 541ebeb191..221e390ab4 100644
--- a/keyboards/ymd96/ymd96.h
+++ b/keyboards/ymd96/ymd96.h
@@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \
}
-#define KEYMAP_JJ50( \
+#define LAYOUT_jj50( \
K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \
K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \
K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \