summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitris Mantzouranis <d3xter93@gmail.com>2022-01-04 18:36:54 +0200
committerDimitris Mantzouranis <d3xter93@gmail.com>2022-01-04 18:36:54 +0200
commitda202e19000ce035d891d64da86356472806f60a (patch)
tree0be1827d22ae52ca69ede41c9f5a43f28c31d0f2
parent5d2436397f4ccac5ca960edbd315af786e46fda4 (diff)
Add Sonix SN32 keyboards
-rw-r--r--keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.c85
-rw-r--r--keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.h229
-rw-r--r--keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.mk5
-rw-r--r--keyboards/ajazz/ak33/rev1/chconf.h700
-rw-r--r--keyboards/ajazz/ak33/rev1/config.h54
-rw-r--r--keyboards/ajazz/ak33/rev1/config_led.c29
-rw-r--r--keyboards/ajazz/ak33/rev1/config_led.h34
-rw-r--r--keyboards/ajazz/ak33/rev1/halconf.h524
-rw-r--r--keyboards/ajazz/ak33/rev1/info.json13
-rw-r--r--keyboards/ajazz/ak33/rev1/keymaps/default/keymap.c169
-rw-r--r--keyboards/ajazz/ak33/rev1/led_matrix.c81
-rw-r--r--keyboards/ajazz/ak33/rev1/matrix.c544
-rw-r--r--keyboards/ajazz/ak33/rev1/mcuconf.h101
-rw-r--r--keyboards/ajazz/ak33/rev1/readme.md13
-rw-r--r--keyboards/ajazz/ak33/rev1/rev1.h3
-rw-r--r--keyboards/ajazz/ak33/rev1/rules.mk31
-rw-r--r--keyboards/ajazz/ak33/rev2/config.h50
-rw-r--r--keyboards/ajazz/ak33/rev2/config_led.c29
-rw-r--r--keyboards/ajazz/ak33/rev2/config_led.h31
-rw-r--r--keyboards/ajazz/ak33/rev2/info.json13
-rw-r--r--keyboards/ajazz/ak33/rev2/keymaps/default/keymap.c44
-rw-r--r--keyboards/ajazz/ak33/rev2/readme.md13
-rw-r--r--keyboards/ajazz/ak33/rev2/rev2.h4
-rw-r--r--keyboards/ajazz/ak33/rev2/rules.mk31
-rw-r--r--keyboards/ffc/ffc61/chconf.h700
-rw-r--r--keyboards/ffc/ffc61/config.h47
-rw-r--r--keyboards/ffc/ffc61/config_led.c26
-rw-r--r--keyboards/ffc/ffc61/config_led.h33
-rw-r--r--keyboards/ffc/ffc61/ffc61.h4
-rw-r--r--keyboards/ffc/ffc61/halconf.h524
-rw-r--r--keyboards/ffc/ffc61/info.json13
-rw-r--r--keyboards/ffc/ffc61/keymaps/default/keymap.c42
-rw-r--r--keyboards/ffc/ffc61/mcuconf.h89
-rw-r--r--keyboards/ffc/ffc61/readme.md11
-rw-r--r--keyboards/ffc/ffc61/rules.mk62
-rw-r--r--keyboards/flashquark/horizon_z/config.h46
-rw-r--r--keyboards/flashquark/horizon_z/config_led.c29
-rw-r--r--keyboards/flashquark/horizon_z/config_led.h32
-rw-r--r--keyboards/flashquark/horizon_z/horizon_z.h22
-rw-r--r--keyboards/flashquark/horizon_z/info.json12
-rw-r--r--keyboards/flashquark/horizon_z/keymaps/alternate/keymap.c47
-rw-r--r--keyboards/flashquark/horizon_z/keymaps/default/keymap.c68
-rw-r--r--keyboards/flashquark/horizon_z/led_matrix.c77
-rw-r--r--keyboards/flashquark/horizon_z/readme.md12
-rw-r--r--keyboards/flashquark/horizon_z/rules.mk32
-rw-r--r--keyboards/gmmk/compact/chconf.h703
-rw-r--r--keyboards/gmmk/compact/compact.h9
-rw-r--r--keyboards/gmmk/compact/config_led.c40
-rw-r--r--keyboards/gmmk/compact/config_led.h34
-rw-r--r--keyboards/gmmk/compact/halconf.h524
-rw-r--r--keyboards/gmmk/compact/info.json1
-rw-r--r--keyboards/gmmk/compact/led_matrix.c42
-rw-r--r--keyboards/gmmk/compact/readme.md34
-rw-r--r--keyboards/gmmk/compact/rev2/backlight.c281
-rw-r--r--keyboards/gmmk/compact/rev2/config.h67
-rw-r--r--keyboards/gmmk/compact/rev2/iso.h1
-rw-r--r--keyboards/gmmk/compact/rev2/keymaps/default/keymap.c28
-rw-r--r--keyboards/gmmk/compact/rev2/keymaps/iso/keymap.c28
-rw-r--r--keyboards/gmmk/compact/rev2/keymaps/via/keymap.c47
-rw-r--r--keyboards/gmmk/compact/rev2/keymaps/via/rules.mk1
-rw-r--r--keyboards/gmmk/compact/rev2/mcuconf.h57
-rw-r--r--keyboards/gmmk/compact/rev2/readme.md34
-rw-r--r--keyboards/gmmk/compact/rev2/rev2.h19
-rw-r--r--keyboards/gmmk/compact/rev2/rules.mk3
-rw-r--r--keyboards/gmmk/compact/rev3/SPI.h186
-rw-r--r--keyboards/gmmk/compact/rev3/SPI0.c129
-rw-r--r--keyboards/gmmk/compact/rev3/backlight.c191
-rw-r--r--keyboards/gmmk/compact/rev3/config.h67
-rw-r--r--keyboards/gmmk/compact/rev3/keymaps/default/keymap.c29
-rw-r--r--keyboards/gmmk/compact/rev3/keymaps/iso/keymap.c29
-rw-r--r--keyboards/gmmk/compact/rev3/keymaps/via/keymap.c51
-rw-r--r--keyboards/gmmk/compact/rev3/keymaps/via/rules.mk1
-rw-r--r--keyboards/gmmk/compact/rev3/mcuconf.h57
-rw-r--r--keyboards/gmmk/compact/rev3/readme.md34
-rw-r--r--keyboards/gmmk/compact/rev3/rev3.h19
-rw-r--r--keyboards/gmmk/compact/rev3/rules.mk4
-rw-r--r--keyboards/gmmk/compact/rules.mk69
-rw-r--r--keyboards/gmmk/full/VIA_gmmk_full_ansi.json20
-rw-r--r--keyboards/gmmk/full/VIA_gmmk_full_iso.json17
-rw-r--r--keyboards/gmmk/full/boot_return.S12
-rw-r--r--keyboards/gmmk/full/config.h75
-rw-r--r--keyboards/gmmk/full/config_led.c74
-rw-r--r--keyboards/gmmk/full/config_led.h44
-rw-r--r--keyboards/gmmk/full/default.h0
-rw-r--r--keyboards/gmmk/full/full.h22
-rw-r--r--keyboards/gmmk/full/gmmk.c88
-rw-r--r--keyboards/gmmk/full/halconf.h524
-rw-r--r--keyboards/gmmk/full/info.json1
-rw-r--r--keyboards/gmmk/full/iso.h1
-rw-r--r--keyboards/gmmk/full/keymaps/default/keymap.c36
-rw-r--r--keyboards/gmmk/full/keymaps/iso/keymap.c36
-rw-r--r--keyboards/gmmk/full/keymaps/via/keymap.c74
-rw-r--r--keyboards/gmmk/full/keymaps/via/rgb_matrix_user.inc1
-rw-r--r--keyboards/gmmk/full/keymaps/via/ripple.h124
-rw-r--r--keyboards/gmmk/full/keymaps/via/rules.mk2
-rw-r--r--keyboards/gmmk/full/led_matrix.c36
-rw-r--r--keyboards/gmmk/full/mcuconf.h57
-rw-r--r--keyboards/gmmk/full/readme.md33
-rw-r--r--keyboards/gmmk/full/rev2/backlight.c450
-rw-r--r--keyboards/gmmk/full/rev2/readme.md33
-rw-r--r--keyboards/gmmk/full/rev2/rules.mk3
-rw-r--r--keyboards/gmmk/full/rev3/SPI.h186
-rw-r--r--keyboards/gmmk/full/rev3/SPI0.c138
-rw-r--r--keyboards/gmmk/full/rev3/backlight.c311
-rw-r--r--keyboards/gmmk/full/rev3/readme.md33
-rw-r--r--keyboards/gmmk/full/rev3/rules.mk4
-rw-r--r--keyboards/gmmk/full/rules.mk34
-rw-r--r--keyboards/gmmk/tkl/VIA_gmmk_tkl_ansi.json20
-rw-r--r--keyboards/gmmk/tkl/VIA_gmmk_tkl_iso.json17
-rw-r--r--keyboards/gmmk/tkl/boot_return.S12
-rw-r--r--keyboards/gmmk/tkl/config.h75
-rw-r--r--keyboards/gmmk/tkl/config_led.c41
-rw-r--r--keyboards/gmmk/tkl/config_led.h43
-rw-r--r--keyboards/gmmk/tkl/default.h0
-rw-r--r--keyboards/gmmk/tkl/gmmk.c88
-rw-r--r--keyboards/gmmk/tkl/info.json1
-rw-r--r--keyboards/gmmk/tkl/iso.h1
-rw-r--r--keyboards/gmmk/tkl/keymaps/default/keymap.c36
-rw-r--r--keyboards/gmmk/tkl/keymaps/iso/keymap.c36
-rw-r--r--keyboards/gmmk/tkl/keymaps/via/keymap.c72
-rw-r--r--keyboards/gmmk/tkl/keymaps/via/rgb_matrix_user.inc1
-rw-r--r--keyboards/gmmk/tkl/keymaps/via/ripple.h124
-rw-r--r--keyboards/gmmk/tkl/keymaps/via/rules.mk2
-rw-r--r--keyboards/gmmk/tkl/led_matrix.c36
-rw-r--r--keyboards/gmmk/tkl/readme.md28
-rw-r--r--keyboards/gmmk/tkl/rev2/backlight.c448
-rw-r--r--keyboards/gmmk/tkl/rev2/readme.md28
-rw-r--r--keyboards/gmmk/tkl/rev2/rules.mk3
-rw-r--r--keyboards/gmmk/tkl/rev3/SPI.h186
-rw-r--r--keyboards/gmmk/tkl/rev3/SPI0.c138
-rw-r--r--keyboards/gmmk/tkl/rev3/backlight.c297
-rw-r--r--keyboards/gmmk/tkl/rev3/readme.md28
-rw-r--r--keyboards/gmmk/tkl/rev3/rules.mk4
-rw-r--r--keyboards/gmmk/tkl/rules.mk35
-rw-r--r--keyboards/gmmk/tkl/tkl.h22
-rw-r--r--keyboards/keychron/c1/plain/config.h67
-rw-r--r--keyboards/keychron/c1/plain/info.json18
-rw-r--r--keyboards/keychron/c1/plain/keymaps/default/keymap.c102
-rw-r--r--keyboards/keychron/c1/plain/keymaps/via/keymap.c3
-rw-r--r--keyboards/keychron/c1/plain/keymaps/via/rules.mk1
-rw-r--r--keyboards/keychron/c1/plain/plain.c91
-rw-r--r--keyboards/keychron/c1/plain/plain.h31
-rw-r--r--keyboards/keychron/c1/plain/plain.json188
-rw-r--r--keyboards/keychron/c1/plain/rand.c31
-rw-r--r--keyboards/keychron/c1/plain/readme.md74
-rw-r--r--keyboards/keychron/c1/plain/rules.mk23
-rw-r--r--keyboards/keychron/c1/rgb/config.h62
-rw-r--r--keyboards/keychron/c1/rgb/config_led.c31
-rw-r--r--keyboards/keychron/c1/rgb/config_led.h32
-rw-r--r--keyboards/keychron/c1/rgb/info.json18
-rw-r--r--keyboards/keychron/c1/rgb/keymaps/default/keymap.c113
-rw-r--r--keyboards/keychron/c1/rgb/keymaps/via/keymap.c113
-rw-r--r--keyboards/keychron/c1/rgb/keymaps/via/rules.mk1
-rw-r--r--keyboards/keychron/c1/rgb/readme.md90
-rw-r--r--keyboards/keychron/c1/rgb/rgb.c69
-rw-r--r--keyboards/keychron/c1/rgb/rgb.h22
-rw-r--r--keyboards/keychron/c1/rgb/rgb.json17
-rw-r--r--keyboards/keychron/c1/rgb/rules.mk32
-rw-r--r--keyboards/keychron/c1/white/config.h87
-rw-r--r--keyboards/keychron/c1/white/info.json18
-rw-r--r--keyboards/keychron/c1/white/keychron_c1_white_via.json185
-rw-r--r--keyboards/keychron/c1/white/keymaps/default/keymap.c100
-rw-r--r--keyboards/keychron/c1/white/keymaps/via/keymap.c3
-rw-r--r--keyboards/keychron/c1/white/keymaps/via/no_idle_thread.c30
-rw-r--r--keyboards/keychron/c1/white/keymaps/via/rules.mk21
-rw-r--r--keyboards/keychron/c1/white/rand.c31
-rw-r--r--keyboards/keychron/c1/white/readme.md86
-rw-r--r--keyboards/keychron/c1/white/rgb_matrix_kb.inc40
-rw-r--r--keyboards/keychron/c1/white/rules.mk25
-rw-r--r--keyboards/keychron/c1/white/white.c127
-rw-r--r--keyboards/keychron/c1/white/white.h31
-rw-r--r--keyboards/keychron/c2/white/config.h86
-rw-r--r--keyboards/keychron/c2/white/info.json122
-rw-r--r--keyboards/keychron/c2/white/keymaps/default/keymap.c100
-rw-r--r--keyboards/keychron/c2/white/keymaps/via/keymap.c3
-rw-r--r--keyboards/keychron/c2/white/keymaps/via/no_idle_thread.c30
-rw-r--r--keyboards/keychron/c2/white/keymaps/via/rules.mk23
-rw-r--r--keyboards/keychron/c2/white/rand.c31
-rw-r--r--keyboards/keychron/c2/white/readme.md28
-rw-r--r--keyboards/keychron/c2/white/rgb_matrix_kb.inc22
-rw-r--r--keyboards/keychron/c2/white/rules.mk25
-rw-r--r--keyboards/keychron/c2/white/white.c107
-rw-r--r--keyboards/keychron/c2/white/white.h30
-rw-r--r--keyboards/keychron/c2/white/white.json224
-rw-r--r--keyboards/keychron/k14/keymaps/ansi/config.h4
-rw-r--r--keyboards/keychron/k14/keymaps/ansi/keymap.c120
-rw-r--r--keyboards/keychron/k14/keymaps/ansi/via_ansi.json16
-rw-r--r--keyboards/keychron/k14/rgb/config.h43
-rw-r--r--keyboards/keychron/k14/rgb/config_led.c29
-rw-r--r--keyboards/keychron/k14/rgb/config_led.h33
-rw-r--r--keyboards/keychron/k14/rgb/info.json12
-rw-r--r--keyboards/keychron/k14/rgb/k14.h20
-rw-r--r--keyboards/keychron/k14/rgb/optical/readme.md11
-rw-r--r--keyboards/keychron/k14/rgb/optical/rules.mk1
-rw-r--r--keyboards/keychron/k14/rgb/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k14/rgb/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k14/rgb/readme.md13
-rw-r--r--keyboards/keychron/k14/rgb/rgb.h3
-rw-r--r--keyboards/keychron/k14/rgb/rules.mk31
-rw-r--r--keyboards/keychron/k14/rgb/via/readme.md13
-rw-r--r--keyboards/keychron/k14/rgb/via/rules.mk1
-rw-r--r--keyboards/keychron/k2/keymaps/default/config.h4
-rw-r--r--keyboards/keychron/k2/keymaps/default/keymap.c104
-rw-r--r--keyboards/keychron/k2/keymaps/default/via_ansi.json17
-rw-r--r--keyboards/keychron/k2/rgb/config.h43
-rw-r--r--keyboards/keychron/k2/rgb/config_led.c32
-rw-r--r--keyboards/keychron/k2/rgb/config_led.h33
-rw-r--r--keyboards/keychron/k2/rgb/info.json12
-rw-r--r--keyboards/keychron/k2/rgb/k2.h22
-rw-r--r--keyboards/keychron/k2/rgb/optical/readme.md11
-rw-r--r--keyboards/keychron/k2/rgb/optical/rules.mk1
-rw-r--r--keyboards/keychron/k2/rgb/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k2/rgb/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k2/rgb/readme.md13
-rw-r--r--keyboards/keychron/k2/rgb/rgb.h3
-rw-r--r--keyboards/keychron/k2/rgb/rules.mk31
-rw-r--r--keyboards/keychron/k2/rgb/via/readme.md11
-rw-r--r--keyboards/keychron/k2/rgb/via/rules.mk5
-rw-r--r--keyboards/keychron/k3/keymaps/default/config.h4
-rw-r--r--keyboards/keychron/k3/keymaps/default/keymap.c109
-rw-r--r--keyboards/keychron/k3/keymaps/default/via_ansi.json17
-rw-r--r--keyboards/keychron/k3/rgb/config.h39
-rw-r--r--keyboards/keychron/k3/rgb/config_led.c65
-rw-r--r--keyboards/keychron/k3/rgb/config_led.h33
-rw-r--r--keyboards/keychron/k3/rgb/info.json444
-rw-r--r--keyboards/keychron/k3/rgb/k3.h22
-rw-r--r--keyboards/keychron/k3/rgb/optical/readme.md11
-rw-r--r--keyboards/keychron/k3/rgb/optical/rules.mk1
-rw-r--r--keyboards/keychron/k3/rgb/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k3/rgb/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k3/rgb/readme.md15
-rw-r--r--keyboards/keychron/k3/rgb/rgb.h3
-rw-r--r--keyboards/keychron/k3/rgb/rules.mk31
-rw-r--r--keyboards/keychron/k3/rgb/via/readme.md11
-rw-r--r--keyboards/keychron/k3/rgb/via/rules.mk1
-rw-r--r--keyboards/keychron/k4/readme.md14
-rw-r--r--keyboards/keychron/k4/rgb/config.h36
-rw-r--r--keyboards/keychron/k4/rgb/config_led.c57
-rw-r--r--keyboards/keychron/k4/rgb/config_led.h36
-rw-r--r--keyboards/keychron/k4/rgb/readme.md10
-rw-r--r--keyboards/keychron/k4/rgb/rgb.h12
-rw-r--r--keyboards/keychron/k4/rgb/rules.mk10
-rw-r--r--keyboards/keychron/k4/rgb/v1/config.h18
-rw-r--r--keyboards/keychron/k4/rgb/v1/config_led.h31
-rw-r--r--keyboards/keychron/k4/rgb/v1/info.json12
-rw-r--r--keyboards/keychron/k4/rgb/v1/keymaps/default/config.h4
-rw-r--r--keyboards/keychron/k4/rgb/v1/keymaps/default/keymap.c104
-rw-r--r--keyboards/keychron/k4/rgb/v1/keymaps/default/via_ansi.json17
-rw-r--r--keyboards/keychron/k4/rgb/v1/optical/readme.md11
-rw-r--r--keyboards/keychron/k4/rgb/v1/optical/rules.mk1
-rw-r--r--keyboards/keychron/k4/rgb/v1/optical_via/config.h3
-rw-r--r--keyboards/keychron/k4/rgb/v1/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k4/rgb/v1/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k4/rgb/v1/readme.md13
-rw-r--r--keyboards/keychron/k4/rgb/v1/rules.mk20
-rw-r--r--keyboards/keychron/k4/rgb/v1/v1.c8
-rw-r--r--keyboards/keychron/k4/rgb/v1/v1.h22
-rw-r--r--keyboards/keychron/k4/rgb/v1/via/config.h3
-rw-r--r--keyboards/keychron/k4/rgb/v1/via/readme.md11
-rw-r--r--keyboards/keychron/k4/rgb/v1/via/rules.mk1
-rw-r--r--keyboards/keychron/k4/rgb/v2/config.h23
-rw-r--r--keyboards/keychron/k4/rgb/v2/info.json15
-rw-r--r--keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/config.h4
-rw-r--r--keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/keymap.c104
-rw-r--r--keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/via_ansi.json17
-rw-r--r--keyboards/keychron/k4/rgb/v2/keymaps/default_iso/config.h6
-rw-r--r--keyboards/keychron/k4/rgb/v2/keymaps/default_iso/keymap.c104
-rw-r--r--keyboards/keychron/k4/rgb/v2/keymaps/default_iso/via_iso.json16
-rw-r--r--keyboards/keychron/k4/rgb/v2/optical/readme.md11
-rw-r--r--keyboards/keychron/k4/rgb/v2/optical/rules.mk1
-rw-r--r--keyboards/keychron/k4/rgb/v2/optical_via/config.h3
-rw-r--r--keyboards/keychron/k4/rgb/v2/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k4/rgb/v2/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k4/rgb/v2/readme.md14
-rw-r--r--keyboards/keychron/k4/rgb/v2/rules.mk20
-rw-r--r--keyboards/keychron/k4/rgb/v2/v2.h39
-rw-r--r--keyboards/keychron/k4/rgb/v2/via/config.h3
-rw-r--r--keyboards/keychron/k4/rgb/v2/via/readme.md11
-rw-r--r--keyboards/keychron/k4/rgb/v2/via/rules.mk1
-rw-r--r--keyboards/keychron/k6/keymaps/ansi/config.h4
-rw-r--r--keyboards/keychron/k6/keymaps/ansi/keymap.c81
-rw-r--r--keyboards/keychron/k6/keymaps/ansi/via_ansi.json16
-rw-r--r--keyboards/keychron/k6/keymaps/iso/config.h6
-rw-r--r--keyboards/keychron/k6/keymaps/iso/keymap.c115
-rw-r--r--keyboards/keychron/k6/keymaps/iso/via_iso.json16
-rw-r--r--keyboards/keychron/k6/keymaps/stdvar/config.h24
-rw-r--r--keyboards/keychron/k6/keymaps/stdvar/keymap.c210
-rw-r--r--keyboards/keychron/k6/keymaps/stdvar/rules.mk1
-rw-r--r--keyboards/keychron/k6/rgb/config.h43
-rw-r--r--keyboards/keychron/k6/rgb/config_led.c67
-rw-r--r--keyboards/keychron/k6/rgb/config_led.h39
-rw-r--r--keyboards/keychron/k6/rgb/info.json12
-rw-r--r--keyboards/keychron/k6/rgb/optical/readme.md11
-rw-r--r--keyboards/keychron/k6/rgb/optical/rules.mk1
-rw-r--r--keyboards/keychron/k6/rgb/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k6/rgb/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k6/rgb/readme.md17
-rw-r--r--keyboards/keychron/k6/rgb/rgb.h3
-rw-r--r--keyboards/keychron/k6/rgb/rules.mk32
-rw-r--r--keyboards/keychron/k6/rgb/via/readme.md15
-rw-r--r--keyboards/keychron/k6/rgb/via/rules.mk1
-rw-r--r--keyboards/keychron/k6/white/config.h83
-rw-r--r--keyboards/keychron/k6/white/config_led.c74
-rw-r--r--keyboards/keychron/k6/white/rand.c31
-rw-r--r--keyboards/keychron/k6/white/readme.md11
-rw-r--r--keyboards/keychron/k6/white/rules.mk29
-rw-r--r--keyboards/keychron/k6/white/white.c33
-rw-r--r--keyboards/keychron/k6/white/white.h3
-rw-r--r--keyboards/keychron/k7/keymaps/ansi/config.h4
-rw-r--r--keyboards/keychron/k7/keymaps/ansi/keymap.c78
-rw-r--r--keyboards/keychron/k7/keymaps/ansi/via_ansi.json16
-rw-r--r--keyboards/keychron/k7/keymaps/iso/config.h6
-rw-r--r--keyboards/keychron/k7/keymaps/iso/keymap.c115
-rw-r--r--keyboards/keychron/k7/keymaps/iso/via_iso.json16
-rw-r--r--keyboards/keychron/k7/keymaps/stdvar/config.h22
-rw-r--r--keyboards/keychron/k7/keymaps/stdvar/keymap.c213
-rw-r--r--keyboards/keychron/k7/keymaps/stdvar/rules.mk1
-rw-r--r--keyboards/keychron/k7/rgb/config.h45
-rw-r--r--keyboards/keychron/k7/rgb/config_led.c73
-rw-r--r--keyboards/keychron/k7/rgb/config_led.h39
-rw-r--r--keyboards/keychron/k7/rgb/info.json12
-rw-r--r--keyboards/keychron/k7/rgb/optical/readme.md11
-rw-r--r--keyboards/keychron/k7/rgb/optical/rules.mk1
-rw-r--r--keyboards/keychron/k7/rgb/optical_via/readme.md11
-rw-r--r--keyboards/keychron/k7/rgb/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k7/rgb/readme.md19
-rw-r--r--keyboards/keychron/k7/rgb/rgb.h3
-rw-r--r--keyboards/keychron/k7/rgb/rules.mk32
-rw-r--r--keyboards/keychron/k7/rgb/via/readme.md15
-rw-r--r--keyboards/keychron/k7/rgb/via/rules.mk1
-rw-r--r--keyboards/keychron/k8/keymaps/ansi/config.h4
-rw-r--r--keyboards/keychron/k8/keymaps/ansi/k8_via_ansi.json17
-rw-r--r--keyboards/keychron/k8/keymaps/ansi/k8_via_ansi_optical.json17
-rw-r--r--keyboards/keychron/k8/keymaps/ansi/keymap.c117
-rw-r--r--keyboards/keychron/k8/keymaps/ansi/rules.mk14
-rw-r--r--keyboards/keychron/k8/keymaps/iso/config.h6
-rw-r--r--keyboards/keychron/k8/keymaps/iso/k8_via_iso.json17
-rw-r--r--keyboards/keychron/k8/keymaps/iso/keymap.c97
-rw-r--r--keyboards/keychron/k8/rgb/config.h45
-rw-r--r--keyboards/keychron/k8/rgb/config_led.c56
-rw-r--r--keyboards/keychron/k8/rgb/config_led.h38
-rw-r--r--keyboards/keychron/k8/rgb/info.json12
-rw-r--r--keyboards/keychron/k8/rgb/k8.h22
-rw-r--r--keyboards/keychron/k8/rgb/optical/readme.md12
-rw-r--r--keyboards/keychron/k8/rgb/optical/rules.mk1
-rw-r--r--keyboards/keychron/k8/rgb/optical_via/readme.md12
-rw-r--r--keyboards/keychron/k8/rgb/optical_via/rules.mk2
-rw-r--r--keyboards/keychron/k8/rgb/readme.md16
-rw-r--r--keyboards/keychron/k8/rgb/rgb.h3
-rw-r--r--keyboards/keychron/k8/rgb/rules.mk31
-rw-r--r--keyboards/keychron/k8/rgb/via/readme.md16
-rw-r--r--keyboards/keychron/k8/rgb/via/rules.mk1
-rw-r--r--keyboards/marvo/kg938/boards/SN_SN32F240/board.c85
-rw-r--r--keyboards/marvo/kg938/boards/SN_SN32F240/board.h229
-rw-r--r--keyboards/marvo/kg938/boards/SN_SN32F240/board.mk5
-rw-r--r--keyboards/marvo/kg938/chconf.h700
-rw-r--r--keyboards/marvo/kg938/config.h53
-rw-r--r--keyboards/marvo/kg938/config_led.c29
-rw-r--r--keyboards/marvo/kg938/config_led.h36
-rw-r--r--keyboards/marvo/kg938/halconf.h524
-rw-r--r--keyboards/marvo/kg938/info.json13
-rw-r--r--keyboards/marvo/kg938/keymaps/default/keymap.c44
-rw-r--r--keyboards/marvo/kg938/keymaps/default/readme.md5
-rw-r--r--keyboards/marvo/kg938/kg938.h3
-rw-r--r--keyboards/marvo/kg938/led_matrix.c83
-rw-r--r--keyboards/marvo/kg938/matrix.c578
-rw-r--r--keyboards/marvo/kg938/mcuconf.h101
-rw-r--r--keyboards/marvo/kg938/readme.md13
-rw-r--r--keyboards/marvo/kg938/rules.mk31
-rw-r--r--keyboards/redragon/k530/config.h50
-rw-r--r--keyboards/redragon/k530/config_led.c26
-rw-r--r--keyboards/redragon/k530/config_led.h33
-rw-r--r--keyboards/redragon/k530/info.json13
-rw-r--r--keyboards/redragon/k530/k530.h4
-rw-r--r--keyboards/redragon/k530/keymaps/default/keymap.c51
-rw-r--r--keyboards/redragon/k530/readme.md15
-rw-r--r--keyboards/redragon/k530/rules.mk31
-rw-r--r--keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.c85
-rw-r--r--keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.h229
-rw-r--r--keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.mk5
-rw-r--r--keyboards/redragon/k552/rev1/chconf.h700
-rw-r--r--keyboards/redragon/k552/rev1/halconf.h524
-rw-r--r--keyboards/redragon/k552/rev1/info.json13
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/abnt2/config.h57
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.c29
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.h35
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/abnt2/keymap.c177
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/abnt2/readme.md5
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/abnt2/rules.mk2
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/ansi/config.h57
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/ansi/config_led.c29
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/ansi/config_led.h31
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/ansi/keymap.c177
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/ansi/readme.md5
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/ansi/rules.mk2
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/iso/config.h57
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/iso/config_led.c29
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/iso/config_led.h31
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/iso/keymap.c177
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/iso/readme.md5
-rw-r--r--keyboards/redragon/k552/rev1/keymaps/iso/rules.mk2
-rw-r--r--keyboards/redragon/k552/rev1/led_matrix.c82
-rw-r--r--keyboards/redragon/k552/rev1/matrix.c533
-rw-r--r--keyboards/redragon/k552/rev1/mcuconf.h101
-rw-r--r--keyboards/redragon/k552/rev1/readme.md13
-rw-r--r--keyboards/redragon/k552/rev1/rev1.h69
-rw-r--r--keyboards/redragon/k552/rev1/rules.mk30
-rw-r--r--keyboards/redragon/k552/rev2/config.h51
-rw-r--r--keyboards/redragon/k552/rev2/config_led.c29
-rw-r--r--keyboards/redragon/k552/rev2/config_led.h31
-rw-r--r--keyboards/redragon/k552/rev2/info.json13
-rw-r--r--keyboards/redragon/k552/rev2/keymaps/default/keymap.c44
-rw-r--r--keyboards/redragon/k552/rev2/readme.md13
-rw-r--r--keyboards/redragon/k552/rev2/rev2.h4
-rw-r--r--keyboards/redragon/k552/rev2/rules.mk31
-rw-r--r--keyboards/redragon/k556/config.h55
-rw-r--r--keyboards/redragon/k556/config_led.c29
-rw-r--r--keyboards/redragon/k556/config_led.h31
-rw-r--r--keyboards/redragon/k556/info.json13
-rw-r--r--keyboards/redragon/k556/k556.h4
-rw-r--r--keyboards/redragon/k556/keymaps/default/keymap.c44
-rw-r--r--keyboards/redragon/k556/readme.md13
-rw-r--r--keyboards/redragon/k556/rules.mk31
-rwxr-xr-xkeyboards/redragon/k580/config.h68
-rwxr-xr-xkeyboards/redragon/k580/config_led.c31
-rwxr-xr-xkeyboards/redragon/k580/config_led.h34
-rwxr-xr-xkeyboards/redragon/k580/info.json82
-rwxr-xr-xkeyboards/redragon/k580/k580.h4
-rwxr-xr-xkeyboards/redragon/k580/keymaps/default/keymap.c163
-rw-r--r--keyboards/redragon/k580/keymaps/tkon99/config.h38
-rw-r--r--keyboards/redragon/k580/keymaps/tkon99/keymap.c164
-rwxr-xr-xkeyboards/redragon/k580/keymaps/tkon99/rules.mk68
-rwxr-xr-xkeyboards/redragon/k580/led_matrix.c104
-rwxr-xr-xkeyboards/redragon/k580/readme.md14
-rwxr-xr-xkeyboards/redragon/k580/rules.mk35
-rw-r--r--keyboards/redragon/k582/config.h52
-rw-r--r--keyboards/redragon/k582/config_led.c29
-rw-r--r--keyboards/redragon/k582/config_led.h31
-rw-r--r--keyboards/redragon/k582/info.json13
-rw-r--r--keyboards/redragon/k582/k582.h4
-rw-r--r--keyboards/redragon/k582/keymaps/default/keymap.c44
-rw-r--r--keyboards/redragon/k582/readme.md13
-rw-r--r--keyboards/redragon/k582/rules.mk31
-rw-r--r--keyboards/redragon/k630/config.h47
-rw-r--r--keyboards/redragon/k630/config_led.c26
-rw-r--r--keyboards/redragon/k630/config_led.h34
-rw-r--r--keyboards/redragon/k630/info.json13
-rw-r--r--keyboards/redragon/k630/k630.h4
-rw-r--r--keyboards/redragon/k630/keymaps/default/keymap.c50
-rw-r--r--keyboards/redragon/k630/readme.md13
-rw-r--r--keyboards/redragon/k630/rules.mk31
-rw-r--r--keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.c85
-rw-r--r--keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.h229
-rw-r--r--keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.mk5
-rw-r--r--keyboards/sharkoon/sgk3/chconf.h700
-rw-r--r--keyboards/sharkoon/sgk3/halconf.h524
-rw-r--r--keyboards/sharkoon/sgk3/info.json13
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/ansi/config.h53
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/ansi/config_led.c29
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/ansi/config_led.h36
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/ansi/keymap.c178
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/ansi/readme.md5
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/ansi/rules.mk2
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/iso/config.h53
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/iso/config_led.c29
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/iso/config_led.h36
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/iso/keymap.c178
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/iso/readme.md5
-rw-r--r--keyboards/sharkoon/sgk3/keymaps/iso/rules.mk2
-rw-r--r--keyboards/sharkoon/sgk3/led_matrix.c83
-rw-r--r--keyboards/sharkoon/sgk3/matrix.c578
-rw-r--r--keyboards/sharkoon/sgk3/mcuconf.h101
-rw-r--r--keyboards/sharkoon/sgk3/readme.md13
-rw-r--r--keyboards/sharkoon/sgk3/rules.mk30
-rw-r--r--keyboards/sharkoon/sgk3/sgk3.h53
-rw-r--r--keyboards/smartduck/xs61/config.h47
-rw-r--r--keyboards/smartduck/xs61/config_led.c27
-rw-r--r--keyboards/smartduck/xs61/config_led.h31
-rw-r--r--keyboards/smartduck/xs61/info.json74
-rw-r--r--keyboards/smartduck/xs61/keymaps/default/keymap.c44
-rw-r--r--keyboards/smartduck/xs61/led_matrix.c77
-rw-r--r--keyboards/smartduck/xs61/matrix.c362
-rw-r--r--keyboards/smartduck/xs61/readme.md12
-rw-r--r--keyboards/smartduck/xs61/rules.mk32
-rw-r--r--keyboards/smartduck/xs61/xs61.h4
-rw-r--r--keyboards/spcgear/gk530/boards/SN_SN32F240/board.c85
-rw-r--r--keyboards/spcgear/gk530/boards/SN_SN32F240/board.h229
-rw-r--r--keyboards/spcgear/gk530/boards/SN_SN32F240/board.mk5
-rw-r--r--keyboards/spcgear/gk530/chconf.h700
-rw-r--r--keyboards/spcgear/gk530/config.h41
-rw-r--r--keyboards/spcgear/gk530/config_led.c29
-rw-r--r--keyboards/spcgear/gk530/config_led.h35
-rw-r--r--keyboards/spcgear/gk530/gk530.h21
-rw-r--r--keyboards/spcgear/gk530/halconf.h524
-rw-r--r--keyboards/spcgear/gk530/info.json13
-rw-r--r--keyboards/spcgear/gk530/keymaps/default/keymap.c177
-rw-r--r--keyboards/spcgear/gk530/keymaps/default/readme.md5
-rw-r--r--keyboards/spcgear/gk530/led_matrix.c82
-rw-r--r--keyboards/spcgear/gk530/matrix.c533
-rw-r--r--keyboards/spcgear/gk530/mcuconf.h101
-rw-r--r--keyboards/spcgear/gk530/readme.md13
-rw-r--r--keyboards/spcgear/gk530/rules.mk62
-rw-r--r--keyboards/spcgear/gk540/boards/SN_SN32F240/board.c85
-rw-r--r--keyboards/spcgear/gk540/boards/SN_SN32F240/board.h229
-rw-r--r--keyboards/spcgear/gk540/boards/SN_SN32F240/board.mk5
-rw-r--r--keyboards/spcgear/gk540/chconf.h700
-rw-r--r--keyboards/spcgear/gk540/config.h41
-rw-r--r--keyboards/spcgear/gk540/config_led.c29
-rw-r--r--keyboards/spcgear/gk540/config_led.h36
-rw-r--r--keyboards/spcgear/gk540/gk540.h21
-rw-r--r--keyboards/spcgear/gk540/halconf.h524
-rw-r--r--keyboards/spcgear/gk540/info.json13
-rw-r--r--keyboards/spcgear/gk540/keymaps/default/keymap.c180
-rw-r--r--keyboards/spcgear/gk540/keymaps/default/readme.md5
-rw-r--r--keyboards/spcgear/gk540/led_matrix.c83
-rw-r--r--keyboards/spcgear/gk540/matrix.c578
-rw-r--r--keyboards/spcgear/gk540/mcuconf.h101
-rw-r--r--keyboards/spcgear/gk540/readme.md13
-rw-r--r--keyboards/spcgear/gk540/rules.mk62
-rw-r--r--keyboards/womier/k87/config.h56
-rw-r--r--keyboards/womier/k87/config_led.c29
-rw-r--r--keyboards/womier/k87/config_led.h35
-rw-r--r--keyboards/womier/k87/info.json13
-rw-r--r--keyboards/womier/k87/k87.h4
-rw-r--r--keyboards/womier/k87/keymaps/default/keymap.c44
-rw-r--r--keyboards/womier/k87/led_matrix.c82
-rw-r--r--keyboards/womier/k87/matrix.c471
-rw-r--r--keyboards/womier/k87/readme.md13
-rw-r--r--keyboards/womier/k87/rules.mk32
529 files changed, 36994 insertions, 0 deletions
diff --git a/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.c b/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.c
new file mode 100644
index 000000000..a896aea21
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.c
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+ #if SN32_HAS_GPIOA
+ {VAL_GPIOA_MODE},
+ #endif
+ #if SN32_HAS_GPIOB
+ {VAL_GPIOB_MODE},
+ #endif
+ #if SN32_HAS_GPIOC
+ {VAL_GPIOC_MODE},
+ #endif
+ #if SN32_HAS_GPIOD
+ {VAL_GPIOD_MODE},
+ #endif
+};
+#endif
+
+static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
+
+extern void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ sn32_clock_init();
+}
+
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+// SN_GPIO0->MODE = 0xffff;
+// // setP0.0~P0.1, P0.6~P0.7, P0.10~P0.15 to input pull-up
+// SN_GPIO0->CFG = 0x000A0AA0;
+
+// // set P1.2~1.9, P1.12~P1.15 to input pull-up
+// SN_GPIO1->CFG = 0x00A0000A;
+
+// SN_GPIO2->MODE = 0xFFFF;
+// // set P2.4~P2.15 to input pull-up
+// SN_GPIO2->CFG = 0x000000AA;
+
+// // set P3.0~P3.1, P3.4~P3.8 to input pull-up
+// SN_GPIO3->CFG = 0xAAA800A0;
+
+ // Set led pins to output
+// SN_GPIO2->CFG = 0xFFFF;
+// SN_GPIO2->DATA = 0x0; // Set low
+
+ SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
+} \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.h b/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.h
new file mode 100644
index 000000000..99a5982ef
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.h
@@ -0,0 +1,229 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Generic STM32_F303 Board
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_SN32_F240
+#define BOARD_NAME "SN32F240"
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define system_SN32F240
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_PIN0 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_PIN11 11U
+#define GPIOA_PIN12 12U
+#define GPIOA_PIN13 13U
+#define GPIOA_PIN14 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_PIN13 13U
+#define GPIOB_PIN14 14U
+#define GPIOB_PIN15 15U
+
+#define GPIOC_PIN0 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_PIN6 6U
+#define GPIOC_PIN7 7U
+#define GPIOC_PIN8 8U
+#define GPIOC_PIN9 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_PIN14 14U
+#define GPIOC_PIN15 15U
+
+// #define GPIOD_PIN0 0U
+// #define GPIOD_PIN1 1U
+// #define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+// #define GPIOD_PIN12 12U
+// #define GPIOD_PIN13 13U
+// #define GPIOD_PIN14 14U
+// #define GPIOD_PIN15 15U
+
+
+/*
+ * IO lines assignments.
+ */
+// #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
+// #define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+// #define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOD, 5U)
+#define LINE_SWCLK PAL_LINE(GPIOD, 6U)
+
+// #define LINE_PINB8 PAL_LINE(GPIOB, 8U)
+// #define LINE_PINB9 PAL_LINE(GPIOB, 9U)
+
+#define LINE_CAPS_LOCK PAL_LINE(GPIOC, 8U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the SN32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n)))
+#define PIN_MODE_OUTPUT(n) (1U << ((n)))
+#define PIN_MODE_PULLUP(n) (0U << ((n*2)))
+#define PIN_MODE_SCHMITT_EN(n) (10U << ((n*2)))
+#define PIN_MODE_SCHMITT_DIS(n) (11U << ((n*2)))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - PIN0 (input pullup).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA11 - PIN10 (input pullup).
+ * PA11 - PIN11 (input pullup).
+ * PA12 - PIN12 (input pullup).
+ * PA13 - PIN13 (input pullup).
+ * PA14 - PIN14 (input pullup).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODE (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_PIN11) | PIN_MODE_INPUT(GPIOA_PIN12) | PIN_MODE_INPUT(GPIOA_PIN13) | PIN_MODE_INPUT(GPIOA_PIN14) | PIN_MODE_INPUT(GPIOA_PIN15))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - PIN13 (input pullup).
+ * PB14 - PIN14 (input pullup).
+ * PB15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOB_MODE (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
+/*
+ * GPIOC setup:
+ *
+ * PC0 - PIN0 (input pullup).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - PIN6 (input pullup).
+ * PC7 - PIN7 (input pullup).
+ * PC8 - PIN8 (input pullup).
+ * PC9 - PIN9 (input pullup).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - PIN14 (input pullup).
+ * PC15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOC_MODE (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD11 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODE (PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11))
+
+#if !defined(_FROM_ASM_)
+# ifdef __cplusplus
+extern "C" {
+# endif
+void boardInit(void);
+# ifdef __cplusplus
+}
+# endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */ \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.mk b/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.mk
new file mode 100644
index 000000000..e9bfc74b6
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/boards/SN_SN32F240/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/SN_SN32F240/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/SN_SN32F240 \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/chconf.h b/keyboards/ajazz/ak33/rev1/chconf.h
new file mode 100644
index 000000000..2b863e582
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/config.h b/keyboards/ajazz/ak33/rev1/config.h
new file mode 100644
index 000000000..f595153ef
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/config.h
@@ -0,0 +1,54 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5104
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Ajazz
+#define PRODUCT AK33
+#define DESCRIPTION AK33 RGB
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 0
+#define RGB_MATRIX_LED_FLUSH_LIMIT 0
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
diff --git a/keyboards/ajazz/ak33/rev1/config_led.c b/keyboards/ajazz/ak33/rev1/config_led.c
new file mode 100644
index 000000000..0a9496d03
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, NO_LED, 29, 44 },
+ { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 14, 72, 58 },
+ { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, NO_LED, 57, NO_LED, NO_LED, NO_LED },
+ { 59, NO_LED, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, 71, NO_LED },
+ { 73, 74, 75, 76, 77, 13, NO_LED, NO_LED, 78, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 79, 80, 81 }
+}, {
+ { 0 *14, 0 }, { 2 *14, 0 }, { 3 *14, 0 }, { 4 *14, 0 }, { 5 *14, 0 }, { 6 *14, 0 }, { 7 *14, 0 }, { 8 *14, 0 }, { 9 *14, 0 }, { 10 *14, 0 }, { 11 *14, 0 }, { 12 *14, 0 }, { 13 *14, 0 }, { 15 *14, 0 }, { 16 *14, 0 },
+ { 0 *14, 1 }, { 1 *14, 1 }, { 2 *14, 1 }, { 3 *14, 1 }, { 4 *14, 1 }, { 5 *14, 1 }, { 6 *14, 1 }, { 7 *14, 1 }, { 8 *14, 1 }, { 9 *14, 1 }, { 10 *14, 1 }, { 11 *14, 1 }, { 12 *14, 1 }, { 13.5*14, 1 }, { 16 *14, 1 },
+ { .2 *14, 2 }, { 1.5 *14, 2 }, { 2.5 *14, 2 }, { 3.5 *14, 2 }, { 4.5 *14, 2 }, { 5.5 *14, 2 }, { 6.5 *14, 2 }, { 7.5 *14, 2 }, { 8.5 *14, 2 }, { 9.5 *14, 2 }, { 10.5*14, 2 }, { 11.5*14, 2 }, { 12.5*14, 2 }, { 13.8*14, 2 }, { 16 *14, 2 },
+ { .25 *14, 3 }, { 1.8 *14, 3 }, { 2.8 *14, 3 }, { 3.8 *14, 3 }, { 4.8 *14, 3 }, { 5.8 *14, 3 }, { 6.8 *14, 3 }, { 7.8 *14, 3 }, { 8.8 *14, 3 }, { 9.8 *14, 3 }, { 10.8*14, 3 }, { 11.8*14, 3 }, { 13.3*14, 3 }, { 16 *14, 3 },
+ { .5 *14, 4 }, { 2.1 *14, 4 }, { 3.1 *14, 4 }, { 4.1 *14, 4 }, { 5.1 *14, 4 }, { 6.1 *14, 4 }, { 7.1 *14, 4 }, { 8.1 *14, 4 }, { 9.1 *14, 4 }, { 10.1*14, 4 }, { 11.1*14, 4 }, { 12.5*14, 4 }, { 13.1*14, 4 }, { 16 *14, 4 },
+ { .1 *14, 5 }, { 1.2 *14, 5 }, { 2.6 *14, 5 }, { 6.3 *14, 5 }, { 10.1*14, 5 }, { 11.2*14, 5 }, { 12.8*14, 5 }, { 13.1*14, 5 }, { 16 *14, 5 },
+}, {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5,
+} };
+
+#endif
diff --git a/keyboards/ajazz/ak33/rev1/config_led.h b/keyboards/ajazz/ak33/rev1/config_led.h
new file mode 100644
index 000000000..185f47b92
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/config_led.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C14, C15, C5, C6, C7, C8, C9, C10, D0, D1, B6, B7, D2, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (82)
+
+#define LED_CAPS_LOCK_PIN D6
+#define LED_PIN_ON_STATE 0
diff --git a/keyboards/ajazz/ak33/rev1/halconf.h b/keyboards/ajazz/ak33/rev1/halconf.h
new file mode 100644
index 000000000..8c25963fc
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/info.json b/keyboards/ajazz/ak33/rev1/info.json
new file mode 100644
index 000000000..4fc37d933
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "AK33",
+ "url": "http://www.a-jazz.com/en/h-pd-63.html",
+ "maintainer": "HorrorTroll",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+} \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/keymaps/default/keymap.c b/keyboards/ajazz/ak33/rev1/keymaps/default/keymap.c
new file mode 100644
index 000000000..c60d87baa
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/keymaps/default/keymap.c
@@ -0,0 +1,169 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "quantum.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _FN = 1,
+ _GAME = 2,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+// readability
+#define XXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
+ │ Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Fn │ Del │
+ │───────────────────────────────────────────────────────────────│
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│Hom│
+ │───────────────────────────────────────────────────────────────│
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │PgU│
+ │───────────────────────────────────────────────────────────────│
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │PgD│
+ │───────────────────────────────────────────────────────────────│
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │RSft│ ↑  │ End│
+ │───────────────────────────────────────────────────────────────│
+ │LCrl│GUI │LAlt│         Space          │RAlt│RCl│ ←  │ ↓  │ →  │
+ └────┴────┴────┴────────────────────────┴────┴───┴────┴────┴────┘
+
+ ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
+ │ │  │  │  │  │  │  │  │  │  │ │ │ │ │ │
+ │───────────────────────────────────────────────────────────────│
+ │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │
+ │───────────────────────────────────────────────────────────────│
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │  |  │ │
+ │───────────────────────────────────────────────────────────────│
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │    │ │
+ │───────────────────────────────────────────────────────────────│
+ │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │RSft│   │ │
+ │───────────────────────────────────────────────────────────────│
+ │ │  │ │                  │ │ │   │   │   │
+ └────┴────┴────┴────────────────────────┴────┴───┴────┴────┴────┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = { { 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, XXX, XXX, XXX, XXX},
+ { 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, XXX, KC_HOME, KC_PGUP},
+ { 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_DEL, KC_END, KC_PGDN},
+ { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXX, KC_ENT, XXX, XXX, XXX},
+ { KC_LSFT, XXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXX, KC_RSFT, XXX, KC_UP, XXX},
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), XXX, XXX, KC_RCTL, XXX, XXX, XXX, XXX, XXX, KC_LEFT, KC_DOWN, KC_RIGHT}
+ },
+
+/*
+ ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
+ │ Esc │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Fn │ Del │
+ │───────────────────────────────────────────────────────────────│
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│Hom│
+ │───────────────────────────────────────────────────────────────│
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │PgU│
+ │───────────────────────────────────────────────────────────────│
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │PgD│
+ │───────────────────────────────────────────────────────────────│
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │RSft│ ↑  │ End│
+ │───────────────────────────────────────────────────────────────│
+ │LCrl│  │LAlt│         Space          │RAlt│RCl│ ←  │ ↓  │ →  │
+ └────┴────┴────┴────────────────────────┴────┴───┴────┴────┴────┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_GAME] = { { 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, XXX, XXX, XXX, XXX},
+ { 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, XXX, KC_HOME, KC_PGUP},
+ { 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_DEL, KC_END, KC_PGDN},
+ { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXX, KC_ENT, XXX, XXX, XXX},
+ { KC_LSFT, XXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXX, KC_RSFT, XXX, KC_UP, XXX},
+ { KC_LCTL, XXX, KC_LALT, KC_SPC, KC_RALT, MO(_CL), XXX, XXX, KC_RCTL, XXX, XXX, XXX, XXX, XXX, KC_LEFT, KC_DOWN, KC_RIGHT}
+ },
+
+/*
+ ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
+ │RESET│Mut│MeP│Ply│VoD│VoU│Hom│Mai│Mod│Rod│Tog│Hui│Hud│Fn │ Ins │
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │  │Pau│
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │  │   │   │   │   │   │   │ │Vai │PrSc│
+ │───────────────────────────────────────────────────────────────│
+ │ │GAME│ │                  │ │ │Spd │Vad │Spi │
+ └────┴────┴────┴────────────────────────┴────┴───┴────┴────┴────┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_FN] = { { RESET, KC_MUTE, KC_MSEL, KC_MPLY, KC_VOLD, KC_VOLU, KC_WHOM, KC_MAIL, RGB_MOD, RGB_RMOD, RGB_TOG, RGB_HUI, RGB_HUD, XXX, XXX, XXX, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, KC_PAUSE, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, KC_INS, KC_PSCR, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, RGB_VAI, XXX},
+ { XXX, GAME, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, RGB_SPD, RGB_VAD, RGB_SPI}
+ },
+
+/*
+ ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
+ │RESET│Mut│MeP│Ply│VoD│VoU│Hom│Mai│Mod│Rod│Tog│Hui│Hud│Fn │ Ins │
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │  │Pau│
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │
+ │───────────────────────────────────────────────────────────────│
+ │   │   │   │   │  │   │   │   │   │   │   │ │Vai │PrSc│
+ │───────────────────────────────────────────────────────────────│
+ │ │BASE│ │                  │ │ │Spd │Vad │Spi │
+ └────┴────┴────┴────────────────────────┴────┴───┴────┴────┴────┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_CL] = { { RESET, KC_MUTE, KC_MSEL, KC_MPLY, KC_VOLD, KC_VOLU, KC_WHOM, KC_MAIL, RGB_MOD, RGB_RMOD, RGB_TOG, RGB_HUI, RGB_HUD, XXX, XXX, XXX, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, KC_PAUSE, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, KC_INS, KC_PSCR, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX},
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, RGB_VAI, XXX},
+ { XXX, BASE, XXX, XXX, XXX, MO(_CL), XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, RGB_SPD, RGB_VAD, RGB_SPI}
+ }
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D6);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/ajazz/ak33/rev1/led_matrix.c b/keyboards/ajazz/ak33/rev1/led_matrix.c
new file mode 100644
index 000000000..26ca495f4
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/led_matrix.c
@@ -0,0 +1,81 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+}
diff --git a/keyboards/ajazz/ak33/rev1/matrix.c b/keyboards/ajazz/ak33/rev1/matrix.c
new file mode 100644
index 000000000..e11635846
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/matrix.c
@@ -0,0 +1,544 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+#include "CT32.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clocks
+ SN_SYS1->AHBCLKEN_b.CT16B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B2CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B2CLKEN = 1;
+
+ // Set Timer Clock Prescalers
+ SN_SYS1->APBCP0_b.CT16B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT16B1PRE = 0x00;
+ SN_SYS1->APBCP1_b.CT16B2PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B1PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B2PRE = 0x00;
+
+ // PFPA Timer Mapping
+ // CT16B0 PWM0 P0.0 Col 0
+ // PWM1 P0.1 Col 1
+ // CT16B1 PWM1 P1.3 Col 13
+ // PWM2 P0.15 Col 9
+ // CT16B2 PWM0 P0.2 Col 2
+ // PWM1 P1.4 Col 14
+ // PWM2 P1.0 Col 10
+ // CT32B0 PWM0 P0.4 Col 4
+ // PWM1 P1.11 Col 16
+ // PWM3 P1.2 Col 12
+ // CT32B1 PWM1 P1.10 Col 15
+ // PWM2 P0.5 Col 5
+ // PWM3 P0.7 Col 7
+ // CT32B2 PWM0 P1.1 Col 11
+ // PWM1 P0.14 Col 8
+ // PWM2 P0.3 Col 3
+ // PWM3 P0.6 Col 6
+ SN_PFPA->CT16B0 = 0x00000;
+ SN_PFPA->CT16B1 = 0x02330;
+ SN_PFPA->CT16B2 = 0x02010;
+ SN_PFPA->CT32B0 = 0x00410;
+ SN_PFPA->CT32B1 = 0x21300;
+ SN_PFPA->CT32B2 = 0x00030;
+
+ // Set match interrupts and TC reset for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x30;
+ SN_CT16B1->PRE = 0x30;
+ SN_CT16B2->PRE = 0x30;
+ SN_CT32B0->PRE = 0x30;
+ SN_CT32B1->PRE = 0x30;
+ SN_CT32B2->PRE = 0x30;
+
+ // Enable PWM on all timers
+ SN_CT16B0->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN);
+ SN_CT16B1->PWMCTRL =
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B2->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT32B0->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B1->PWMCTRL =
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+
+ // Enable IO
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+
+ // Clear match registers
+ SN_CT16B0->MR0 = 0x0;
+ SN_CT16B0->MR1 = 0x0;
+ SN_CT16B0->MR2 = 0x0;
+ SN_CT16B1->MR0 = 0x0;
+ SN_CT16B1->MR1 = 0x0;
+ SN_CT16B1->MR2 = 0x0;
+ SN_CT16B1->MR3 = 0x0;
+ SN_CT16B2->MR0 = 0x0;
+ SN_CT16B2->MR1 = 0x0;
+ SN_CT16B2->MR2 = 0x0;
+ SN_CT16B2->MR3 = 0x0;
+ SN_CT32B0->MR0 = 0x0;
+ SN_CT32B0->MR1 = 0x0;
+ SN_CT32B0->MR2 = 0x0;
+ SN_CT32B0->MR3 = 0x0;
+ SN_CT32B1->MR0 = 0x0;
+ SN_CT32B1->MR1 = 0x0;
+ SN_CT32B1->MR2 = 0x0;
+ SN_CT32B1->MR3 = 0x0;
+ SN_CT32B2->MR0 = 0x0;
+ SN_CT32B2->MR1 = 0x0;
+ SN_CT32B2->MR2 = 0x0;
+ SN_CT32B2->MR3 = 0x0;
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B0_IRQn);
+ nvicEnableVector(CT16B0_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+/**
+ * @brief MR1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B0_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B0->PWMCTRL = 0;
+ SN_CT16B1->PWMCTRL = 0;
+ SN_CT16B2->PWMCTRL = 0;
+ SN_CT32B0->PWMCTRL = 0;
+ SN_CT32B1->PWMCTRL = 0;
+ SN_CT32B2->PWMCTRL = 0;
+
+ SN_CT16B0->IC = mskCT16_MR3IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Read the key matrix
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Enable the column
+ writePinLow(col_pins[col_index]);
+
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ for (uint8_t delay_idx = 0; delay_idx < 20; delay_idx++)
+ {
+ writePinHigh(col_pins[col_index]);
+ }
+ }
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ if (current_row % 3 == 0)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].r;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].r;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].r;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].r;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].r;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].r;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].r;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].r;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].r;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].r;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].r;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].r;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].r;
+ }
+
+ if (current_row % 3 == 1)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].g;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].g;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].g;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].g;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].g;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].g;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].g;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].g;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].g;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].g;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].g;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].g;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].g;
+ }
+
+ if (current_row % 3 == 2)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].b;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].b;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].b;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].b;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].b;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].b;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].b;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].b;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].b;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].b;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].b;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].b;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].b;
+ }
+
+ // Enable PWM on all timers
+ if(SN_CT16B0->MR0 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT16B0->MR1 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR0 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT32B2->MR2 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B0->MR0 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B1->MR2 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR3 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B1->MR3 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B2->MR1 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT16B2->MR2 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR0 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR3 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR1 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT32B1->MR1 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT32B0->MR1 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+
+ // Set match interrupts and TC rest for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x30;
+ SN_CT16B1->PRE = 0x30;
+ SN_CT16B2->PRE = 0x30;
+ SN_CT32B0->PRE = 0x30;
+ SN_CT32B1->PRE = 0x30;
+ SN_CT32B2->PRE = 0x30;
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
+
+void HardFault_Handler(void) {
+ NVIC_SystemReset();
+}
diff --git a/keyboards/ajazz/ak33/rev1/mcuconf.h b/keyboards/ajazz/ak33/rev1/mcuconf.h
new file mode 100644
index 000000000..2cb5fd2a1
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/mcuconf.h
@@ -0,0 +1,101 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_CT_IRQ_PRIORITY 2
+#define SN32_CT_USE_TIMER 2
+
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define SN32_USB_USE_USB1 TRUE
+#define SN32_USB_LOW_POWER_ON_SUSPEND TRUE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+#define CRT1_AREAS_NUMBER 1
+
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SN32_PWM_USE_TIM1 FALSE
+#define SN32_PWM_USE_TIM2 TRUE
+#define SN32_PWM_TIM1_IRQ_PRIORITY 3
+#define SN32_PWM_TIM2_IRQ_PRIORITY 3
+
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0x2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC 0
+#define ILRC 1
+#define EHSXTAL 2
+#define ELSXTAL 3
+#define PLL 4
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+#define __IHRC_FREQ (12000000UL)
+#define __ILRC_FREQ (32000UL)
+#define __ELS_XTAL_FREQ (32768UL)
+
+#if (SYS_CLOCK_SETUP)
+#define SYS0_PLLCTRL_VAL (PLL_ENABLE<<15) | (PLL_CLKIN<<12) | (PLL_FSEL<<8) | (PLL_PSEL<<5) | PLL_MSEL
+#endif
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */ \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/readme.md b/keyboards/ajazz/ak33/rev1/readme.md
new file mode 100644
index 000000000..2ccbe1924
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/readme.md
@@ -0,0 +1,13 @@
+# Ajazz AK33
+
+AK33
+
+Keyboard Maintainer: [HorrorTroll](https://github.com/HorrorTroll)
+Heavily based on Redragon K552-1 by: [HorrorTroll](https://github.com/HorrorTroll)
+Hardware Supported: SN32F248F
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ajazz/ak33/rev1:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/rev1.h b/keyboards/ajazz/ak33/rev1/rev1.h
new file mode 100644
index 000000000..99b0ccee2
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/rev1.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev1/rules.mk b/keyboards/ajazz/ak33/rev1/rules.mk
new file mode 100644
index 000000000..a08b1e973
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev1/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248F
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom \ No newline at end of file
diff --git a/keyboards/ajazz/ak33/rev2/config.h b/keyboards/ajazz/ak33/rev2/config.h
new file mode 100644
index 000000000..6615f30b4
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/config.h
@@ -0,0 +1,50 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Ajazz
+#define PRODUCT AK33
+#define DESCRIPTION AK33
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 16
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 1
+
+/* 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
+
+#define LED_CAPS_LOCK_PIN B14
+#define LED_PIN_ON_STATE 0
+
+#include "config_led.h"
diff --git a/keyboards/ajazz/ak33/rev2/config_led.c b/keyboards/ajazz/ak33/rev2/config_led.c
new file mode 100644
index 000000000..f33acd921
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
+ { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, NO_LED, 29 },
+ { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44 },
+ { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, NO_LED, 57, NO_LED, 58 },
+ { 59, NO_LED, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, NO_LED, 72 },
+ { 73, 74, 75, NO_LED, NO_LED, NO_LED, 76, NO_LED, NO_LED, NO_LED, 77, 78, 79, 80, NO_LED, 81 }
+}, {
+ { 0 *14, 0 }, { 2 *14, 0 }, { 3 *14, 0 }, { 4 *14, 0 }, { 5 *14, 0 }, { 6 *14, 0 }, { 7 *14, 0 }, { 8 *14, 0 }, { 9 *14, 0 }, { 10 *14, 0 }, { 11 *14, 0 }, { 12 *14, 0 }, { 13 *14, 0 }, { 15 *14, 0 }, { 16 *14, 0 },
+ { 0 *14, 1 }, { 1 *14, 1 }, { 2 *14, 1 }, { 3 *14, 1 }, { 4 *14, 1 }, { 5 *14, 1 }, { 6 *14, 1 }, { 7 *14, 1 }, { 8 *14, 1 }, { 9 *14, 1 }, { 10 *14, 1 }, { 11 *14, 1 }, { 12 *14, 1 }, { 13.5*14, 1 }, { 16 *14, 1 },
+ { .2 *14, 2 }, { 1.5 *14, 2 }, { 2.5 *14, 2 }, { 3.5 *14, 2 }, { 4.5 *14, 2 }, { 5.5 *14, 2 }, { 6.5 *14, 2 }, { 7.5 *14, 2 }, { 8.5 *14, 2 }, { 9.5 *14, 2 }, { 10.5*14, 2 }, { 11.5*14, 2 }, { 12.5*14, 2 }, { 13.8*14, 2 }, { 16 *14, 2 },
+ { .25 *14, 3 }, { 1.8 *14, 3 }, { 2.8 *14, 3 }, { 3.8 *14, 3 }, { 4.8 *14, 3 }, { 5.8 *14, 3 }, { 6.8 *14, 3 }, { 7.8 *14, 3 }, { 8.8 *14, 3 }, { 9.8 *14, 3 }, { 10.8*14, 3 }, { 11.8*14, 3 }, { 13.3*14, 3 }, { 16 *14, 3 },
+ { .5 *14, 4 }, { 2.1 *14, 4 }, { 3.1 *14, 4 }, { 4.1 *14, 4 }, { 5.1 *14, 4 }, { 6.1 *14, 4 }, { 7.1 *14, 4 }, { 8.1 *14, 4 }, { 9.1 *14, 4 }, { 10.1*14, 4 }, { 11.1*14, 4 }, { 12.5*14, 4 }, { 13.1*14, 4 }, { 16 *14, 4 },
+ { .1 *14, 5 }, { 1.2 *14, 5 }, { 2.6 *14, 5 }, { 6.3 *14, 5 }, { 10.1*14, 5 }, { 11.2*14, 5 }, { 12.8*14, 5 }, { 13.1*14, 5 }, { 16 *14, 5 },
+}, {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5,
+} };
+
+#endif
diff --git a/keyboards/ajazz/ak33/rev2/config_led.h b/keyboards/ajazz/ak33/rev2/config_led.h
new file mode 100644
index 000000000..28831dd89
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (82)
diff --git a/keyboards/ajazz/ak33/rev2/info.json b/keyboards/ajazz/ak33/rev2/info.json
new file mode 100644
index 000000000..cf1320bd5
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "AK33",
+ "url": "https://www.redragonzone.com/products/redragonk552",
+ "maintainer": "CalcProgrammer1",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/ajazz/ak33/rev2/keymaps/default/keymap.c b/keyboards/ajazz/ak33/rev2/keymaps/default/keymap.c
new file mode 100644
index 000000000..81c3acc48
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_BASE] = { { KC_ESC, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(_FN), KC_DEL },
+ { 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_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_NO, KC_PGUP },
+ { 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_NO, KC_PGDN },
+ { 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_UP, KC_NO, KC_END },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_NO, KC_RGHT }
+ },
+ [_FN] = { { RESET, KC_MUTE, _______, KC_MPLY, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUSE},
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, KC_PSCR },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, _______, RGB_HUI }
+ }
+};
diff --git a/keyboards/ajazz/ak33/rev2/readme.md b/keyboards/ajazz/ak33/rev2/readme.md
new file mode 100644
index 000000000..f7a458433
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/readme.md
@@ -0,0 +1,13 @@
+# Ajazz AK33
+
+AK33
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ajazz/ak33/rev2:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ajazz/ak33/rev2/rev2.h b/keyboards/ajazz/ak33/rev2/rev2.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/rev2.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/ajazz/ak33/rev2/rules.mk b/keyboards/ajazz/ak33/rev2/rules.mk
new file mode 100644
index 000000000..97109e0f9
--- /dev/null
+++ b/keyboards/ajazz/ak33/rev2/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/ffc/ffc61/chconf.h b/keyboards/ffc/ffc61/chconf.h
new file mode 100644
index 000000000..09edfcd88
--- /dev/null
+++ b/keyboards/ffc/ffc61/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */
diff --git a/keyboards/ffc/ffc61/config.h b/keyboards/ffc/ffc61/config.h
new file mode 100644
index 000000000..c96efa552
--- /dev/null
+++ b/keyboards/ffc/ffc61/config.h
@@ -0,0 +1,47 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Friendly Foes Foundry
+#define PRODUCT FFC61
+#define DESCRIPTION FFC61 Friendly Foes Foundry
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { D11, D10, D9, D8, D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#include "config_led.h"
diff --git a/keyboards/ffc/ffc61/config_led.c b/keyboards/ffc/ffc61/config_led.c
new file mode 100644
index 000000000..67ec398d9
--- /dev/null
+++ b/keyboards/ffc/ffc61/config_led.c
@@ -0,0 +1,26 @@
+#ifdef RGB_MATRIX_ENABLE
+
+# include "rgb_matrix.h"
+# include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40, },
+ { 41, NO_LED, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52, },
+ { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, 59, NO_LED, 60, },
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 14*12, 0 },
+ { 1 *12, 1 }, { 2 *12, 1 }, { 3 *12, 1 }, { 4 *12, 1 }, { 5 *12, 1 }, { 6 *12, 1 }, { 7 *12, 1 }, { 8 *12, 1 }, { 9 *12, 1 }, { 10*12, 1 }, { 11*12, 1 }, { 12*12, 1 }, { 13*12, 1 }, { 14*12, 1 },
+ { 1 *12, 2 }, { 2 *12, 2 }, { 3 *12, 2 }, { 4 *12, 2 }, { 5 *12, 2 }, { 6 *12, 2 }, { 7 *12, 2 }, { 8 *12, 2 }, { 9 *12, 2 }, { 10*12, 2 }, { 11*12, 2 }, { 12*12, 2 }, { 14*12, 2 },
+ { 1 *12, 3 }, { 3 *12, 3 }, { 4 *12, 3 }, { 5 *12, 3 }, { 6 *12, 3 }, { 7 *12, 3 }, { 8 *12, 3 }, { 9 *12, 3 }, { 10*12, 3 }, { 11*12, 3 }, { 12*12, 3 }, { 14*12, 3 },
+ { 1 *12, 4 }, { 2 *12, 4 }, { 3 *12, 4 }, { 7 *12, 4 }, { 10*12, 4 }, { 11*12, 4 }, { 12*12, 4 }, { 14*12, 4 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/ffc/ffc61/config_led.h b/keyboards/ffc/ffc61/config_led.h
new file mode 100644
index 000000000..e93047432
--- /dev/null
+++ b/keyboards/ffc/ffc61/config_led.h
@@ -0,0 +1,33 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS 5
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 }
+
+#define LED_MATRIX_COLS 14
+#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 }
+
+#define DRIVER_LED_TOTAL (61)
+
+#define LED_PIN_ON_STATE 0
diff --git a/keyboards/ffc/ffc61/ffc61.h b/keyboards/ffc/ffc61/ffc61.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/ffc/ffc61/ffc61.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/ffc/ffc61/halconf.h b/keyboards/ffc/ffc61/halconf.h
new file mode 100644
index 000000000..af95d6285
--- /dev/null
+++ b/keyboards/ffc/ffc61/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */
diff --git a/keyboards/ffc/ffc61/info.json b/keyboards/ffc/ffc61/info.json
new file mode 100644
index 000000000..795dcb9fc
--- /dev/null
+++ b/keyboards/ffc/ffc61/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K530",
+ "url": "https://www.redragonzone.com/products/redragonk530",
+ "maintainer": "CalcProgrammer1",
+ "width": 14,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/ffc/ffc61/keymaps/default/keymap.c b/keyboards/ffc/ffc61/keymaps/default/keymap.c
new file mode 100644
index 000000000..a96c1729d
--- /dev/null
+++ b/keyboards/ffc/ffc61/keymaps/default/keymap.c
@@ -0,0 +1,42 @@
+/*
+Copyright 2021 Adam Honse
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_BASE] = { { 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_NO, KC_RSFT, },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, MO(_FN), KC_APP, KC_NO, KC_RCTL, },
+ },
+ [_FN] = { { 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, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_SLCK, KC_BRK, _______, },
+ { _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_MUTE, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_END, KC_PGDN, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, },
+ }
+};
diff --git a/keyboards/ffc/ffc61/mcuconf.h b/keyboards/ffc/ffc61/mcuconf.h
new file mode 100644
index 000000000..3822c454e
--- /dev/null
+++ b/keyboards/ffc/ffc61/mcuconf.h
@@ -0,0 +1,89 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24x drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24x_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+/*
+ * CT driver system settings.
+ */
+#define SN32_HAS_CT16B0 TRUE
+#define SN32_HAS_CT16B1 TRUE
+/*
+ * PWM driver system settings.
+ */
+#define HAL_USE_PWM TRUE
+#define SN32_PWM_USE_CT16B1 TRUE
+#define SN32_PWM_NO_RESET TRUE
+/*
+ * SN driver system settings.
+ */
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define CRT1_AREAS_NUMBER 1
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC48 0
+#define ILRC 1
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+//#define __IHRC48_FREQ (48000000UL)
+//#define __ILRC_FREQ (32000UL)
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */
diff --git a/keyboards/ffc/ffc61/readme.md b/keyboards/ffc/ffc61/readme.md
new file mode 100644
index 000000000..1cc20a779
--- /dev/null
+++ b/keyboards/ffc/ffc61/readme.md
@@ -0,0 +1,11 @@
+# Friendly Foes Foundry FFC61
+
+ffc61
+
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ffc/ffc61:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ffc/ffc61/rules.mk b/keyboards/ffc/ffc61/rules.mk
new file mode 100644
index 000000000..56f9ac79b
--- /dev/null
+++ b/keyboards/ffc/ffc61/rules.mk
@@ -0,0 +1,62 @@
+# project specific files
+SRC = ../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+## chip/board settings
+# - the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = SN32
+MCU_SERIES = SN32F240B
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = SN32F240B
+
+# Startup code to use
+# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = sn32f24xb
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = SN_SN32F240B
+
+# Cortex version
+MCU = cortex-m0
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+
+# BOOTLOADER = flash
+SN32_BOOTLOADER_ADDRESS = 0x1FFF0301
+
+OPT_DEFS = -O2
+
+# Options to pass to dfu-util when flashing
+# DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+# DFU_SUFFIX_ARGS = -p DF11 -v 0483
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/flashquark/horizon_z/config.h b/keyboards/flashquark/horizon_z/config.h
new file mode 100644
index 000000000..d961851a0
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/config.h
@@ -0,0 +1,46 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x05AC
+#define PRODUCT_ID 0x024F
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Flashquark
+#define PRODUCT Horizon Z
+#define DESCRIPTION Horizon Z
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D5, D6 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+#include "config_led.h"
diff --git a/keyboards/flashquark/horizon_z/config_led.c b/keyboards/flashquark/horizon_z/config_led.c
new file mode 100644
index 000000000..9e91d9988
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// readability
+#define NA NO_LED
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NA, 40, },
+ { 41, NA, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NA, 52, },
+ { 53, 54, 55, NA, NA, NA, 56, NA, NA, NA, 57, 58, 59, 60, }
+}, {
+ {0 , 0}, {16 , 0}, {33 , 0}, {49 , 0}, {66 , 0}, {82 , 0}, {99 , 0}, {115 , 0}, {132, 0}, {148, 0}, {165, 0}, {181, 0}, {198, 0}, {214, 0},
+ {3 , 16}, {23 , 16}, {39 , 16}, {56 , 16}, {72 , 16}, {88 , 16}, {105 , 16}, {121 , 16}, {138, 16}, {154, 16}, {171, 16}, {187, 16}, {204, 16}, {220, 16},
+ {5 , 32}, {26 , 32}, {42 , 32}, {59 , 32}, {75 , 32}, {92 , 32}, {108 , 32}, {124 , 32}, {141, 32}, {157, 32}, {174, 32}, {190, 32}, {214, 32},
+ {8 , 48}, {28 , 48}, {48 , 48}, {65 , 48}, {81 , 48}, {98 , 48}, {114 , 48}, {131, 48}, {147, 48}, {164, 48}, {180, 48}, {201, 48},
+ {2 , 64}, {12 , 64}, {28 , 64}, {100 , 64}, {163, 64}, {182, 64}, {205, 64}, {221, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/flashquark/horizon_z/config_led.h b/keyboards/flashquark/horizon_z/config_led.h
new file mode 100644
index 000000000..6bca4a760
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/config_led.h
@@ -0,0 +1,32 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (61) \ No newline at end of file
diff --git a/keyboards/flashquark/horizon_z/horizon_z.h b/keyboards/flashquark/horizon_z/horizon_z.h
new file mode 100644
index 000000000..8e77ff750
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/horizon_z.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, k1i, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2f, k2g, k2h, k2i, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3f, k3g, k3h, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, k4f, k4g, k4h, k4i, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g, k5h \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX, k1f, k1g, k1h, k1i}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f, k2g, k2h, k2i}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, k3f, k3g, k3h, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e, k4f, k4g, k4h, k4i}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f, k5g, k5h, XXX} \
+}
diff --git a/keyboards/flashquark/horizon_z/info.json b/keyboards/flashquark/horizon_z/info.json
new file mode 100644
index 000000000..da207fea7
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Flashquark Horizon Z",
+ "url": "https://flashquark.com/product/flashquark-horizon-z-with-outemu-silent-sky-switches/",
+ "maintainer": "CalcProgrammer1",
+ "width": 19,
+ "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":"home", "x":13, "y":0}, {"label":"end", "x":14, "y":0}, {"label":"pgup", "x":15, "y":0}, {"label":"pgdn", "x":16, "y":0}, {"label":"del", "x":17, "y":0}, {"label":"rgb", "x":18, "y":0}, {"label":"` ~", "x":0, "y":1}, {"label":"1 !", "x":1, "y":1}, {"label":"2 @", "x":2, "y":1}, {"label":"3 #", "x":3, "y":1}, {"label":"4 $", "x":4, "y":1}, {"label":"5 %", "x":5, "y":1}, {"label":"6 ^", "x":6, "y":1}, {"label":"7 &", "x":7, "y":1}, {"label":"8 *", "x":8, "y":1}, {"label":"9 (", "x":9, "y":1}, {"label":"0 )", "x":10, "y":1}, {"label":"- _", "x":11, "y":1}, {"label":"= +", "x":12, "y":1}, {"label":"backspace", "x":13, "y":1, "w":2}, {"label":"num", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "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}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":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":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "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":"up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"enter", "x":18, "y":4, "h":2}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"cmd", "x":2.5, "y":5, "w":1.25}, {"label":"space", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn", "x":11, "y":5}, {"label":"control", "x":12, "y":5}, {"label":"left", "x":13, "y":5}, {"label":"down", "x":14, "y":5}, {"label":"right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ }
+ }
+}
diff --git a/keyboards/flashquark/horizon_z/keymaps/alternate/keymap.c b/keyboards/flashquark/horizon_z/keymaps/alternate/keymap.c
new file mode 100644
index 000000000..cd98f742d
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/keymaps/alternate/keymap.c
@@ -0,0 +1,47 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_BASE] = { { 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_NO, RSFT_T(KC_UP), },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT }
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_FL] = { { 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, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_RMOD, RGB_MOD, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_SPD, RGB_SPI, KC_NO, _______, },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_NO, _______, },
+ { RESET, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, MO(_FL), KC_RALT, KC_APP, KC_RCTL, }
+ }
+
+};
+
diff --git a/keyboards/flashquark/horizon_z/keymaps/default/keymap.c b/keyboards/flashquark/horizon_z/keymaps/default/keymap.c
new file mode 100644
index 000000000..2a54f690b
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/keymaps/default/keymap.c
@@ -0,0 +1,68 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_BASE] = { { 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_UP, KC_NO, KC_RSFT, },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, MO(_FL) }
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_FL] = { { 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, RESET, },
+ { _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, KC_NO, _______, },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_SLSH, KC_NO, _______, },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_RALT, KC_APP, KC_RCTL, MO(_FL), }
+ }
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+
+ case KC_UP:
+ // Detect the activation of Shift key
+ if ((get_mods() & MOD_BIT(KC_RSFT)) == MOD_BIT(KC_RSFT) || (get_mods() & MOD_BIT(KC_LSFT)) == MOD_BIT(KC_LSFT)) {
+ if (record->event.pressed) {
+
+ register_code(KC_SLSH);
+ } else {
+ unregister_code(KC_SLSH);
+ }
+
+ return false;
+ }
+
+ return true;
+
+ }
+ return true;
+}; \ No newline at end of file
diff --git a/keyboards/flashquark/horizon_z/led_matrix.c b/keyboards/flashquark/horizon_z/led_matrix.c
new file mode 100644
index 000000000..d7037c52b
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/led_matrix.c
@@ -0,0 +1,77 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM08A - PWM02B
+ Y2 transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM05B - PWM22B (PWM17B unused)
+ C 0-15
+ Y1 transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+}; \ No newline at end of file
diff --git a/keyboards/flashquark/horizon_z/readme.md b/keyboards/flashquark/horizon_z/readme.md
new file mode 100644
index 000000000..d8412fff0
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/readme.md
@@ -0,0 +1,12 @@
+# Flashquark Horizon Z
+
+Flashquark Horizon Z
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make flashquark/horizon_z:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/flashquark/horizon_z/rules.mk b/keyboards/flashquark/horizon_z/rules.mk
new file mode 100644
index 000000000..c1f00aa31
--- /dev/null
+++ b/keyboards/flashquark/horizon_z/rules.mk
@@ -0,0 +1,32 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
diff --git a/keyboards/gmmk/compact/chconf.h b/keyboards/gmmk/compact/chconf.h
new file mode 100644
index 000000000..e301646c8
--- /dev/null
+++ b/keyboards/gmmk/compact/chconf.h
@@ -0,0 +1,703 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+#define PORT_IDLE_THREAD_STACK_SIZE 0
+#define PORT_INT_REQUIRED_STACK 0
+#define RAW_IN_CAPACITY 1
+#define RAW_OUT_CAPACITY 1
+#endif /* CHCONF_H */
+
+/** @} */
diff --git a/keyboards/gmmk/compact/compact.h b/keyboards/gmmk/compact/compact.h
new file mode 100644
index 000000000..7269eabb2
--- /dev/null
+++ b/keyboards/gmmk/compact/compact.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include "quantum.h"
+
+#if defined(KEYBOARD_gmmk_compact_rev2)
+# include "rev2.h"
+#elif defined(KEYBOARD_gmmk_compact_rev3)
+# include "rev3.h"
+#endif // GMMK Pro revisions
diff --git a/keyboards/gmmk/compact/config_led.c b/keyboards/gmmk/compact/config_led.c
new file mode 100644
index 000000000..f37d98500
--- /dev/null
+++ b/keyboards/gmmk/compact/config_led.c
@@ -0,0 +1,40 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "config_led.h"
+#include "rgb_matrix.h"
+
+#define ND NO_LED
+
+/*
+ * ISO keymap
+ */
+led_config_t g_led_config = {
+{
+/*0*/ { 0, ND, ND, ND, ND, ND, ND, ND, ND, ND, ND, ND, ND, ND},
+/*1*/ { ND, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
+/*2*/ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ND},
+/*3*/ { 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40},
+/*4*/ { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ND, 53},
+/*5*/ { 54, 55, 56, ND, 57, ND, ND, ND, ND, ND, 58, 59, 60, 61},
+
+}, {
+ // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace
+ { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 },
+ // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], ,
+ { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 },
+ // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter
+ { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 },
+ // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up,
+ { 18, 48 }, {20, 48}, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 },
+ // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
+ { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 },
+}, {
+ 4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4, 4, 4
+} };
+
+#endif /* RGB_MATRIX_ENABLE */
diff --git a/keyboards/gmmk/compact/config_led.h b/keyboards/gmmk/compact/config_led.h
new file mode 100644
index 000000000..af62723cc
--- /dev/null
+++ b/keyboards/gmmk/compact/config_led.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS 6
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+
+#define LED_MATRIX_ROW_PINS MATRIX_ROW_PINS
+#define LED_MATRIX_COLS 14
+
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL 62
+
+/* indicator pins */
+#define LED_PIN_ON_STATE 0
+#define LED_NUM_LOCK_PIN C6
+#define LED_CAPS_LOCK_PIN C7
+#define LED_SCROLL_LOCK_PIN C8
diff --git a/keyboards/gmmk/compact/halconf.h b/keyboards/gmmk/compact/halconf.h
new file mode 100644
index 000000000..908c75542
--- /dev/null
+++ b/keyboards/gmmk/compact/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB FALSE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */
diff --git a/keyboards/gmmk/compact/info.json b/keyboards/gmmk/compact/info.json
new file mode 100644
index 000000000..de9471084
--- /dev/null
+++ b/keyboards/gmmk/compact/info.json
@@ -0,0 +1 @@
+{"version":1,"keyboard":{"keys":[{"id":0,"legend":"Esc","state":{"x":0,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":0,"keycodes":[{"id":"KC_ESC","fields":[]},{"id":"RESET","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"F1","state":{"x":2,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":1,"keycodes":[{"id":"KC_F1","fields":[]},{"id":"KC_MYCM","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":2,"legend":"F2","state":{"x":3,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":2,"keycodes":[{"id":"KC_F2","fields":[]},{"id":"KC_WSCH","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":3,"legend":"F3","state":{"x":4,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":3,"keycodes":[{"id":"KC_F3","fields":[]},{"id":"KC_CALC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":4,"legend":"F4","state":{"x":5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":4,"keycodes":[{"id":"KC_F4","fields":[]},{"id":"KC_MSEL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":5,"legend":"F5","state":{"x":6.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":5,"keycodes":[{"id":"KC_F5","fields":[]},{"id":"KC_MPRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":6,"legend":"F6","state":{"x":7.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":6,"keycodes":[{"id":"KC_F6","fields":[]},{"id":"KC_MNXT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":7,"legend":"F7","state":{"x":8.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":7,"keycodes":[{"id":"KC_F7","fields":[]},{"id":"KC_MPLY","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":8,"legend":"F8","state":{"x":9.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":8,"keycodes":[{"id":"KC_F8","fields":[]},{"id":"KC_MSTP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":9,"legend":"F9","state":{"x":11,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":9,"keycodes":[{"id":"KC_F9","fields":[]},{"id":"KC_MUTE","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":10,"legend":"F10","state":{"x":12,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":10,"keycodes":[{"id":"KC_F10","fields":[]},{"id":"KC_VOLD","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":11,"legend":"F11","state":{"x":13,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":11,"keycodes":[{"id":"KC_F11","fields":[]},{"id":"KC_VOLU","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":12,"legend":"F12","state":{"x":14,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":12,"keycodes":[{"id":"KC_F12","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":13,"legend":"PrtSc","state":{"x":15.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":3,"keycodes":[{"id":"KC_PSCR","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":14,"legend":"Scroll Lock","state":{"x":16.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":4,"keycodes":[{"id":"KC_SLCK","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":15,"legend":"Pause\nBreak","state":{"x":17.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":5,"keycodes":[{"id":"KC_PAUS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":16,"legend":"~\n`","state":{"x":0,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":0,"keycodes":[{"id":"KC_GRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":17,"legend":"!\n1","state":{"x":1,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":1,"keycodes":[{"id":"KC_1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":18,"legend":"@\n2","state":{"x":2,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":2,"keycodes":[{"id":"KC_2","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":19,"legend":"#\n3","state":{"x":3,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":3,"keycodes":[{"id":"KC_3","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":20,"legend":"$\n4","state":{"x":4,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":4,"keycodes":[{"id":"KC_4","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":21,"legend":"%\n5","state":{"x":5,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":5,"keycodes":[{"id":"KC_5","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":22,"legend":"^\n6","state":{"x":6,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":6,"keycodes":[{"id":"KC_6","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":23,"legend":"&\n7","state":{"x":7,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":7,"keycodes":[{"id":"KC_7","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":24,"legend":"*\n8","state":{"x":8,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":8,"keycodes":[{"id":"KC_8","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":25,"legend":"(\n9","state":{"x":9,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":9,"keycodes":[{"id":"KC_9","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":26,"legend":")\n0","state":{"x":10,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":10,"keycodes":[{"id":"KC_0","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":27,"legend":"_\n-","state":{"x":11,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":11,"keycodes":[{"id":"KC_MINS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":28,"legend":"+\n=","state":{"x":12,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":12,"keycodes":[{"id":"KC_EQL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":29,"legend":"Backspace","state":{"x":13,"y":1.5,"r":0,"rx":0,"ry":0,"w":2,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":12,"keycodes":[{"id":"KC_BSPC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":30,"legend":"Insert","state":{"x":15.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":7,"keycodes":[{"id":"KC_INS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":31,"legend":"Home","state":{"x":16.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":8,"keycodes":[{"id":"KC_HOME","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":32,"legend":"PgUp","state":{"x":17.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":9,"keycodes":[{"id":"KC_PGUP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":33,"legend":"Tab","state":{"x":0,"y":2.5,"r":0,"rx":0,"ry":0,"w":1.5,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":0,"keycodes":[{"id":"KC_TAB","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":34,"legend":"Q","state":{"x":1.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":1,"keycodes":[{"id":"KC_Q","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":35,"legend":"W","state":{"x":2.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":2,"keycodes":[{"id":"KC_W","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":36,"legend":"E","state":{"x":3.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":3,"keycodes":[{"id":"KC_E","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":37,"legend":"R","state":{"x":4.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":4,"keycodes":[{"id":"KC_R","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":38,"legend":"T","state":{"x":5.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":5,"keycodes":[{"id":"KC_T","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":39,"legend":"Y","state":{"x":6.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":6,"keycodes":[{"id":"KC_Y","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":40,"legend":"U","state":{"x":7.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":7,"keycodes":[{"id":"KC_U","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":41,"legend":"I","state":{"x":8.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":8,"keycodes":[{"id":"KC_I","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":42,"legend":"O","state":{"x":9.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":9,"keycodes":[{"id":"KC_O","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":43,"legend":"P","state":{"x":10.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":10,"keycodes":[{"id":"KC_P","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":44,"legend":"{\n[","state":{"x":11.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":11,"keycodes":[{"id":"KC_LBRC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":45,"legend":"}\n]","state":{"x":12.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":12,"keycodes":[{"id":"KC_RBRC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":46,"legend":"|\n\\","state":{"x":13.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1.5,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":12,"keycodes":[{"id":"KC_BSLS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":47,"legend":"Delete","state":{"x":15.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":10,"keycodes":[{"id":"KC_DEL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":48,"legend":"End","state":{"x":16.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":11,"keycodes":[{"id":"KC_END","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":49,"legend":"PgDn","state":{"x":17.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":12,"keycodes":[{"id":"KC_PGDN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":50,"legend":"Caps Lock","state":{"x":0,"y":3.5,"r":0,"rx":0,"ry":0,"w":1.75,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":0,"keycodes":[{"id":"KC_CAPS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":51,"legend":"A","state":{"x":1.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":1,"keycodes":[{"id":"KC_A","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":52,"legend":"S","state":{"x":2.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":2,"keycodes":[{"id":"KC_S","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":53,"legend":"D","state":{"x":3.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":3,"keycodes":[{"id":"KC_D","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":54,"legend":"F","state":{"x":4.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":4,"keycodes":[{"id":"KC_F","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":55,"legend":"G","state":{"x":5.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":5,"keycodes":[{"id":"KC_G","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":56,"legend":"H","state":{"x":6.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":6,"keycodes":[{"id":"KC_H","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":57,"legend":"J","state":{"x":7.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":7,"keycodes":[{"id":"KC_J","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":58,"legend":"K","state":{"x":8.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":8,"keycodes":[{"id":"KC_K","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":59,"legend":"L","state":{"x":9.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":9,"keycodes":[{"id":"KC_L","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":60,"legend":":\n;","state":{"x":10.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":10,"keycodes":[{"id":"KC_SCLN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":61,"legend":"\"\n'","state":{"x":11.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":11,"keycodes":[{"id":"KC_QUOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":62,"legend":"Enter","state":{"x":12.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":2.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":12,"keycodes":[{"id":"KC_ENT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":63,"legend":"Shift","state":{"x":0,"y":4.5,"r":0,"rx":0,"ry":0,"w":2.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":0,"keycodes":[{"id":"KC_LSFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":64,"legend":"Z","state":{"x":2.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":1,"keycodes":[{"id":"KC_Z","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":65,"legend":"X","state":{"x":3.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":2,"keycodes":[{"id":"KC_X","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":66,"legend":"C","state":{"x":4.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":3,"keycodes":[{"id":"KC_C","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":67,"legend":"V","state":{"x":5.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":4,"keycodes":[{"id":"KC_V","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":68,"legend":"B","state":{"x":6.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":5,"keycodes":[{"id":"KC_B","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":69,"legend":"N","state":{"x":7.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":6,"keycodes":[{"id":"KC_N","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":70,"legend":"M","state":{"x":8.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":7,"keycodes":[{"id":"KC_M","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":71,"legend":"<\n,","state":{"x":9.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":8,"keycodes":[{"id":"KC_COMM","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":72,"legend":">\n.","state":{"x":10.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":9,"keycodes":[{"id":"KC_DOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":73,"legend":"?\n/","state":{"x":11.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":10,"keycodes":[{"id":"KC_SLSH","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":74,"legend":"Shift","state":{"x":12.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":2.75,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":11,"keycodes":[{"id":"KC_LSFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":75,"legend":"↑","state":{"x":16.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":10,"keycodes":[{"id":"KC_UP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":76,"legend":"Ctrl","state":{"x":0,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":0,"keycodes":[{"id":"KC_LCTL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":77,"legend":"Win","state":{"x":1.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":1,"keycodes":[{"id":"KC_LGUI","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":78,"legend":"Alt","state":{"x":2.5,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":2,"keycodes":[{"id":"KC_LALT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":79,"legend":"","state":{"x":3.75,"y":5.5,"r":0,"rx":0,"ry":0,"w":6.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":7},"row":5,"col":3,"keycodes":[{"id":"KC_SPC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":80,"legend":"Alt","state":{"x":10,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":4,"keycodes":[{"id":"KC_RALT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":81,"legend":"Win","state":{"x":11.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":5,"keycodes":[{"id":"MO()","fields":[1]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":82,"legend":"Menu","state":{"x":12.5,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":6,"keycodes":[{"id":"KC_APP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":83,"legend":"Ctrl","state":{"x":13.75,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":7,"keycodes":[{"id":"KC_RCTL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":84,"legend":"←","state":{"x":15.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":8,"keycodes":[{"id":"KC_LEFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":85,"legend":"↓","state":{"x":16.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":9,"keycodes":[{"id":"KC_DOWN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":86,"legend":"→","state":{"x":17.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":11,"keycodes":[{"id":"KC_RGHT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]}],"controller":2,"bounds":{"min":{"x":0,"y":0},"max":{"x":18.25,"y":6.5}},"rows":7,"cols":13,"pins":{"row":["D0","D1","D2","D3","D4","D5","D6"],"col":["C1","C2","A0","A1","A2","A3","A6","A7","C3","C4","C5","C7","C0"],"num":null,"caps":null,"scroll":null,"compose":null,"kana":null,"led":null,"rgb":null},"macros":{},"quantum":"void matrix_init_user(void) {\n}\n\nvoid matrix_scan_user(void) {\n}\n\nbool process_record_user(uint16_t keycode, keyrecord_t *record) {\n\treturn true;\n}","settings":{"diodeDirection":1,"name":"","bootloaderSize":2,"rgbNum":0,"backlightLevels":3}}} \ No newline at end of file
diff --git a/keyboards/gmmk/compact/led_matrix.c b/keyboards/gmmk/compact/led_matrix.c
new file mode 100644
index 000000000..1e2b30b1f
--- /dev/null
+++ b/keyboards/gmmk/compact/led_matrix.c
@@ -0,0 +1,42 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+extern void _set_color(int index, uint8_t r, uint8_t g, uint8_t b);
+
+extern void process_backlight(uint8_t devid, volatile LED_TYPE* states);
+
+static void flush(void)
+{
+ process_backlight(0, NULL);
+}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ if (index >= 0 && index < DRIVER_LED_TOTAL)
+ {
+ _set_color(index, r, g, b);
+ }
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+void init(void) {
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+int rand(void) {
+ static uint32_t seed = 134775813U;
+ seed = seed * 1664525U + 1013904223U;
+ return seed;
+}
diff --git a/keyboards/gmmk/compact/readme.md b/keyboards/gmmk/compact/readme.md
new file mode 100644
index 000000000..162110c90
--- /dev/null
+++ b/keyboards/gmmk/compact/readme.md
@@ -0,0 +1,34 @@
+# GMMK Compact Mechanical keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap:
+ make gmmk/compact:default
+ make gmmk/compact/rev2:default
+ make gmmk/compact/rev3:default
+
+ to build ISO keymap:
+ make gmmk/compact:iso
+ make gmmk/compact/rev2:iso
+ make gmmk/compact/rev3:iso
+
+ to build VIA:
+ make gmmk/compact/rev2:via
+ make gmmk/compact/rev3:via
+
+ For VIA + OpenRGB (WIP),
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+PS.
+1. Compact is not compatible to full and tkl.
+2. FULL would work on TKL. Some rgb effects would got offset issues.
+3. Rev2 firmware will work on rev3 without rgb. Hang otherwise.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions] (https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/compact/rev2/backlight.c b/keyboards/gmmk/compact/rev2/backlight.c
new file mode 100644
index 000000000..e0ef56a78
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/backlight.c
@@ -0,0 +1,281 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <SN32F260.h>
+#include "ch.h"
+#include "hal.h"
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+#define I2C_SCL C1
+#define I2C_SDA C2
+
+#define I2C_SCL_IN readPin(I2C_SCL)
+#define I2C_SDA_IN readPin(I2C_SDA)
+#define I2C_SDB C0
+
+#define I2C_SCL_HI do { setPinOutput(I2C_SCL); writePinHigh(I2C_SCL); } while (0)
+#define I2C_SCL_LO do { setPinOutput(I2C_SCL); writePinLow(I2C_SCL); } while (0)
+#define I2C_SCL_HIZ do { setPinInputHigh(I2C_SCL); } while (0)
+
+#define I2C_SDA_HI do { setPinOutput(I2C_SDA); writePinHigh(I2C_SDA); } while (0)
+#define I2C_SDA_LO do { setPinOutput(I2C_SDA); writePinLow(I2C_SDA); } while (0)
+#define I2C_SDA_HIZ do { setPinInputHigh(I2C_SDA); } while (0)
+
+/*
+ * according to the spec, high SCL peroid 0.7us, low SCL peroid 1.3us
+ *
+ * i2c_delay 1 loop about 7 cycles. Under 48MHz, the actual delay is around 0.9us and 1.5us respectively.
+ */
+#define I2C_SCL_HI_DELAY i2c_delay(2)
+#define I2C_DELAY i2c_delay(10)
+
+static uint8_t sel_frame[2] = {0xFF, 0xFF};
+static uint8_t sel_frame_idx = 0;
+#ifdef VIA_OPENRGB_HYBRID
+uint8_t is_orgb_mode;
+#endif
+
+static void i2c_delay(uint32_t loop)
+{
+ #pragma GCC unroll 0
+ for (int32_t i = 0; i < loop; i++)
+ SN_WDT->FEED = 0x5AFA55AA;
+}
+
+void i2c_init(void)
+{
+ // drive strength all gpio A 20ma
+ SN_GPIO0->MODE |= 0xFFFF0000;
+
+ setPinOutput(I2C_SCL);
+ I2C_SCL_HI;
+ I2C_SDA_HI;
+ I2C_SDA_HIZ;
+
+ writePinHigh(I2C_SDB);
+ setPinOutput(I2C_SDB);
+ i2c_delay(100);
+
+}
+
+static void i2c_process_bit(uint8_t *i2c_tx_byte)
+{
+ if (*i2c_tx_byte & 0x80)
+ {
+ I2C_SDA_HI;
+ }
+ else
+ {
+ I2C_SDA_LO;
+ }
+
+ *i2c_tx_byte = *i2c_tx_byte << 1;
+
+ I2C_SCL_HI;
+ I2C_SCL_HI_DELAY;
+ I2C_SCL_LO;
+ I2C_DELAY;
+}
+
+static uint8_t i2c_transaction(uint8_t i2c_addr_rw, uint8_t* i2c_data_ptr, uint8_t i2c_byte_ct)
+{
+ uint8_t txb;
+ uint8_t fail = 0;
+
+ /* START */
+ I2C_SDA_LO;
+ I2C_DELAY;
+ I2C_SCL_LO;
+ I2C_DELAY;
+
+ txb = i2c_addr_rw;
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+
+ goto I2C_STATE_READ_ACK;
+
+I2C_STATE_WRITE_BYTE:
+
+ I2C_SDA_LO;
+ I2C_SCL_LO;
+
+ txb = *i2c_data_ptr++;
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+ i2c_process_bit(&txb);
+
+ i2c_byte_ct--;
+
+I2C_STATE_READ_ACK:
+ I2C_SDA_HIZ;
+
+ I2C_SCL_HI;
+
+ I2C_SCL_HI_DELAY;
+
+ /* ignore ACK */
+ fail = I2C_SDA_IN;
+
+ I2C_SCL_LO;
+ I2C_DELAY;
+
+ if (i2c_byte_ct > 0)
+ goto I2C_STATE_WRITE_BYTE;
+
+ I2C_SDA_LO;
+ I2C_DELAY;
+
+ /* STOP */
+ I2C_SCL_HI;
+ I2C_DELAY;
+ I2C_SDA_HI;
+ I2C_SDA_HIZ;
+
+ return fail;
+}
+
+static uint8_t i2c_write_buf(uint8_t devid, uint8_t* data, uint8_t len)
+{
+ int32_t tries = 1;
+
+ while ((tries-- > 0) && i2c_transaction(devid, data, len));
+
+ return 0;
+}
+
+static void i2c_write_reg(uint8_t devid, uint8_t reg, uint8_t data)
+{
+ uint8_t i2c_data[2];
+
+ i2c_data[0] = reg;
+ i2c_data[1] = data;
+
+ i2c_write_buf(devid, i2c_data, 2);
+}
+
+static void reset_rgb(int devid)
+{
+ i2c_write_reg(devid, 0xFD, 0x0B);
+
+ i2c_write_reg(devid, 0x0A, 0x00);
+ i2c_write_reg(devid, 0x00, 0x00);
+ i2c_write_reg(devid, 0x01, 0x10);
+ i2c_write_reg(devid, 0x05, 0x00);
+ i2c_write_reg(devid, 0x06, 0x00);
+ i2c_write_reg(devid, 0x08, 0x00);
+ i2c_write_reg(devid, 0x09, 0x00);
+ i2c_write_reg(devid, 0x0B, 0x00);
+ i2c_write_reg(devid, 0x0D, 0x0F);
+ i2c_write_reg(devid, 0x0E, 0x01);
+ i2c_write_reg(devid, 0x14, 68);
+ i2c_write_reg(devid, 0x15, 128);
+ i2c_write_reg(devid, 0x0F, 153);
+
+ i2c_write_reg(devid, 0xFD, 0);
+ for (int32_t i = 0; i < 0x10; i++)
+ i2c_write_reg(devid, i, 0xFF);
+ /* skip blink control 0x10~0x1F as reset 0 */
+ for (int32_t i = 0x20; i < 0xA0; i++)
+ i2c_write_reg(devid, i, 0);
+
+ i2c_write_reg(devid, 0xFD, 1);
+ for (int32_t i = 0; i < 0x10; i++)
+ i2c_write_reg(devid, i, 0xFF);
+ /* skip blink control 0x10~0x1F as reset 0 */
+ for (int32_t i = 0x20; i < 0xA0; i++)
+ i2c_write_reg(devid, i, 0);
+
+ i2c_write_reg(devid, 0xFD, 0xB);
+ i2c_write_reg(devid, 0x0A, 1);
+}
+
+/*
+ * led index to RGB address
+ */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/*0*/ 0xC0,
+/*1*/ 0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xB,0xD,0xC,
+/*2*/ 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x9C,0x9D,0x9E,0x9F,
+/*3*/ 0x60,0x61,0x62,0x63,0x64,0x65,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0xF,0x6F,
+/*4*/ 0x30,0x2,0x31,0x32,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,
+/*5*/ 0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA
+};
+
+
+static void set_pwm(uint8_t dev, uint8_t addr, uint8_t value)
+{
+ /* >=0x80 for frame 2 otherwise frame 1 */
+ if (addr >= 0x80) {
+ if (sel_frame[sel_frame_idx] != 1) {
+ i2c_write_reg(dev, 0xFD, 1);
+ sel_frame[sel_frame_idx] = 1;
+ }
+ addr -= 0x80;
+ }
+ else if (sel_frame[sel_frame_idx] != 0) {
+ i2c_write_reg(dev, 0xFD, 0);
+ sel_frame[sel_frame_idx] = 0;
+ }
+
+ i2c_write_reg(dev, addr + 0x20, value);
+}
+
+static void _set_color_direct(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+ uint8_t dev;
+ int l = g_led_pos[index];
+
+ dev = 0xEE;
+
+ set_pwm(dev, l, r);
+ set_pwm(dev, l + 0x10, g);
+ set_pwm(dev, l + 0x20, b);
+}
+
+void _set_color(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+#ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode && (index == 15 || index == 35 || index == 49))
+ r = g = b = 255;
+#endif
+
+ _set_color_direct(index, r, g, b);
+}
+
+void _read_color(int index, uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ *r = 0;
+ *g = 0;
+ *b = 0;
+}
+
+void process_backlight(uint8_t devid, volatile LED_TYPE *states)
+{
+ static unsigned char state = 0;
+
+ switch (state)
+ {
+ case 0: /* init RGB chips */
+ i2c_init();
+ reset_rgb(0xEE);
+
+ state = 1;
+ break;
+ }
+} \ No newline at end of file
diff --git a/keyboards/gmmk/compact/rev2/config.h b/keyboards/gmmk/compact/rev2/config.h
new file mode 100644
index 000000000..fda8f3c29
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/config.h
@@ -0,0 +1,67 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x652F
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Glorious
+#define PRODUCT GMMK Compact
+#define DESCRIPTION "Mechanical Keyboard"
+
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 14
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 }
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, D0, D1, D2, D3, D4, D5 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/*
+ * Feature
+ */
+#define USB_POLLING_INTERVAL_MS 1 /* 1000 Hz */
+#define FORCE_NKRO /* default NRKO enabled */
+#define DEBOUNCE 1 /* Debounce time in ms */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true /* rgb off when power off / suspend */
+// #define VIA_OPENRGB_HYBRID
+// #define USE_FRAMEBUFFER
+
+/* default ripple effect */
+#ifdef RGB_MATRIX_CUSTOM_USER
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_RIPPLE
+#endif
+
+/*
+ * Optimization
+ */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
+#define NO_DEBUG 1
+// #define NO_PRINT 1
+#define OPENRGB_DIRECT_MODE_UNBUFFERED /* use unbuffered direct mode in OpenRGB protocol */
+
+#include "config_led.h"
diff --git a/keyboards/gmmk/compact/rev2/iso.h b/keyboards/gmmk/compact/rev2/iso.h
new file mode 100644
index 000000000..687cb2e73
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/iso.h
@@ -0,0 +1 @@
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/gmmk/compact/rev2/keymaps/default/keymap.c b/keyboards/gmmk/compact/rev2/keymaps/default/keymap.c
new file mode 100644
index 000000000..bf139e3ac
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/keymaps/default/keymap.c
@@ -0,0 +1,28 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP(
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
+ KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL),
+
+ KEYMAP(
+ 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
+}
diff --git a/keyboards/gmmk/compact/rev2/keymaps/iso/keymap.c b/keyboards/gmmk/compact/rev2/keymaps/iso/keymap.c
new file mode 100644
index 000000000..22f3e6ac0
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/keymaps/iso/keymap.c
@@ -0,0 +1,28 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP(
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
+ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL),
+
+ KEYMAP(
+ 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
+}
diff --git a/keyboards/gmmk/compact/rev2/keymaps/via/keymap.c b/keyboards/gmmk/compact/rev2/keymaps/via/keymap.c
new file mode 100644
index 000000000..61bf85f17
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/keymaps/via/keymap.c
@@ -0,0 +1,47 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+#define SWITCH_MODE 0x1688
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP(
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
+ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL),
+
+ KEYMAP(
+ 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, SWITCH_MODE, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ switch (keycode) {
+ case SWITCH_MODE:
+ #ifdef VIA_OPENRGB_HYBRID
+ if (record->event.pressed) {
+ is_orgb_mode = !is_orgb_mode;
+ }
+ #endif
+ return false;
+ }
+
+ return true;
+}
+
diff --git a/keyboards/gmmk/compact/rev2/keymaps/via/rules.mk b/keyboards/gmmk/compact/rev2/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/gmmk/compact/rev2/mcuconf.h b/keyboards/gmmk/compact/rev2/mcuconf.h
new file mode 100644
index 000000000..5e6389cb5
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/mcuconf.h
@@ -0,0 +1,57 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define CRT1_AREAS_NUMBER 1
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */
diff --git a/keyboards/gmmk/compact/rev2/readme.md b/keyboards/gmmk/compact/rev2/readme.md
new file mode 100644
index 000000000..162110c90
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/readme.md
@@ -0,0 +1,34 @@
+# GMMK Compact Mechanical keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap:
+ make gmmk/compact:default
+ make gmmk/compact/rev2:default
+ make gmmk/compact/rev3:default
+
+ to build ISO keymap:
+ make gmmk/compact:iso
+ make gmmk/compact/rev2:iso
+ make gmmk/compact/rev3:iso
+
+ to build VIA:
+ make gmmk/compact/rev2:via
+ make gmmk/compact/rev3:via
+
+ For VIA + OpenRGB (WIP),
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+PS.
+1. Compact is not compatible to full and tkl.
+2. FULL would work on TKL. Some rgb effects would got offset issues.
+3. Rev2 firmware will work on rev3 without rgb. Hang otherwise.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions] (https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/compact/rev2/rev2.h b/keyboards/gmmk/compact/rev2/rev2.h
new file mode 100644
index 000000000..fed55b390
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/rev2.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ K000, \
+ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, \
+ K500, K501, K502, K506, K510, K511, K512, K513 \
+) { \
+ { K000, 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, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413 }, \
+ { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513 } \
+}
diff --git a/keyboards/gmmk/compact/rev2/rules.mk b/keyboards/gmmk/compact/rev2/rules.mk
new file mode 100644
index 000000000..a8ad9b2cc
--- /dev/null
+++ b/keyboards/gmmk/compact/rev2/rules.mk
@@ -0,0 +1,3 @@
+SRC = ../config_led.c
+SRC += ../led_matrix.c
+SRC += backlight.c \ No newline at end of file
diff --git a/keyboards/gmmk/compact/rev3/SPI.h b/keyboards/gmmk/compact/rev3/SPI.h
new file mode 100644
index 000000000..825805453
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/SPI.h
@@ -0,0 +1,186 @@
+#ifndef __SN32F240_SSP_H
+#define __SN32F240_SSP_H
+
+
+/*_____ I N C L U D E S ____________________________________________________*/
+
+/*_____ D E F I N I T I O N S ______________________________________________*/
+/*
+Base Address: 0x4001 C000 (SSP0)
+ 0x4005 8000 (SSP1)
+*/
+
+/* SSP n Control register 0 <SSPn_CTRL0> (0x00) */
+#define SSP_SSPEN_DIS 0 //[0:0] SSP enable bit
+#define SSP_SSPEN_EN 1
+#define mskSSP_SSPEN_DIS (SSP_SSPEN_DIS<<0)
+#define mskSSP_SSPEN_EN (SSP_SSPEN_EN<<0)
+
+ //[1:1] Loop back mode disable
+#define SSP_LOOPBACK_DIS 0 //Disable
+#define SSP_LOOPBACK_EN 1 //Data input from data output
+#define mskSSP_LOOPBACK_DIS (SSP_LOOPBACK_DIS<<1)
+#define mskSSP_LOOPBACK_EN (SSP_LOOPBACK_EN<<1)
+
+ //[2:2] Slave data output disable bit (ONLY used in slave mode)
+#define SSP_SDODIS_EN 0 //Enable slave data output
+#define SSP_SDODIS_DIS 1 //Disable slave data output. (MISO=0)
+#define mskSSP_SDODIS_EN (SSP_SDODIS_EN<<2)
+#define mskSSP_SDODIS_DIS (SSP_SDODIS_DIS<<2)
+
+#define SSP_MS_MASTER_MODE 0 //[3:3] Master/Slave selection bit
+#define SSP_MS_SLAVE_MODE 1
+#define mskSSP_MS_MASTER_MODE (SSP_MS_MASTER_MODE<<3)
+#define mskSSP_MS_SLAVE_MODE (SSP_MS_SLAVE_MODE<<3)
+
+#define SSP_FORMAT_SPI_MODE 0 //[4:4] Interface format
+#define SSP_FORMAT_SSP_MODE 1
+#define mskSSP_FORMAT_SPI_MODE (SSP_FORMAT_SPI_MODE<<4)
+#define mskSSP_FORMAT_SSP_MODE (SSP_FORMAT_SSP_MODE<<4)
+
+ //[7:6] SSP FSM and FIFO Reset bit
+#define SSP_FRESET_DO_NOTHING 0 //Do nothing
+#define SSP_FRESET_RESET_FIFO 3 //Reset finite state machine and FIFO
+#define mskSSP_FRESET_DO_NOTHING (SSP_FRESET_DO_NOTHING<<6)
+#define mskSSP_FRESET_RESET_FIFO (SSP_FRESET_RESET_FIFO<<6)
+
+#define SSP_DL_3 2 //[11:8] Data Length = DL[3:0]+1
+#define SSP_DL_4 3
+#define SSP_DL_5 4
+#define SSP_DL_6 5
+#define SSP_DL_7 6
+#define SSP_DL_8 7
+#define SSP_DL_9 8
+#define SSP_DL_10 9
+#define SSP_DL_11 10
+#define SSP_DL_12 11
+#define SSP_DL_13 12
+#define SSP_DL_14 13
+#define SSP_DL_15 14
+#define SSP_DL_16 15
+
+#define SSP_TXFIFOTH_0 0 //[14:12]TX FIFO Threshold level
+#define SSP_TXFIFOTH_1 1
+#define SSP_TXFIFOTH_2 2
+#define SSP_TXFIFOTH_3 3
+#define SSP_TXFIFOTH_4 4
+#define SSP_TXFIFOTH_5 5
+#define SSP_TXFIFOTH_6 6
+#define SSP_TXFIFOTH_7 7
+
+#define SSP_RXFIFOTH_0 0 //[17:15]RX FIFO Threshold level
+#define SSP_RXFIFOTH_1 1
+#define SSP_RXFIFOTH_2 2
+#define SSP_RXFIFOTH_3 3
+#define SSP_RXFIFOTH_4 4
+#define SSP_RXFIFOTH_5 5
+#define SSP_RXFIFOTH_6 6
+#define SSP_RXFIFOTH_7 7
+
+ //[18:18]Auto-SEL disable bit. For SPI mode only.
+#define SSP_SELDIS_EN 0 //Enable Auto-SEL flow control
+#define SSP_SELDIS_DIS 1 //Disable Auto-SEL flow control
+#define mskSSP_SELDIS_EN (SSP_SELDIS_EN<<18)
+#define mskSSP_SELDIS_DIS (SSP_SELDIS_DIS<<18)
+
+
+/* SSP n Control register 1 <SSPn_CTRL1> (0x04) */
+ //[0:0]MSB/LSB selection bit
+#define SSP_MLSB_MSB 0 //MSB transmit first
+#define SSP_MLSB_LSB 1 //LSB transmit first
+#define mskSSP_MLSB_MSB (SSP_MLSB_MSB<<0)
+#define mskSSP_MLSB_LSB (SSP_MLSB_LSB<<0)
+
+ //[1:1]Clock polarity selection bit
+#define SSP_CPOL_SCK_IDLE_LOW 0 //SCK idles at Low level
+#define SSP_CPOL_SCK_IDLE_HIGH 1 //SCK idles at High level
+#define mskSSP_CPOL_SCK_IDLE_LOW (SSP_CPOL_SCK_IDLE_LOW<<1)
+#define mskSSP_CPOL_SCK_IDLE_HIGH (SSP_CPOL_SCK_IDLE_HIGH<<1)
+
+ //[2:2]Clock phase for edge sampling
+#define SSP_CPHA_FALLING_EDGE 0 //Data changes at clock falling edge
+#define SSP_CPHA_RISING_EDGE 1 //Data changes at clock rising edge
+#define mskSSP_CPHA_FALLING_EDGE (SSP_CPHA_FALLING_EDGE<<2)
+#define mskSSP_CPHA_RISING_EDGE (SSP_CPHA_RISING_EDGE<<2)
+
+
+/* SSP n Clock Divider register <SSPn_CLKDIV> (0x08) */
+ //[7:0]SSPn clock divider
+#define SSP_DIV 16 //MCLK/n, n = 2, 4, 6, 8, ...,512
+
+
+/* SSP n Status register <SSPn_STAT> (0x0C) */
+#define mskSSP_TX_EMPTY (0x1<<0) //TX FIFO empty flag
+#define mskSSP_TX_FULL (0x1<<1) //TX FIFO full flag
+#define mskSSP_RX_EMPTY (0x1<<2) //RX FIFO empty flag
+#define mskSSP_RX_FULL (0x1<<3) //RX FIFO full flag
+#define mskSSP_BUSY (0x1<<4) //Busy flag
+#define mskSSP_TXFIFOTHF (0x1<<5) //TX FIFO threshold flag
+#define mskSSP_RXFIFOTHF (0x1<<6) //RX FIFO threshold flag
+
+
+/* SSP n Interrupt Enable register <SSPn_IE> (0x10) */
+#define SSP_RXOVFIE_DIS 0 //[0:0]RX Overflow interrupt enable
+#define SSP_RXOVFIE_EN 1
+#define mskSSP_RXOVFIE_DIS (SSP_RXOVFIE_DIS<<0)
+#define mskSSP_RXOVFIE_EN (SSP_RXOVFIE_EN<<0)
+
+#define SSP_RXTOIE_DIS 0 //[1:1]RX time-out interrupt enable
+#define SSP_RXTOIE_EN 1
+#define mskSSP_RXTOIE_DIS (SSP_RXTOIE_DIS<<1)
+#define mskSSP_RXTOIE_EN (SSP_RXTOIE_EN<<1)
+
+#define SSP_RXFIFOTHIE_DIS 0 //[2:2]RX FIFO threshold interrupt enable
+#define SSP_RXFIFOTHIE_EN 1
+#define mskSSP_RXFIFOTHIE_DIS (SSP_RXFIFOTHIE_DIS<<2)
+#define mskSSP_RXFIFOTHIE_EN (SSP_RXFIFOTHIE_EN <<2)
+
+#define SSP_TXFIFOTHIE_DIS 0 //[3:3]TX FIFO threshold interrupt enable
+#define SSP_TXFIFOTHIE_EN 1
+#define mskSSP_TXFIFOTHIE_DIS (SSP_TXFIFOTHIE_DIS<<3)
+#define mskSSP_TXFIFOTHIE_EN (SSP_TXFIFOTHIE_EN<<3)
+
+
+/* SSP n Raw Interrupt Status register <SSPn_RIS> (0x14) */
+/* SSP n Interrupt Clear register <SSPn_IC> (0x18) */
+#define mskSSP_RXOVFIF (0x1<<0) //[0:0]RX overflow interrupt flag
+#define mskSSP_RXOVFIC mskSSP_RXOVFIF
+
+#define mskSSP_RXTOIF (0x1<<1) //[1:1]RX time-out interrupt flag
+#define mskSSP_RXTOIC mskSSP_RXTOIF
+
+#define mskSSP_RXFIFOTHIF (0x1<<2) //[2:2]RX FIFO threshold interrupt flag
+#define mskSSP_RXFIFOTHIC mskSSP_RXFIFOTHIF
+
+#define mskSSP_TXFIFOTHIF (0x1<<3) //[3:3]TX FIFO threshold interrupt flag
+#define mskSSP_TXFIFOTHIC mskSSP_TXFIFOTHIF
+
+
+/* SSP n Data Fetch register <SSPn_DF> (0x20) */
+ //[0:0]SSP data fetch control bit
+#define SSP_DF_DIS 0 //Disable
+#define SSP_DF_EN 1 //Enable when SCKn frequency > 6MHz
+#define mskSSP_DF_DIS (SSP_DF_DIS<<0)
+#define mskSSP_SSP_DF_EN (SSP_DF_EN<<0)
+
+
+/*_____ M A C R O S ________________________________________________________*/
+#define __SPI0_FIFO_RESET (SN_SSP0->CTRL0_b.FRESET = SSP_FRESET_RESET_FIFO)
+#define __SPI1_FIFO_RESET (SN_SSP1->CTRL0_b.FRESET = SSP_FRESET_RESET_FIFO)
+#define __SPI0_CLR_SEL0 (SN_GPIO1->DATA_b.DATA2=0)
+#define __SPI0_SET_SEL0 (SN_GPIO1->DATA_b.DATA2=1)
+#define __SPI1_CLR_SEL1 (SN_GPIO3->DATA_b.DATA6=0)
+#define __SPI1_SET_SEL1 (SN_GPIO3->DATA_b.DATA6=1)
+//SSP Data Fetch speed (High: SCK>6MHz)
+#define __SSP0_DATA_FETCH_HIGH_SPEED (SN_SSP0->DF = SSP_DF_EN) //*(volatile unsigned long *)(0x4001C020) = 1
+#define __SSP1_DATA_FETCH_HIGH_SPEED (SN_SSP1->DF = SSP_DF_EN) //*(volatile unsigned long *)(0x40058020) = 1
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+extern void SPI0_Init(void);
+extern void SPI0_Enable(void);
+extern void SPI0_Disable(void);
+
+extern void SPI0_Write(unsigned char *p, int len);
+#endif /*__SN32F760_SSP_H*/
+
diff --git a/keyboards/gmmk/compact/rev3/SPI0.c b/keyboards/gmmk/compact/rev3/SPI0.c
new file mode 100644
index 000000000..feb4f654a
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/SPI0.c
@@ -0,0 +1,129 @@
+/******************** (C) COPYRIGHT 2014 SONiX *******************************
+* COMPANY: SONiX
+* DATE: 2014/05
+* AUTHOR: SA1
+* IC: SN32F240/230/220
+* DESCRIPTION: SPI0 related functions.
+*____________________________________________________________________________
+* REVISION Date User Description
+* 1.0 2013/12/17 SA1 1. First release
+* 1.1 2014/05/23 SA1 1. Add __SSP0_DATA_FETCH_HIGH_SPEED macro
+*
+*____________________________________________________________________________
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS TIME TO MARKET.
+* SONiX SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL
+* DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH SOFTWARE
+* AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN
+* IN CONNECTION WITH THEIR PRODUCTS.
+*****************************************************************************/
+
+/*_____ I N C L U D E S ____________________________________________________*/
+#include <SN32F260.h>
+#include "SPI.h"
+
+#define SN_SSP0 SN_SPI0
+#define SSP0_IRQn SPI0_IRQn
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+
+
+/*_____ D E F I N I T I O N S ______________________________________________*/
+
+
+/*_____ M A C R O S ________________________________________________________*/
+
+
+/*_____ F U N C T I O N S __________________________________________________*/
+
+/*****************************************************************************
+* Function : SPI0_Init
+* Description : Initialization of SPI0 init
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Init(void)
+{
+ SN_SYS1->AHBCLKEN |= (0x1 << 12);
+
+ SN_SSP0->CTRL0_b.DL = SSP_DL_8;
+ SN_SSP0->CTRL0_b.FORMAT = SSP_FORMAT_SPI_MODE;
+ SN_SSP0->CTRL0_b.MS = SSP_MS_MASTER_MODE;
+ SN_SSP0->CTRL0_b.LOOPBACK = SSP_LOOPBACK_DIS;
+ SN_SSP0->CTRL0_b.SDODIS = SSP_SDODIS_EN;
+
+ SN_SSP0->CTRL0_b.TXFIFOTH = 7;
+ // SN_SSP0->CLKDIV_b.DIV = 5; // 48/12 = 4MHz
+ SN_SSP0->CLKDIV_b.DIV = 4; // 48/10 = 4.8 MHz
+
+ SN_SSP0->CTRL1 = SSP_CPHA_FALLING_EDGE | SSP_CPOL_SCK_IDLE_LOW | SSP_MLSB_MSB;
+
+ SN_SSP0->CTRL0_b.SELDIS = SSP_SELDIS_DIS;
+
+ __SPI0_FIFO_RESET;
+
+ NVIC_DisableIRQ(SSP0_IRQn);
+
+ // __SSP0_DATA_FETCH_HIGH_SPEED; //Enable if Freq. of SCK > 6MHz
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_EN;
+}
+
+/*****************************************************************************
+* Function : SPI0_Enable
+* Description : SPI0 enable setting
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Enable(void)
+{
+ //Enable HCLK for SSP0
+ SN_SYS1->AHBCLKEN |= (0x1 << 12);
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_EN;
+ __SPI0_FIFO_RESET;
+}
+
+/*****************************************************************************
+* Function : SPI0_Disable
+* Description : SPI0 disable setting
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Disable(void)
+{
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_DIS;
+ SN_SYS1->AHBCLKEN &=~ (0x1 << 12);
+}
+
+void SPI0_Write(unsigned char *p, int len)
+{
+ for (int i = 0; i < len; i++)
+ {
+ // while (!SN_SSP0->STAT_b.TX_EMPTY);
+ while (SN_SSP0->STAT_b.TX_FULL);
+ SN_SSP0->DATA_b.Data = *p++;
+ }
+
+ while (SN_SSP0->STAT_b.BUSY);
+}
+
+void SPI0_Read3(unsigned char b1, unsigned char b2, unsigned char *b3)
+{
+ /* write first 2 bytes: header and address */
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = b1;
+ SN_SSP0->DATA_b.Data = b2;
+
+ /* read 1 byte data */
+ while (SN_SSP0->STAT_b.BUSY);
+ while (SN_SSP0->STAT_b.RX_EMPTY);
+ *b3 = SN_SSP0->DATA_b.Data;
+
+ while (SN_SSP0->STAT_b.BUSY);
+}
diff --git a/keyboards/gmmk/compact/rev3/backlight.c b/keyboards/gmmk/compact/rev3/backlight.c
new file mode 100644
index 000000000..19518452c
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/backlight.c
@@ -0,0 +1,191 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <SN32F260.h>
+#include "ch.h"
+#include "hal.h"
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+#include "SPI.h"
+
+#define SDB B0
+
+#ifdef VIA_OPENRGB_HYBRID
+uint8_t is_orgb_mode;
+#endif
+static int g_cs_pin = 0;
+
+void spi_init(void)
+{
+ SPI0_Init();
+ SPI0_Enable();
+}
+
+void spi_set_cspin(int pin)
+{
+ if (g_cs_pin == pin)
+ return;
+
+ writePinHigh(B2);
+ setPinOutput(B2);
+ writePinHigh(B1);
+ setPinOutput(B1);
+
+ g_cs_pin = pin;
+}
+
+extern void SPI0_Read3(unsigned char b1, unsigned char b2, unsigned char *b3);
+
+void spi_read3(unsigned char b1, unsigned char b2, unsigned char *b3)
+{
+ writePinLow(g_cs_pin);
+ SPI0_Read3(b1, b2, b3);
+ writePinHigh(g_cs_pin);
+}
+
+
+void spi_write(uint8_t *data_p, int len)
+{
+ writePinLow(g_cs_pin);
+ SPI0_Write(data_p, len);
+ writePinHigh(g_cs_pin);
+}
+
+void spi_w3(uint8_t page, uint8_t addr, uint8_t data)
+{
+ uint8_t c[4];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ c[2] = data;
+ spi_write(c, 3);
+}
+
+void spi_r3(uint8_t page, uint8_t addr, uint8_t *data)
+{
+ uint8_t c[4];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ spi_read3(c[0], c[1], data);
+}
+
+/*
+ * LED index to RGB address
+ * >100 means it belongs to pin B1 chipselected SN2735 chip, the real addr is minus by 100
+ */
+
+/* ANSI */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/* 0 */ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
+/* 14 */ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+/* 28 */ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 145,
+/* 41 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161,
+/* 53 */ 114, 115, 130, 131, 146, 147, 162, 163
+};
+
+static void _set_color_direct(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+ int l = g_led_pos[index];
+
+ if (l >= 100)
+ {
+ l -= 100;
+ spi_set_cspin(B1);
+ }
+ else
+ spi_set_cspin(B2);
+
+ int y = l / 16;
+ int a = l % 16;
+
+ spi_w3(1, y * 48 + a, r); // r
+ spi_w3(1, y * 48 + a + 2*8, b); // b
+ spi_w3(1, y * 48 + a + 4*8, g); // g
+}
+
+void _set_color(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+#ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode && (index == 15 || index == 35 || index == 49))
+ r = g = b = 255;
+#endif
+
+ _set_color_direct(index, r, g, b);
+}
+
+void _read_color(int index, uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ int l = g_led_pos[index];
+
+ if (l >= 100)
+ {
+ l -= 100;
+ spi_set_cspin(B1);
+ }
+ else
+ spi_set_cspin(B2);
+
+ int y = l / 16;
+ int a = l % 16;
+
+ spi_r3(1, y * 48 + a, r); // r
+ spi_r3(1, y * 48 + a + 2*8, b); // b
+ spi_r3(1, y * 48 + a + 4*8, g); // g
+}
+
+void reset_rgb(int pin)
+{
+ spi_set_cspin(pin);
+
+ spi_w3(3, 0, 0);
+ spi_w3(3, 0x13, 0xAA);
+ spi_w3(3, 0x14, 0);
+ // spi_w3(3, 0x15, 4);
+ spi_w3(3, 0x15, 0);
+ spi_w3(3, 0x16, 0xC0);
+ spi_w3(3, 0x1A, 0);
+
+ // set curent
+ for (int i = 0; i < 12; i++)
+ {
+ spi_w3(4, i, 0x80);
+ }
+
+ // led all on
+ for (int i = 0; i < 192/8; i++)
+ {
+ spi_w3(0, i, 0xFF);
+ }
+
+ // turn off pwm
+ for (int i = 0; i < 192; i++)
+ {
+ spi_w3(1, i, 0);
+ }
+
+ // normal mode
+ spi_w3(3, 0, 1);
+}
+
+void process_backlight(uint8_t devid, volatile LED_TYPE* states)
+{
+ static unsigned char state = 0;
+
+ switch (state)
+ {
+ case 0: /* init RGB chips */
+ spi_init();
+
+ writePinHigh(SDB);
+ setPinOutput(SDB);
+ reset_rgb(B1);
+ reset_rgb(B2);
+
+ state = 1;
+ break;
+ }
+} \ No newline at end of file
diff --git a/keyboards/gmmk/compact/rev3/config.h b/keyboards/gmmk/compact/rev3/config.h
new file mode 100644
index 000000000..fc59d0aa0
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/config.h
@@ -0,0 +1,67 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x652F
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Glorious
+#define PRODUCT GMMK Compact
+#define DESCRIPTION "Mechanical Keyboard"
+
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 14
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D6, D7, D8, C3, C4, C5 }
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, D0, D1, D2, D3, D4, D5 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/*
+ * Feature
+ */
+#define USB_POLLING_INTERVAL_MS 1 /* 1000 Hz */
+#define FORCE_NKRO /* default NRKO enabled */
+#define DEBOUNCE 1 /* Debounce time in ms */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true /* rgb off when power off / suspend */
+// #define VIA_OPENRGB_HYBRID
+// #define USE_FRAMEBUFFER
+
+/* default ripple effect */
+#ifdef RGB_MATRIX_CUSTOM_USER
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_RIPPLE
+#endif
+
+/*
+ * Optimization
+ */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
+#define NO_DEBUG 1
+// #define NO_PRINT 1
+#define OPENRGB_DIRECT_MODE_UNBUFFERED /* use unbuffered direct mode in OpenRGB protocol */
+
+#include "config_led.h"
diff --git a/keyboards/gmmk/compact/rev3/keymaps/default/keymap.c b/keyboards/gmmk/compact/rev3/keymaps/default/keymap.c
new file mode 100644
index 000000000..b20d55194
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/keymaps/default/keymap.c
@@ -0,0 +1,29 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP(
+ 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_ENT,
+ KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
+
+ KEYMAP(
+ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_HOME, KC_END, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
+}
diff --git a/keyboards/gmmk/compact/rev3/keymaps/iso/keymap.c b/keyboards/gmmk/compact/rev3/keymaps/iso/keymap.c
new file mode 100644
index 000000000..5d250cacf
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/keymaps/iso/keymap.c
@@ -0,0 +1,29 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP(
+ 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_ENT,
+ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
+
+ KEYMAP(
+ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_HOME, KC_END, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
+}
diff --git a/keyboards/gmmk/compact/rev3/keymaps/via/keymap.c b/keyboards/gmmk/compact/rev3/keymaps/via/keymap.c
new file mode 100644
index 000000000..ee8c828aa
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/keymaps/via/keymap.c
@@ -0,0 +1,51 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+#define SWITCH_MODE 0x1688
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ KEYMAP(
+ 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_ENT,
+ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
+
+ KEYMAP(
+ 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_TRNS, SWITCH_MODE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_HOME, KC_END, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) {
+}
+
+#ifdef VIA_OPENRGB_HYBRID
+extern uint8_t is_orgb_mode;
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ switch (keycode) {
+ case SWITCH_MODE:
+ #ifdef VIA_OPENRGB_HYBRID
+ if (record->event.pressed) {
+ is_orgb_mode = !is_orgb_mode;
+ }
+ #endif
+ return false;
+ }
+
+ return true;
+}
+
diff --git a/keyboards/gmmk/compact/rev3/keymaps/via/rules.mk b/keyboards/gmmk/compact/rev3/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/gmmk/compact/rev3/mcuconf.h b/keyboards/gmmk/compact/rev3/mcuconf.h
new file mode 100644
index 000000000..c75588c60
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/mcuconf.h
@@ -0,0 +1,57 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define CRT1_AREAS_NUMBER 1
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */
diff --git a/keyboards/gmmk/compact/rev3/readme.md b/keyboards/gmmk/compact/rev3/readme.md
new file mode 100644
index 000000000..162110c90
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/readme.md
@@ -0,0 +1,34 @@
+# GMMK Compact Mechanical keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap:
+ make gmmk/compact:default
+ make gmmk/compact/rev2:default
+ make gmmk/compact/rev3:default
+
+ to build ISO keymap:
+ make gmmk/compact:iso
+ make gmmk/compact/rev2:iso
+ make gmmk/compact/rev3:iso
+
+ to build VIA:
+ make gmmk/compact/rev2:via
+ make gmmk/compact/rev3:via
+
+ For VIA + OpenRGB (WIP),
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+PS.
+1. Compact is not compatible to full and tkl.
+2. FULL would work on TKL. Some rgb effects would got offset issues.
+3. Rev2 firmware will work on rev3 without rgb. Hang otherwise.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions] (https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/compact/rev3/rev3.h b/keyboards/gmmk/compact/rev3/rev3.h
new file mode 100644
index 000000000..b2f77b1ea
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/rev3.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "quantum.h"
+
+#define KEYMAP( \
+ K000, \
+ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, \
+ K500, K501, K502, K506, K510, K511, K512, K513 \
+) { \
+ { K000, 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, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313 }, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413 }, \
+ { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513 } \
+}
diff --git a/keyboards/gmmk/compact/rev3/rules.mk b/keyboards/gmmk/compact/rev3/rules.mk
new file mode 100644
index 000000000..bf8ead701
--- /dev/null
+++ b/keyboards/gmmk/compact/rev3/rules.mk
@@ -0,0 +1,4 @@
+SRC = ../config_led.c
+SRC += ../led_matrix.c
+SRC += backlight.c
+SRC += SPI0.c \ No newline at end of file
diff --git a/keyboards/gmmk/compact/rules.mk b/keyboards/gmmk/compact/rules.mk
new file mode 100644
index 000000000..7d9d8b944
--- /dev/null
+++ b/keyboards/gmmk/compact/rules.mk
@@ -0,0 +1,69 @@
+# project specific files
+
+## chip/board settings
+# - the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = SN32
+MCU_SERIES = SN32F260
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = SN32F260
+
+# Startup code to use
+# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = sn32f26x
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = SN_SN32F260
+
+# Cortex version
+MCU = cortex-m0
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+
+# BOOTLOADER = flash
+SN32_BOOTLOADER_ADDRESS = 0x1FFF0009
+
+OPT_DEFS = -Os
+
+# Options to pass to dfu-util when flashing
+# DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+# DFU_SUFFIX_ARGS = -p DF11 -v 0483
+
+# Build Options
+# comment out to disable the options.
+#
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = no
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes
+KEYBOARD_SHARED_EP = yes
+CONSOLE_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = yes
+CUSTOM_MATRIX = no
+LED_MATRIX_ENABLE = no
+LED_MATRIX_DRIVER = custom
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
+RAW_ENABLE = yes
+
+# OPENRGB_ENABLE = yes
+
+# some options to reduce ram usage
+LDFLAGS += --specs=nano.specs
+OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
+USE_LINK_GC = yes
+LTO_ENABLE = yes
+
+USE_EXCEPTIONS_STACKSIZE = 0xE0
+USE_PROCESS_STACKSIZE = 0x1E0
+
+DEFAULT_FOLDER = gmmk/compact/rev3
diff --git a/keyboards/gmmk/full/VIA_gmmk_full_ansi.json b/keyboards/gmmk/full/VIA_gmmk_full_ansi.json
new file mode 100644
index 000000000..f14651f34
--- /dev/null
+++ b/keyboards/gmmk/full/VIA_gmmk_full_ansi.json
@@ -0,0 +1,20 @@
+{
+ "name": "GMMK FULL ANSI",
+ "lighting": "none",
+ "vendorId": "0x0c45",
+ "productId": "0x652f",
+ "matrix": {"rows": 7, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x":1}, "0,1", "0,2", "0,3", "0,4", {"x":0.5}, "0,5", "0,6", "0,7", "0,8", {"x":0.5}, "0,9", "0,10", "0,11", "0,12", {"x":0.25}, "6,3", "6,4", "6,5", {"y":0.25}],
+ ["1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":2}, "5,12", {"x":0.25}, "6,7", "6,8", "6,9", {"x":0.25}, "1,13", "1,14", "1,15", "6,13"],
+ [{"w":1.5}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"w":1.5}, "3,12", {"x":0.25}, "6,10", "6,11", "6,12", {"x":0.25}, "2,13", "2,14", "2,15", {"h":2}, "6,14"],
+ [{"w":1.75}, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":2.25}, "4,12", {"x":3.5}, "3,13", "3,14", "3,15"],
+ [{"w":2.25}, "4,0", "4,1", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", {"w":2.75}, "4,11", {"x":1.25}, "5,10", {"x":1.25}, "4,13", "4,14", "4,15", {"h":2}, "5,15"],
+ [{"w":1.25}, "5,0", {"w":1.25}, "5,1", {"w":1.25}, "5,2", {"w":6.25}, "5,3", {"w":1.25}, "5,4", {"w":1.25}, "5,5", {"w":1.25}, "5,6", {"w":1.25}, "5,7",{"x":0.25}, "5,8", "5,9", "5,11", {"x":0.25}, {"w":2}, "5,13", "5,14"]
+ ]
+ }
+}
+
+
+
diff --git a/keyboards/gmmk/full/VIA_gmmk_full_iso.json b/keyboards/gmmk/full/VIA_gmmk_full_iso.json
new file mode 100644
index 000000000..7c61b6288
--- /dev/null
+++ b/keyboards/gmmk/full/VIA_gmmk_full_iso.json
@@ -0,0 +1,17 @@
+{
+ "name": "GMMK FULL ISO",
+ "lighting": "none",
+ "vendorId": "0x0c45",
+ "productId": "0x652f",
+ "matrix": {"rows": 7, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x":1}, "0,1", "0,2", "0,3", "0,4", {"x":0.5}, "0,5", "0,6", "0,7", "0,8", {"x":0.5}, "0,9", "0,10", "0,11", "0,12", {"x":0.25}, "6,3", "6,4", "6,5", {"y":0.25}],
+ ["1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":2}, "5,12", {"x":0.25}, "6,7", "6,8", "6,9", {"x":0.25}, "1,13", "1,14", "1,15", "6,13"],
+ [{"w":1.5}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25}, "4,12", {"x":0.25}, "6,10", "6,11", "6,12", {"x":0.25}, "2,13", "2,14", "2,15", {"h":2}, "6,14"],
+ [{"w":1.75}, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", "3,12", {"x":4.75}, "3,13", "3,14", "3,15"],
+ [{"w":1.25}, "4,0", "6,2", "4,1", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", {"w":2.75}, "4,11", {"x":1.25}, "5,10", {"x":1.25}, "4,13", "4,14", "4,15", {"h":2}, "5,15"],
+ [{"w":1.25}, "5,0", {"w":1.25}, "5,1", {"w":1.25}, "5,2", {"w":6.25}, "5,3", {"w":1.25}, "5,4", {"w":1.25}, "5,5", {"w":1.25}, "5,6", {"w":1.25}, "5,7", {"x":0.25}, "5,8", "5,9", "5,11", {"x":0.25}, {"w":2}, "5,13", "5,14"]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/gmmk/full/boot_return.S b/keyboards/gmmk/full/boot_return.S
new file mode 100644
index 000000000..8acbec710
--- /dev/null
+++ b/keyboards/gmmk/full/boot_return.S
@@ -0,0 +1,12 @@
+ .cpu cortex-m0
+ .fpu softvfp
+ .syntax unified
+ .thumb
+ .section .bootreturn,"ax"
+
+ .align 2
+ .thumb_func
+ .global __boot_return
+__boot_return:
+ b _crt0_entry
+
diff --git a/keyboards/gmmk/full/config.h b/keyboards/gmmk/full/config.h
new file mode 100644
index 000000000..1a273fd60
--- /dev/null
+++ b/keyboards/gmmk/full/config.h
@@ -0,0 +1,75 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x652F
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Glorious
+#define PRODUCT GMMK FULL
+#define DESCRIPTION "Mechanical Keyboard"
+
+/* key matrix size */
+#define MATRIX_ROWS 7
+#define MATRIX_COLS 16
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6 }
+#define MATRIX_COL_PINS { C1, C2, A0, A1, A2, A3, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15 }
+#define UNUSED_PINS
+
+#ifdef ENCODER_ENABLE
+#define ENCODERS_PAD_A { B4 }
+#define ENCODERS_PAD_B { B5 }
+#define ENCODER_RESOLUTIONS { 2 }
+#endif
+
+#define DIODE_DIRECTION ROW2COL
+
+/*
+ * Feature
+ */
+#define USB_POLLING_INTERVAL_MS 1 /* 1000 Hz */
+#define FORCE_NKRO /* default NRKO enabled */
+#define DEBOUNCE 1 /* Debounce time in ms */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true /* rgb off when power off / suspend */
+// #define VIA_OPENRGB_HYBRID
+// #define USE_FRAMEBUFFER
+
+/* default ripple effect */
+#ifdef RGB_MATRIX_CUSTOM_USER
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_RIPPLE
+#endif
+
+/*
+ * Optimization
+ */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
+#define NO_DEBUG 1
+// #define NO_PRINT 1
+#define OPENRGB_DIRECT_MODE_UNBUFFERED /* use unbuffered direct mode in OpenRGB protocol */
+
+#include "config_led.h"
+
+// #define DEBUG_GMMK \ No newline at end of file
diff --git a/keyboards/gmmk/full/config_led.c b/keyboards/gmmk/full/config_led.c
new file mode 100644
index 000000000..fea0707ad
--- /dev/null
+++ b/keyboards/gmmk/full/config_led.c
@@ -0,0 +1,74 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "config_led.h"
+#include "rgb_matrix.h"
+
+#define ND NO_LED
+
+#ifdef KEYMAP_ISO
+
+/*
+ * ISO keymap
+ */
+led_config_t g_led_config = {
+{
+/*0*/ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ND, ND, ND},
+/*1*/ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 33, 34, 35},
+/*2*/ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 54, 55, 56},
+/*3*/ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 50, 71, 72, 73},
+/*4*/ { 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 70, 87, 88, 89},
+/*5*/ { 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 86, 101, 29, 102, 103, 90},
+/*6*/ { ND, ND, 104, 13, 14, 15, ND, 30, 31, 32, 51, 52, 53, 36, 57, ND},
+
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17}, {194, 17}, {204, 17}, {214, 17}, {224, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {139, 29}, {157, 29}, {167, 29}, {177, 29}, {194, 29}, {204, 29}, {214, 29}, {224, 29},
+ {5 , 41}, {19 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {136, 41}, {194, 41}, {204, 41}, {214, 41},
+ {2 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52}, {194, 52}, {204, 52}, {214, 52}, {224, 52},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64}, {199, 64}, {214, 64}, {13, 52}
+}, {
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4
+} };
+
+#else /* KEYMAP_ISO */
+
+/*
+ * ANSI keymap
+ */
+led_config_t g_led_config = {
+{
+/*0*/ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ND, ND, ND},
+/*1*/ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 33, 34, 35},
+/*2*/ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 54, 55, 56},
+/*3*/ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 50, 71, 72, 73},
+/*4*/ { 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 70, 87, 88, 89},
+/*5*/ { 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 86, 101, 29, 102, 103, 90},
+/*6*/ { ND, ND, ND, 13, 14, 15, ND, 30, 31, 32, 51, 52, 53, 36, 57, ND},
+
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17}, {194, 17}, {204, 17}, {214, 17}, {224, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {139, 29}, {157, 29}, {167, 29}, {177, 29}, {194, 29}, {204, 29}, {214, 29}, {224, 29},
+ {5 , 41}, {19 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {136, 41}, {194, 41}, {204, 41}, {214, 41},
+ {8 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52}, {194, 52}, {204, 52}, {214, 52}, {224, 52},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64}, {199, 64}, {214, 64},
+}, {
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4
+} };
+
+#endif /* KEYMAP_ISO */
+
+#endif /* RGB_MATRIX_ENABLE */
diff --git a/keyboards/gmmk/full/config_led.h b/keyboards/gmmk/full/config_led.h
new file mode 100644
index 000000000..4f4971c2d
--- /dev/null
+++ b/keyboards/gmmk/full/config_led.h
@@ -0,0 +1,44 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS 7
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+
+#define LED_MATRIX_ROW_PINS MATRIX_ROW_PINS
+#define LED_MATRIX_COLS 16
+
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifndef VIA_ENABLE
+#ifdef QMK_KEYMAP_H
+ #include QMK_KEYMAP_H
+#endif
+#endif
+
+#ifdef KEYMAP_ISO
+ #define DRIVER_LED_TOTAL 105
+#else
+ #define DRIVER_LED_TOTAL 104
+#endif
+
+/* indicator pins */
+#define LED_PIN_ON_STATE 0
+#define LED_NUM_LOCK_PIN C6
+#define LED_CAPS_LOCK_PIN C7
+#define LED_SCROLL_LOCK_PIN C8
diff --git a/keyboards/gmmk/full/default.h b/keyboards/gmmk/full/default.h
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/gmmk/full/default.h
diff --git a/keyboards/gmmk/full/full.h b/keyboards/gmmk/full/full.h
new file mode 100644
index 000000000..cf106b829
--- /dev/null
+++ b/keyboards/gmmk/full/full.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+
+
+#define KEYMAP( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, \
+ K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, \
+ K602, K603, K604, K605, K607, K608, K609, K610, K611, K612, K613, K614 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, KC_NO, KC_NO}, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
+ { K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515}, \
+ { KC_NO, KC_NO, K602, K603, K604, K605, KC_NO, K607, K608, K609, K610, K611, K612, K613, K614, KC_NO} \
+}
diff --git a/keyboards/gmmk/full/gmmk.c b/keyboards/gmmk/full/gmmk.c
new file mode 100644
index 000000000..8df4d1f48
--- /dev/null
+++ b/keyboards/gmmk/full/gmmk.c
@@ -0,0 +1,88 @@
+#include "quantum.h"
+#include "rgb_matrix.h"
+
+/*
+ * turn off rgb when power off / suspend
+ */
+void suspend_power_down_kb(void) {
+ rgb_matrix_set_suspend_state(true);
+ suspend_power_down_user();
+}
+
+void housekeeping_task_kb(void) { rgb_matrix_set_suspend_state(false); }
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ wait_ms(5);
+ } else {
+ tap_code(KC_VOLD);
+ wait_ms(5);
+ }
+ }
+ return true;
+}
+
+bool encoder_update_kb(uint8_t index, bool clockwise) { return encoder_update_user(index, clockwise); }
+#endif
+
+#ifdef RAW_CONSOLE
+extern void raw_hid_send(uint8_t *data, uint8_t length);
+
+int8_t sendchar(uint8_t c) {
+ raw_hid_send(&c, 1);
+
+ return 1;
+}
+#endif
+
+/*
+ * must override sleep functions without idle thread
+ */
+#if CH_CFG_NO_IDLE_THREAD == TRUE
+
+# define CYCLES_PER_LOOP 9
+# define LOOP_TIMES (48000000 / (CH_CFG_ST_FREQUENCY) / (CYCLES_PER_LOOP))
+
+void chThdSleep(sysinterval_t time) {
+ uint32_t loops = time * LOOP_TIMES;
+
+ for (uint32_t i = 0; i < loops; i++) __NOP();
+}
+
+/* suspend thread used in usb_main.c */
+msg_t chThdSuspendTimeoutS(thread_reference_t *trp, sysinterval_t timeout) {
+ osalSysUnlock();
+ wait_ms(1);
+ //while (usbGetTransmitStatusI(&USBD1, KEYBOARD_IN_EPNUM));
+#ifdef SHARED_EP_ENABLE
+ //while (usbGetTransmitStatusI(&USBD1, SHARED_IN_EPNUM));
+#endif
+ osalSysLock();
+
+ return MSG_OK;
+}
+
+#endif /* CH_CFG_NO_IDLE_THREAD */
+
+int rand(void) {
+ static uint32_t seed = 134775813U;
+ seed = seed * 1664525U + 1013904223U;
+ return seed;
+}
+
+#ifdef GMMK_DEBUG
+void rgbprint(int v, uint8_t r, uint8_t g, uint8_t b) {
+ int32_t kc = 26;
+
+ if (v != 0) kc = 17 + v;
+
+ rgb_matrix_set_color(kc, r, g, b);
+}
+#endif
+
+#ifdef VIA_OPENRGB_HYBRID
+uint8_t is_orgb_mode = 1;
+#endif \ No newline at end of file
diff --git a/keyboards/gmmk/full/halconf.h b/keyboards/gmmk/full/halconf.h
new file mode 100644
index 000000000..908c75542
--- /dev/null
+++ b/keyboards/gmmk/full/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB FALSE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */
diff --git a/keyboards/gmmk/full/info.json b/keyboards/gmmk/full/info.json
new file mode 100644
index 000000000..de9471084
--- /dev/null
+++ b/keyboards/gmmk/full/info.json
@@ -0,0 +1 @@
+{"version":1,"keyboard":{"keys":[{"id":0,"legend":"Esc","state":{"x":0,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":0,"keycodes":[{"id":"KC_ESC","fields":[]},{"id":"RESET","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"F1","state":{"x":2,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":1,"keycodes":[{"id":"KC_F1","fields":[]},{"id":"KC_MYCM","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":2,"legend":"F2","state":{"x":3,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":2,"keycodes":[{"id":"KC_F2","fields":[]},{"id":"KC_WSCH","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":3,"legend":"F3","state":{"x":4,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":3,"keycodes":[{"id":"KC_F3","fields":[]},{"id":"KC_CALC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":4,"legend":"F4","state":{"x":5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":4,"keycodes":[{"id":"KC_F4","fields":[]},{"id":"KC_MSEL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":5,"legend":"F5","state":{"x":6.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":5,"keycodes":[{"id":"KC_F5","fields":[]},{"id":"KC_MPRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":6,"legend":"F6","state":{"x":7.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":6,"keycodes":[{"id":"KC_F6","fields":[]},{"id":"KC_MNXT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":7,"legend":"F7","state":{"x":8.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":7,"keycodes":[{"id":"KC_F7","fields":[]},{"id":"KC_MPLY","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":8,"legend":"F8","state":{"x":9.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":8,"keycodes":[{"id":"KC_F8","fields":[]},{"id":"KC_MSTP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":9,"legend":"F9","state":{"x":11,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":9,"keycodes":[{"id":"KC_F9","fields":[]},{"id":"KC_MUTE","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":10,"legend":"F10","state":{"x":12,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":10,"keycodes":[{"id":"KC_F10","fields":[]},{"id":"KC_VOLD","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":11,"legend":"F11","state":{"x":13,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":11,"keycodes":[{"id":"KC_F11","fields":[]},{"id":"KC_VOLU","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":12,"legend":"F12","state":{"x":14,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":12,"keycodes":[{"id":"KC_F12","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":13,"legend":"PrtSc","state":{"x":15.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":3,"keycodes":[{"id":"KC_PSCR","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":14,"legend":"Scroll Lock","state":{"x":16.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":4,"keycodes":[{"id":"KC_SLCK","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":15,"legend":"Pause\nBreak","state":{"x":17.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":5,"keycodes":[{"id":"KC_PAUS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":16,"legend":"~\n`","state":{"x":0,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":0,"keycodes":[{"id":"KC_GRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":17,"legend":"!\n1","state":{"x":1,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":1,"keycodes":[{"id":"KC_1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":18,"legend":"@\n2","state":{"x":2,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":2,"keycodes":[{"id":"KC_2","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":19,"legend":"#\n3","state":{"x":3,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":3,"keycodes":[{"id":"KC_3","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":20,"legend":"$\n4","state":{"x":4,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":4,"keycodes":[{"id":"KC_4","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":21,"legend":"%\n5","state":{"x":5,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":5,"keycodes":[{"id":"KC_5","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":22,"legend":"^\n6","state":{"x":6,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":6,"keycodes":[{"id":"KC_6","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":23,"legend":"&\n7","state":{"x":7,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":7,"keycodes":[{"id":"KC_7","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":24,"legend":"*\n8","state":{"x":8,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":8,"keycodes":[{"id":"KC_8","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":25,"legend":"(\n9","state":{"x":9,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":9,"keycodes":[{"id":"KC_9","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":26,"legend":")\n0","state":{"x":10,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":10,"keycodes":[{"id":"KC_0","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":27,"legend":"_\n-","state":{"x":11,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":11,"keycodes":[{"id":"KC_MINS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":28,"legend":"+\n=","state":{"x":12,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":12,"keycodes":[{"id":"KC_EQL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":29,"legend":"Backspace","state":{"x":13,"y":1.5,"r":0,"rx":0,"ry":0,"w":2,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":12,"keycodes":[{"id":"KC_BSPC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":30,"legend":"Insert","state":{"x":15.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":7,"keycodes":[{"id":"KC_INS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":31,"legend":"Home","state":{"x":16.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":8,"keycodes":[{"id":"KC_HOME","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":32,"legend":"PgUp","state":{"x":17.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":9,"keycodes":[{"id":"KC_PGUP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":33,"legend":"Tab","state":{"x":0,"y":2.5,"r":0,"rx":0,"ry":0,"w":1.5,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":0,"keycodes":[{"id":"KC_TAB","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":34,"legend":"Q","state":{"x":1.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":1,"keycodes":[{"id":"KC_Q","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":35,"legend":"W","state":{"x":2.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":2,"keycodes":[{"id":"KC_W","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":36,"legend":"E","state":{"x":3.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":3,"keycodes":[{"id":"KC_E","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":37,"legend":"R","state":{"x":4.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":4,"keycodes":[{"id":"KC_R","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":38,"legend":"T","state":{"x":5.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":5,"keycodes":[{"id":"KC_T","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":39,"legend":"Y","state":{"x":6.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":6,"keycodes":[{"id":"KC_Y","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":40,"legend":"U","state":{"x":7.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":7,"keycodes":[{"id":"KC_U","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":41,"legend":"I","state":{"x":8.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":8,"keycodes":[{"id":"KC_I","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":42,"legend":"O","state":{"x":9.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":9,"keycodes":[{"id":"KC_O","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":43,"legend":"P","state":{"x":10.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":10,"keycodes":[{"id":"KC_P","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":44,"legend":"{\n[","state":{"x":11.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":11,"keycodes":[{"id":"KC_LBRC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":45,"legend":"}\n]","state":{"x":12.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":12,"keycodes":[{"id":"KC_RBRC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":46,"legend":"|\n\\","state":{"x":13.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1.5,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":12,"keycodes":[{"id":"KC_BSLS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":47,"legend":"Delete","state":{"x":15.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":10,"keycodes":[{"id":"KC_DEL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":48,"legend":"End","state":{"x":16.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":11,"keycodes":[{"id":"KC_END","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":49,"legend":"PgDn","state":{"x":17.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":12,"keycodes":[{"id":"KC_PGDN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":50,"legend":"Caps Lock","state":{"x":0,"y":3.5,"r":0,"rx":0,"ry":0,"w":1.75,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":0,"keycodes":[{"id":"KC_CAPS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":51,"legend":"A","state":{"x":1.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":1,"keycodes":[{"id":"KC_A","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":52,"legend":"S","state":{"x":2.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":2,"keycodes":[{"id":"KC_S","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":53,"legend":"D","state":{"x":3.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":3,"keycodes":[{"id":"KC_D","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":54,"legend":"F","state":{"x":4.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":4,"keycodes":[{"id":"KC_F","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":55,"legend":"G","state":{"x":5.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":5,"keycodes":[{"id":"KC_G","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":56,"legend":"H","state":{"x":6.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":6,"keycodes":[{"id":"KC_H","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":57,"legend":"J","state":{"x":7.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":7,"keycodes":[{"id":"KC_J","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":58,"legend":"K","state":{"x":8.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":8,"keycodes":[{"id":"KC_K","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":59,"legend":"L","state":{"x":9.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":9,"keycodes":[{"id":"KC_L","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":60,"legend":":\n;","state":{"x":10.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":10,"keycodes":[{"id":"KC_SCLN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":61,"legend":"\"\n'","state":{"x":11.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":11,"keycodes":[{"id":"KC_QUOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":62,"legend":"Enter","state":{"x":12.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":2.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":12,"keycodes":[{"id":"KC_ENT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":63,"legend":"Shift","state":{"x":0,"y":4.5,"r":0,"rx":0,"ry":0,"w":2.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":0,"keycodes":[{"id":"KC_LSFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":64,"legend":"Z","state":{"x":2.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":1,"keycodes":[{"id":"KC_Z","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":65,"legend":"X","state":{"x":3.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":2,"keycodes":[{"id":"KC_X","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":66,"legend":"C","state":{"x":4.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":3,"keycodes":[{"id":"KC_C","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":67,"legend":"V","state":{"x":5.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":4,"keycodes":[{"id":"KC_V","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":68,"legend":"B","state":{"x":6.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":5,"keycodes":[{"id":"KC_B","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":69,"legend":"N","state":{"x":7.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":6,"keycodes":[{"id":"KC_N","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":70,"legend":"M","state":{"x":8.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":7,"keycodes":[{"id":"KC_M","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":71,"legend":"<\n,","state":{"x":9.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":8,"keycodes":[{"id":"KC_COMM","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":72,"legend":">\n.","state":{"x":10.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":9,"keycodes":[{"id":"KC_DOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":73,"legend":"?\n/","state":{"x":11.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":10,"keycodes":[{"id":"KC_SLSH","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":74,"legend":"Shift","state":{"x":12.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":2.75,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":11,"keycodes":[{"id":"KC_LSFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":75,"legend":"↑","state":{"x":16.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":10,"keycodes":[{"id":"KC_UP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":76,"legend":"Ctrl","state":{"x":0,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":0,"keycodes":[{"id":"KC_LCTL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":77,"legend":"Win","state":{"x":1.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":1,"keycodes":[{"id":"KC_LGUI","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":78,"legend":"Alt","state":{"x":2.5,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":2,"keycodes":[{"id":"KC_LALT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":79,"legend":"","state":{"x":3.75,"y":5.5,"r":0,"rx":0,"ry":0,"w":6.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":7},"row":5,"col":3,"keycodes":[{"id":"KC_SPC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":80,"legend":"Alt","state":{"x":10,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":4,"keycodes":[{"id":"KC_RALT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":81,"legend":"Win","state":{"x":11.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":5,"keycodes":[{"id":"MO()","fields":[1]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":82,"legend":"Menu","state":{"x":12.5,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":6,"keycodes":[{"id":"KC_APP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":83,"legend":"Ctrl","state":{"x":13.75,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":7,"keycodes":[{"id":"KC_RCTL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":84,"legend":"←","state":{"x":15.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":8,"keycodes":[{"id":"KC_LEFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":85,"legend":"↓","state":{"x":16.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":9,"keycodes":[{"id":"KC_DOWN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":86,"legend":"→","state":{"x":17.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":11,"keycodes":[{"id":"KC_RGHT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]}],"controller":2,"bounds":{"min":{"x":0,"y":0},"max":{"x":18.25,"y":6.5}},"rows":7,"cols":13,"pins":{"row":["D0","D1","D2","D3","D4","D5","D6"],"col":["C1","C2","A0","A1","A2","A3","A6","A7","C3","C4","C5","C7","C0"],"num":null,"caps":null,"scroll":null,"compose":null,"kana":null,"led":null,"rgb":null},"macros":{},"quantum":"void matrix_init_user(void) {\n}\n\nvoid matrix_scan_user(void) {\n}\n\nbool process_record_user(uint16_t keycode, keyrecord_t *record) {\n\treturn true;\n}","settings":{"diodeDirection":1,"name":"","bootloaderSize":2,"rgbNum":0,"backlightLevels":3}}} \ No newline at end of file
diff --git a/keyboards/gmmk/full/iso.h b/keyboards/gmmk/full/iso.h
new file mode 100644
index 000000000..687cb2e73
--- /dev/null
+++ b/keyboards/gmmk/full/iso.h
@@ -0,0 +1 @@
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/gmmk/full/keymaps/default/keymap.c b/keyboards/gmmk/full/keymaps/default/keymap.c
new file mode 100644
index 000000000..61b8a1bf2
--- /dev/null
+++ b/keyboards/gmmk/full/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* The GMMK uses a 7x16 matrix. Some keys are not wired in the matrix at their physical location */
+
+ [_BL] = KEYMAP( 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_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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK,
+ 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_KP_7, KC_KP_8, KC_KP_9,
+ 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_BSLS, KC_KP_4, KC_KP_5, KC_KP_6,
+ 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_ENT, KC_KP_1, KC_KP_2, KC_KP_3,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, KC_KP_0, KC_KP_DOT, KC_KP_ENTER,
+ KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN, KC_KP_MINUS, KC_KP_PLUS),
+
+ [_FN] = KEYMAP( RESET, KC_MYCM, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_MODE_FORWARD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_VAD, RGB_VAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_MOD, RGB_RMOD, KC_VOLD, KC_VOLU),
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/gmmk/full/keymaps/iso/keymap.c b/keyboards/gmmk/full/keymaps/iso/keymap.c
new file mode 100644
index 000000000..b1afce13b
--- /dev/null
+++ b/keyboards/gmmk/full/keymaps/iso/keymap.c
@@ -0,0 +1,36 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* The GMMK uses a 7x16 matrix. Some keys are not wired in the matrix at their physical location */
+
+ [_BL] = KEYMAP( 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_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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK,
+ 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_KP_7, KC_KP_8, KC_KP_9,
+ 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_BSLS, KC_KP_4, KC_KP_5, KC_KP_6,
+ 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_ENT, KC_KP_1, KC_KP_2, KC_KP_3,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, KC_KP_0, KC_KP_DOT, KC_KP_ENTER,
+ KC_NUBS, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN, KC_KP_MINUS, KC_KP_PLUS),
+
+ [_FN] = KEYMAP( RESET, KC_MYCM, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_MODE_FORWARD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_VAD, RGB_VAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_MOD, RGB_RMOD, KC_TRNS, KC_TRNS),
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/gmmk/full/keymaps/via/keymap.c b/keyboards/gmmk/full/keymaps/via/keymap.c
new file mode 100644
index 000000000..307e7fb6a
--- /dev/null
+++ b/keyboards/gmmk/full/keymaps/via/keymap.c
@@ -0,0 +1,74 @@
+#include QMK_KEYBOARD_H
+#include "rgb_matrix.h"
+
+#ifdef DEBUG_GMMK
+#include "printf.h"
+#endif
+
+#define _BL 0
+#define _FN 1
+#define _L2 2
+#define _L3 3
+
+#define SWITCH_MODE 0x1688
+#define GUI_LOCK 0x1689
+
+#ifdef VIA_OPENRGB_HYBRID
+extern uint8_t is_orgb_mode;
+#endif
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* The GMMK uses a 7x16 matrix. Some keys are not wired in the matrix at their physical location */
+
+ [_BL] = KEYMAP( 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_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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK,
+ 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_KP_7, KC_KP_8, KC_KP_9,
+ 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_BSLS, KC_KP_4, KC_KP_5, KC_KP_6,
+ 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_ENT, KC_KP_1, KC_KP_2, KC_KP_3,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, KC_KP_0, KC_KP_DOT, KC_KP_ENTER,
+ KC_NUBS, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN, KC_KP_MINUS, KC_KP_PLUS),
+
+ [_FN] = KEYMAP( RESET, KC_MYCM, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, LCTL(LSFT(KC_ESC)),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, SWITCH_MODE,KC_TRNS, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_MODE_FORWARD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, GUI_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_VAD, RGB_VAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_MOD, RGB_RMOD, KC_VOLD, KC_VOLU),
+ [_L2] = {[0 ... MATRIX_ROWS - 1] = {[0 ... MATRIX_COLS - 1] = KC_TRNS}},
+ [_L3] = {[0 ... MATRIX_ROWS - 1] = {[0 ... MATRIX_COLS - 1] = KC_TRNS}}
+};
+
+void matrix_init_user(void)
+{
+}
+
+void matrix_scan_user(void)
+{
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ switch (keycode) {
+ case SWITCH_MODE:
+ #ifdef VIA_OPENRGB_HYBRID
+ if (record->event.pressed) {
+ is_orgb_mode = !is_orgb_mode;
+ }
+ #endif
+ return false;
+
+ case GUI_LOCK:
+ /* win lock */
+ if (record->event.pressed) {
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.no_gui = !keymap_config.no_gui;
+ eeconfig_update_keymap(keymap_config.raw);
+ clear_keyboard();
+ }
+
+ return false;
+ }
+
+ return true;
+}
diff --git a/keyboards/gmmk/full/keymaps/via/rgb_matrix_user.inc b/keyboards/gmmk/full/keymaps/via/rgb_matrix_user.inc
new file mode 100644
index 000000000..c6ffd7313
--- /dev/null
+++ b/keyboards/gmmk/full/keymaps/via/rgb_matrix_user.inc
@@ -0,0 +1 @@
+#include "ripple.h" \ No newline at end of file
diff --git a/keyboards/gmmk/full/keymaps/via/ripple.h b/keyboards/gmmk/full/keymaps/via/ripple.h
new file mode 100644
index 000000000..9c543df03
--- /dev/null
+++ b/keyboards/gmmk/full/keymaps/via/ripple.h
@@ -0,0 +1,124 @@
+#ifndef DISABLE_RGB_MATRIX_RIPPLE
+# define RGB_MATRIX_RIPPLE
+RGB_MATRIX_EFFECT(RIPPLE)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+# define RIPPLE_MAX_NUM 3
+# define RIPPLE_SPEED_MAX 5
+# define RIPPLE_X_MAX 224
+# define RIPPLE_Y_MAX 64
+# define RIPPLE_R_MAX 232
+# define RIPPLE_MIN_HSV_V 10
+# define RIPPLE_SPEED 16
+# define RIPPLE_DELAY 100
+
+# define ABS(x) ((x) > 0 ? (x) : -(x))
+# define RAND(x) ((uint32_t)rand() % (uint32_t)(x))
+
+typedef struct {
+ uint8_t cx, cy;
+ uint8_t delay;
+ uint8_t speed;
+ uint16_t r;
+ uint16_t thick;
+ HSV hsv;
+} ripple_t;
+
+static ripple_t ripples[RIPPLE_MAX_NUM];
+
+static bool is_on_ripple(int32_t x, int32_t y, int32_t cx, int32_t cy, int32_t r, int32_t thick) {
+ int32_t dx, dy, r2, s;
+
+ dx = x - cx;
+ dy = y - cy;
+ r >>= 1;
+ r2 = r * r;
+ s = dx * dx + dy * dy - r2;
+ s = ABS(s);
+
+ if (s <= thick)
+ return true;
+ else
+ return false;
+}
+
+static void init_ripple(ripple_t *rp) {
+ rp->cx = RAND(RIPPLE_X_MAX);
+ rp->cy = RAND(RIPPLE_Y_MAX);
+ rp->r = RAND(10) + 2;
+ rp->delay = RAND(scale8(RIPPLE_DELAY, rgb_matrix_config.speed) + 1) + 40;
+ rp->speed = RAND(scale8(RIPPLE_SPEED, rgb_matrix_config.speed) + 1) + 2;
+ rp->hsv.h = RAND(255);
+ rp->hsv.s = 150 + RAND(100);
+ rp->hsv.v = rgb_matrix_config.hsv.v;
+ rp->thick = RAND(1500) + 700;
+}
+
+bool RIPPLE(effect_params_t *params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ if (params->init) {
+ for (int32_t i = 0; i < RIPPLE_MAX_NUM; i++) {
+ ripple_t *rp = ripples + i;
+ init_ripple(rp);
+ }
+ }
+
+ if (led_min == 0) {
+ for (int32_t j = 0; j < RIPPLE_MAX_NUM; j++) {
+ ripple_t *rp = ripples + j;
+
+ if (rp->delay)
+ rp->delay--;
+ else {
+ int32_t r = rp->r / 2;
+
+ if (r > RIPPLE_R_MAX) {
+ init_ripple(rp);
+ } else {
+ rp->r += rp->speed;
+
+ // degrade V with radius
+ int32_t new_v = (int32_t)rp->hsv.v - (int32_t)(rp->speed / 2);
+
+ if (new_v < RIPPLE_MIN_HSV_V)
+ rp->hsv.v = RIPPLE_MIN_HSV_V;
+ else
+ rp->hsv.v = (uint32_t)new_v;
+ }
+ }
+ }
+ }
+
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+
+ bool is_rendered = false;
+ uint32_t r = 0, g = 0, b = 0;
+
+ for (int32_t j = 0; j < RIPPLE_MAX_NUM; j++) {
+ ripple_t *rp = ripples + j;
+ bool is_ripple = (rp->delay == 0) && is_on_ripple(g_led_config.point[i].x, g_led_config.point[i].y, rp->cx, rp->cy, rp->r, rp->thick);
+ if (is_ripple) {
+ RGB rgb = rgb_matrix_hsv_to_rgb(rp->hsv);
+ r += rgb.r;
+ g += rgb.g;
+ b += rgb.b;
+ is_rendered = true;
+ }
+ }
+
+ if (is_rendered) {
+ if (r > 255) r = 255;
+ if (g > 255) g = 255;
+ if (b > 255) b = 255;
+ rgb_matrix_set_color(i, r, g, b);
+ } else
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BREATHING
diff --git a/keyboards/gmmk/full/keymaps/via/rules.mk b/keyboards/gmmk/full/keymaps/via/rules.mk
new file mode 100644
index 000000000..730559684
--- /dev/null
+++ b/keyboards/gmmk/full/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+RGB_MATRIX_CUSTOM_USER = yes
diff --git a/keyboards/gmmk/full/led_matrix.c b/keyboards/gmmk/full/led_matrix.c
new file mode 100644
index 000000000..f4dec5361
--- /dev/null
+++ b/keyboards/gmmk/full/led_matrix.c
@@ -0,0 +1,36 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+extern void _set_color(int index, uint8_t r, uint8_t g, uint8_t b);
+
+extern void process_backlight(uint8_t devid, volatile LED_TYPE* states);
+
+static void flush(void)
+{
+ process_backlight(0, NULL);
+}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ if (index >= 0 && index < DRIVER_LED_TOTAL)
+ {
+ _set_color(index, r, g, b);
+ }
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+void init(void) {
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
diff --git a/keyboards/gmmk/full/mcuconf.h b/keyboards/gmmk/full/mcuconf.h
new file mode 100644
index 000000000..c75588c60
--- /dev/null
+++ b/keyboards/gmmk/full/mcuconf.h
@@ -0,0 +1,57 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define CRT1_AREAS_NUMBER 1
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */
diff --git a/keyboards/gmmk/full/readme.md b/keyboards/gmmk/full/readme.md
new file mode 100644
index 000000000..41c0b1499
--- /dev/null
+++ b/keyboards/gmmk/full/readme.md
@@ -0,0 +1,33 @@
+# GMMK Full Mechanical Keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap: (104 keys)
+ make gmmk/full:default
+ make gmmk/full/rev2:default
+ make gmmk/full/rev3:default
+
+ to build ISO keymap: (105 keys)
+ make gmmk/full:iso
+ make gmmk/full/rev2:iso
+ make gmmk/full/rev3:iso
+
+ to build VIA:
+ make gmmk/full/rev2:via
+ make gmmk/full/rev3:via
+
+ For VIA + OpenRGB (WIP),
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+PS.
+1. FULL would work on TKL. Some rgb effects would got offset issues.
+2. Rev2 firmware will work on rev3 without rgb. Hang otherwise.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions] (https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/full/rev2/backlight.c b/keyboards/gmmk/full/rev2/backlight.c
new file mode 100644
index 000000000..efc4b6a52
--- /dev/null
+++ b/keyboards/gmmk/full/rev2/backlight.c
@@ -0,0 +1,450 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <SN32F260.h>
+#include "ch.h"
+#include "hal.h"
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+#define I2C_SCL A4
+#define I2C_SDA A5
+#define I2C_SDB B0
+
+#define I2C_SCL_IN readPin(I2C_SCL)
+#define I2C_SDA_IN readPin(I2C_SDA)
+
+#define I2C_SCL_HI do { setPinOutput(I2C_SCL); writePinHigh(I2C_SCL); } while (0)
+#define I2C_SCL_LO do { setPinOutput(I2C_SCL); writePinLow(I2C_SCL); } while (0)
+#define I2C_SCL_HIZ do { setPinInputHigh(I2C_SCL); } while (0)
+
+#define I2C_SDA_HI do { setPinOutput(I2C_SDA); writePinHigh(I2C_SDA); } while (0)
+#define I2C_SDA_LO do { setPinOutput(I2C_SDA); writePinLow(I2C_SDA); } while (0)
+#define I2C_SDA_HIZ do { setPinInputHigh(I2C_SDA); } while (0)
+
+/*
+ * according to the spec, high SCL peroid 0.7us, low SCL peroid 1.3us
+ *
+ * i2c_delay 1 loop about 7 cycles. Under 48MHz, the actual delay is around 0.9us and 1.5us respectively.
+ */
+#define I2C_DELAY i2c_delay(2)
+
+#ifdef USE_FRAMEBUFFER
+static RGB g_fb[DRIVER_LED_TOTAL];
+#else
+static uint8_t sel_frame[2] = {0xFF, 0xFF};
+static uint8_t sel_frame_idx = 0;
+#endif
+
+extern uint8_t is_orgb_mode;
+
+static __inline void i2c_delay(uint32_t loop)
+{
+ // #pragma GCC unroll 0
+ for (int32_t i = 0; i < loop; i++)
+ __NOP();
+ // SN_WDT->FEED = 0x5AFA55AA;
+}
+
+void i2c_init(void)
+{
+ // drive strength all gpio A 20ma
+ SN_GPIO0->MODE |= 0xFFFF0000;
+
+ I2C_SCL_HI;
+ I2C_SDA_HIZ;
+
+ setPinOutput(I2C_SDB);
+ writePinHigh(I2C_SDB);
+ i2c_delay(100);
+}
+
+// #pragma GCC push_options
+// #pragma GCC optimize ("-O2")
+
+static void i2c_process_bit(uint8_t *i2c_tx_byte)
+{
+ if (*i2c_tx_byte & 0x80)
+ {
+ I2C_SDA_HI;
+ }
+ else
+ {
+ I2C_SDA_LO;
+ }
+
+ *i2c_tx_byte = *i2c_tx_byte << 1;
+
+ I2C_SCL_HI;
+ I2C_DELAY;
+ I2C_SCL_LO;
+ I2C_DELAY;
+}
+
+static uint8_t i2c_writeb(uint8_t b)
+{
+ uint8_t fail = 0;
+
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+
+/*
+ if (!is_ack)
+ return 0;
+*/
+ /* ack bit */
+ setPinInput(I2C_SDA);
+
+ I2C_SCL_HI;
+ I2C_DELAY;
+
+ fail = I2C_SDA_IN;
+
+ I2C_SCL_LO;
+ I2C_DELAY;
+
+ return fail;
+}
+
+static void i2c_start_phase(void)
+{
+ /* START */
+ I2C_SDA_LO;
+ I2C_DELAY;
+ I2C_SCL_LO;
+ I2C_DELAY;
+}
+
+static void i2c_stop_phase(void)
+{
+ I2C_SDA_LO;
+ I2C_DELAY;
+
+ /* STOP */
+ I2C_SCL_HI;
+ I2C_DELAY;
+ I2C_SDA_HIZ;
+
+ I2C_DELAY;
+ I2C_DELAY;
+}
+
+// #pragma GCC pop_options
+
+static uint8_t i2c_transaction(uint8_t i2c_addr_rw, uint8_t* i2c_data_ptr, uint8_t i2c_byte_ct)
+{
+ i2c_start_phase();
+
+ i2c_writeb(i2c_addr_rw);
+
+ for (uint8_t i = 0; i < i2c_byte_ct; i++)
+ i2c_writeb(i2c_data_ptr[i]);
+
+ i2c_stop_phase();
+
+ return 0;
+}
+
+static uint8_t i2c_write_buf(uint8_t devid, uint8_t* data, uint8_t len)
+{
+ int32_t tries = 1;
+
+ while ((tries-- > 0) && i2c_transaction(devid, data, len));
+
+ return 0;
+}
+
+static void i2c_write_reg(uint8_t devid, uint8_t reg, uint8_t data)
+{
+ uint8_t i2c_data[2];
+
+ i2c_data[0] = reg;
+ i2c_data[1] = data;
+
+ i2c_write_buf(devid, i2c_data, 2);
+}
+
+static void reset_rgb(int devid)
+{
+ i2c_write_reg(devid, 0xFD, 0x0B);
+
+ i2c_write_reg(devid, 0x0A, 0x00);
+ i2c_write_reg(devid, 0x00, 0x00);
+ i2c_write_reg(devid, 0x01, 0x10);
+ i2c_write_reg(devid, 0x05, 0x00);
+ i2c_write_reg(devid, 0x06, 0x00);
+ i2c_write_reg(devid, 0x08, 0x00);
+ i2c_write_reg(devid, 0x09, 0x00);
+ i2c_write_reg(devid, 0x0B, 0x00);
+ i2c_write_reg(devid, 0x0D, 0x0F);
+ i2c_write_reg(devid, 0x0E, 0x01);
+ i2c_write_reg(devid, 0x14, 68);
+ i2c_write_reg(devid, 0x15, 128);
+ i2c_write_reg(devid, 0x0F, 153);
+
+ i2c_write_reg(devid, 0xFD, 0);
+ for (int32_t i = 0; i < 0x10; i++)
+ i2c_write_reg(devid, i, 0xFF);
+ /* skip blink control 0x10~0x1F as reset 0 */
+ for (int32_t i = 0x20; i < 0xA0; i++)
+ i2c_write_reg(devid, i, 0);
+
+ i2c_write_reg(devid, 0xFD, 1);
+ for (int32_t i = 0; i < 0x10; i++)
+ i2c_write_reg(devid, i, 0xFF);
+ /* skip blink control 0x10~0x1F as reset 0 */
+ for (int32_t i = 0x20; i < 0xA0; i++)
+ i2c_write_reg(devid, i, 0);
+
+ i2c_write_reg(devid, 0xFD, 0xB);
+ i2c_write_reg(devid, 0x0A, 1);
+}
+
+#ifdef USE_FRAMEBUFFER
+// EE chip
+static const uint8_t led_ee_map[80] = {
+ // page 1
+ 255, 255, 255, 74, 104, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+
+ 58, 59, 60, 255, 255, 255, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+
+ 37, 38, 39, 40, 41, 42, 255, 255, 255, 43, 44, 45, 46, 47, 48, 49,
+
+ // page 2
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 255, 255, 255, 25, 26, 27, 28,
+
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 255, 255, 255, 255, 255
+};
+
+// E8 chip
+static const uint8_t led_e8_map[80] = {
+ // page 1
+ 255, 255, 255, 91, 92, 93, 255, 94, 255, 95, 96, 97, 255, 98, 99, 100,
+
+ 71, 72, 73, 255, 255, 255, 86, 87, 88, 89, 90, 101, 102, 103, 255, 255,
+
+ 52, 53, 54, 55, 56, 57, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+
+ // page 2
+ 30, 31, 32, 33, 34, 35, 36, 50, 51, 255, 255, 255, 255, 255, 255, 255,
+
+ 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 29, 255, 255, 255, 255, 255
+};
+
+static void flush_led_fb(uint8_t devid, const uint8_t *map)
+{
+ int32_t led_idx = 0, i, j;
+ uint8_t block[48];
+
+ // page 1
+ i2c_write_reg(devid, 0xFD, 0);
+
+ i2c_start_phase();
+ i2c_writeb(devid);
+ i2c_writeb(0x20);
+
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ uint8_t r, g, b;
+ int32_t mi = map[led_idx++];
+
+ if (mi >= DRIVER_LED_TOTAL)
+ r = g = b = 0;
+ else {
+ r = g_fb[mi].r;
+ g = g_fb[mi].g;
+ b = g_fb[mi].b;
+ }
+
+ block[j] = r;
+ block[j + 16] = g;
+ block[j + 32] = b;
+ }
+
+ int32_t block_size;
+
+ if (i <= 1)
+ block_size = 48;
+ else
+ block_size = 32;
+
+ for (j = 0; j < block_size; j++)
+ i2c_writeb(block[j]);
+ }
+
+ i2c_stop_phase();
+
+ // page 2
+ i2c_write_reg(devid, 0xFD, 1);
+
+ // write the blue channel of last row in page 1
+ i2c_start_phase();
+ i2c_writeb(devid);
+ i2c_writeb(0x20);
+ for (i = 0; i < 16; i++)
+ i2c_writeb(block[32 + i]);
+
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ uint8_t r, g, b;
+ int32_t mi = map[led_idx++];
+
+ if (mi >= DRIVER_LED_TOTAL)
+ r = g = b = 0;
+ else {
+ r = g_fb[mi].r;
+ g = g_fb[mi].g;
+ b = g_fb[mi].b;
+ }
+
+ block[j] = r;
+ block[j + 16] = g;
+ block[j + 32] = b;
+ }
+
+ for (j = 0; j < 48; j++)
+ i2c_writeb(block[j]);
+ }
+
+ i2c_stop_phase();
+}
+
+#else
+
+/*
+ * led index to RGB address
+ */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/* 0*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xC0,0xC1,0xC2,0xC3,0xC4,
+/*16*/ 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x9C,0x9D,0x9E,0x9F,0xCA,0x90,0x91,0x92,0x93,0x94,0x95,0x96,
+/*37*/ 0x60,0x61,0x62,0x63,0x64,0x65,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x97,0x98,0x60,0x61,0x62,0x63,0x64,0x65,
+/*58*/ 0x30,0x31,0x32,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x30,0x31,0x32,
+/*74*/ 0x03,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x36,0x37,0x38,0x39,0x3A,
+/*91*/ 0x03,0x04,0x05,0x07,0x09,0x0A,0x0B,0x0D,0x0E,0x0F,0x3B,0x3C,0x3D
+#ifdef KEYMAP_ISO
+ ,0x04 /* KC_NUBS */
+#endif
+};
+
+/*
+ * led index to chip selection table (0: E8, 1: EE)
+ */
+static const uint8_t g_led_chip[DRIVER_LED_TOTAL] = {
+/* 0*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+/*16*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+/*37*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+/*58*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+/*74*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+/*91*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+#ifdef KEYMAP_ISO
+ ,1 /* KC_NUBS */
+#endif
+};
+
+static void set_pwm(uint8_t dev, uint8_t addr, uint8_t value)
+{
+ /* >=0x80 for frame 2 otherwise frame 1 */
+ if (addr >= 0x80) {
+ if (sel_frame[sel_frame_idx] != 1) {
+ i2c_write_reg(dev, 0xFD, 1);
+ sel_frame[sel_frame_idx] = 1;
+ }
+ addr -= 0x80;
+ }
+ else if (sel_frame[sel_frame_idx] != 0) {
+ i2c_write_reg(dev, 0xFD, 0);
+ sel_frame[sel_frame_idx] = 0;
+ }
+
+ i2c_write_reg(dev, addr + 0x20, value);
+}
+
+static void _set_color_direct(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+ uint8_t dev;
+ int l = g_led_pos[index];
+
+ if (g_led_chip[index]) {
+ dev = 0xEE;
+ sel_frame_idx = 1;
+ }
+ else {
+ dev = 0xE8;
+ sel_frame_idx = 0;
+ }
+
+ set_pwm(dev, l, r);
+ set_pwm(dev, l + 0x10, g);
+ set_pwm(dev, l + 0x20, b);
+}
+#endif
+
+void _set_color(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+#ifdef USE_FRAMEBUFFER
+ g_fb[index].r = r;
+ g_fb[index].g = g;
+ g_fb[index].b = b;
+#else
+
+#ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode && (index == 45 || index == 59 || index == 78))
+ r = g = b = 255;
+#endif
+
+ _set_color_direct(index, r, g, b);
+#endif
+}
+
+void _read_color(int index, uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ *r = 0;
+ *g = 0;
+ *b = 0;
+}
+
+void process_backlight(uint8_t devid, volatile LED_TYPE *states)
+{
+ static unsigned char state = 0;
+
+ switch (state)
+ {
+ case 0: /* init RGB chips */
+ i2c_init();
+ reset_rgb(0xE8);
+ reset_rgb(0xEE);
+
+ state = 1;
+ break;
+
+ case 1:
+ #ifdef USE_FRAMEBUFFER
+
+ #ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode) {
+ rgb_matrix_set_color(78, 255, 255, 255);
+ rgb_matrix_set_color(45, 255, 255, 255);
+ rgb_matrix_set_color(59, 255, 255, 255);
+ }
+ #endif
+
+ flush_led_fb(0xEE, led_ee_map);
+ flush_led_fb(0xE8, led_e8_map);
+ #endif
+ break;
+ }
+} \ No newline at end of file
diff --git a/keyboards/gmmk/full/rev2/readme.md b/keyboards/gmmk/full/rev2/readme.md
new file mode 100644
index 000000000..41c0b1499
--- /dev/null
+++ b/keyboards/gmmk/full/rev2/readme.md
@@ -0,0 +1,33 @@
+# GMMK Full Mechanical Keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap: (104 keys)
+ make gmmk/full:default
+ make gmmk/full/rev2:default
+ make gmmk/full/rev3:default
+
+ to build ISO keymap: (105 keys)
+ make gmmk/full:iso
+ make gmmk/full/rev2:iso
+ make gmmk/full/rev3:iso
+
+ to build VIA:
+ make gmmk/full/rev2:via
+ make gmmk/full/rev3:via
+
+ For VIA + OpenRGB (WIP),
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+PS.
+1. FULL would work on TKL. Some rgb effects would got offset issues.
+2. Rev2 firmware will work on rev3 without rgb. Hang otherwise.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions] (https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/full/rev2/rules.mk b/keyboards/gmmk/full/rev2/rules.mk
new file mode 100644
index 000000000..e15d0adf5
--- /dev/null
+++ b/keyboards/gmmk/full/rev2/rules.mk
@@ -0,0 +1,3 @@
+SRC += ../config_led.c
+SRC += ../led_matrix.c
+SRC += backlight.c \ No newline at end of file
diff --git a/keyboards/gmmk/full/rev3/SPI.h b/keyboards/gmmk/full/rev3/SPI.h
new file mode 100644
index 000000000..825805453
--- /dev/null
+++ b/keyboards/gmmk/full/rev3/SPI.h
@@ -0,0 +1,186 @@
+#ifndef __SN32F240_SSP_H
+#define __SN32F240_SSP_H
+
+
+/*_____ I N C L U D E S ____________________________________________________*/
+
+/*_____ D E F I N I T I O N S ______________________________________________*/
+/*
+Base Address: 0x4001 C000 (SSP0)
+ 0x4005 8000 (SSP1)
+*/
+
+/* SSP n Control register 0 <SSPn_CTRL0> (0x00) */
+#define SSP_SSPEN_DIS 0 //[0:0] SSP enable bit
+#define SSP_SSPEN_EN 1
+#define mskSSP_SSPEN_DIS (SSP_SSPEN_DIS<<0)
+#define mskSSP_SSPEN_EN (SSP_SSPEN_EN<<0)
+
+ //[1:1] Loop back mode disable
+#define SSP_LOOPBACK_DIS 0 //Disable
+#define SSP_LOOPBACK_EN 1 //Data input from data output
+#define mskSSP_LOOPBACK_DIS (SSP_LOOPBACK_DIS<<1)
+#define mskSSP_LOOPBACK_EN (SSP_LOOPBACK_EN<<1)
+
+ //[2:2] Slave data output disable bit (ONLY used in slave mode)
+#define SSP_SDODIS_EN 0 //Enable slave data output
+#define SSP_SDODIS_DIS 1 //Disable slave data output. (MISO=0)
+#define mskSSP_SDODIS_EN (SSP_SDODIS_EN<<2)
+#define mskSSP_SDODIS_DIS (SSP_SDODIS_DIS<<2)
+
+#define SSP_MS_MASTER_MODE 0 //[3:3] Master/Slave selection bit
+#define SSP_MS_SLAVE_MODE 1
+#define mskSSP_MS_MASTER_MODE (SSP_MS_MASTER_MODE<<3)
+#define mskSSP_MS_SLAVE_MODE (SSP_MS_SLAVE_MODE<<3)
+
+#define SSP_FORMAT_SPI_MODE 0 //[4:4] Interface format
+#define SSP_FORMAT_SSP_MODE 1
+#define mskSSP_FORMAT_SPI_MODE (SSP_FORMAT_SPI_MODE<<4)
+#define mskSSP_FORMAT_SSP_MODE (SSP_FORMAT_SSP_MODE<<4)
+
+ //[7:6] SSP FSM and FIFO Reset bit
+#define SSP_FRESET_DO_NOTHING 0 //Do nothing
+#define SSP_FRESET_RESET_FIFO 3 //Reset finite state machine and FIFO
+#define mskSSP_FRESET_DO_NOTHING (SSP_FRESET_DO_NOTHING<<6)
+#define mskSSP_FRESET_RESET_FIFO (SSP_FRESET_RESET_FIFO<<6)
+
+#define SSP_DL_3 2 //[11:8] Data Length = DL[3:0]+1
+#define SSP_DL_4 3
+#define SSP_DL_5 4
+#define SSP_DL_6 5
+#define SSP_DL_7 6
+#define SSP_DL_8 7
+#define SSP_DL_9 8
+#define SSP_DL_10 9
+#define SSP_DL_11 10
+#define SSP_DL_12 11
+#define SSP_DL_13 12
+#define SSP_DL_14 13
+#define SSP_DL_15 14
+#define SSP_DL_16 15
+
+#define SSP_TXFIFOTH_0 0 //[14:12]TX FIFO Threshold level
+#define SSP_TXFIFOTH_1 1
+#define SSP_TXFIFOTH_2 2
+#define SSP_TXFIFOTH_3 3
+#define SSP_TXFIFOTH_4 4
+#define SSP_TXFIFOTH_5 5
+#define SSP_TXFIFOTH_6 6
+#define SSP_TXFIFOTH_7 7
+
+#define SSP_RXFIFOTH_0 0 //[17:15]RX FIFO Threshold level
+#define SSP_RXFIFOTH_1 1
+#define SSP_RXFIFOTH_2 2
+#define SSP_RXFIFOTH_3 3
+#define SSP_RXFIFOTH_4 4
+#define SSP_RXFIFOTH_5 5
+#define SSP_RXFIFOTH_6 6
+#define SSP_RXFIFOTH_7 7
+
+ //[18:18]Auto-SEL disable bit. For SPI mode only.
+#define SSP_SELDIS_EN 0 //Enable Auto-SEL flow control
+#define SSP_SELDIS_DIS 1 //Disable Auto-SEL flow control
+#define mskSSP_SELDIS_EN (SSP_SELDIS_EN<<18)
+#define mskSSP_SELDIS_DIS (SSP_SELDIS_DIS<<18)
+
+
+/* SSP n Control register 1 <SSPn_CTRL1> (0x04) */
+ //[0:0]MSB/LSB selection bit
+#define SSP_MLSB_MSB 0 //MSB transmit first
+#define SSP_MLSB_LSB 1 //LSB transmit first
+#define mskSSP_MLSB_MSB (SSP_MLSB_MSB<<0)
+#define mskSSP_MLSB_LSB (SSP_MLSB_LSB<<0)
+
+ //[1:1]Clock polarity selection bit
+#define SSP_CPOL_SCK_IDLE_LOW 0 //SCK idles at Low level
+#define SSP_CPOL_SCK_IDLE_HIGH 1 //SCK idles at High level
+#define mskSSP_CPOL_SCK_IDLE_LOW (SSP_CPOL_SCK_IDLE_LOW<<1)
+#define mskSSP_CPOL_SCK_IDLE_HIGH (SSP_CPOL_SCK_IDLE_HIGH<<1)
+
+ //[2:2]Clock phase for edge sampling
+#define SSP_CPHA_FALLING_EDGE 0 //Data changes at clock falling edge
+#define SSP_CPHA_RISING_EDGE 1 //Data changes at clock rising edge
+#define mskSSP_CPHA_FALLING_EDGE (SSP_CPHA_FALLING_EDGE<<2)
+#define mskSSP_CPHA_RISING_EDGE (SSP_CPHA_RISING_EDGE<<2)
+
+
+/* SSP n Clock Divider register <SSPn_CLKDIV> (0x08) */
+ //[7:0]SSPn clock divider
+#define SSP_DIV 16 //MCLK/n, n = 2, 4, 6, 8, ...,512
+
+
+/* SSP n Status register <SSPn_STAT> (0x0C) */
+#define mskSSP_TX_EMPTY (0x1<<0) //TX FIFO empty flag
+#define mskSSP_TX_FULL (0x1<<1) //TX FIFO full flag
+#define mskSSP_RX_EMPTY (0x1<<2) //RX FIFO empty flag
+#define mskSSP_RX_FULL (0x1<<3) //RX FIFO full flag
+#define mskSSP_BUSY (0x1<<4) //Busy flag
+#define mskSSP_TXFIFOTHF (0x1<<5) //TX FIFO threshold flag
+#define mskSSP_RXFIFOTHF (0x1<<6) //RX FIFO threshold flag
+
+
+/* SSP n Interrupt Enable register <SSPn_IE> (0x10) */
+#define SSP_RXOVFIE_DIS 0 //[0:0]RX Overflow interrupt enable
+#define SSP_RXOVFIE_EN 1
+#define mskSSP_RXOVFIE_DIS (SSP_RXOVFIE_DIS<<0)
+#define mskSSP_RXOVFIE_EN (SSP_RXOVFIE_EN<<0)
+
+#define SSP_RXTOIE_DIS 0 //[1:1]RX time-out interrupt enable
+#define SSP_RXTOIE_EN 1
+#define mskSSP_RXTOIE_DIS (SSP_RXTOIE_DIS<<1)
+#define mskSSP_RXTOIE_EN (SSP_RXTOIE_EN<<1)
+
+#define SSP_RXFIFOTHIE_DIS 0 //[2:2]RX FIFO threshold interrupt enable
+#define SSP_RXFIFOTHIE_EN 1
+#define mskSSP_RXFIFOTHIE_DIS (SSP_RXFIFOTHIE_DIS<<2)
+#define mskSSP_RXFIFOTHIE_EN (SSP_RXFIFOTHIE_EN <<2)
+
+#define SSP_TXFIFOTHIE_DIS 0 //[3:3]TX FIFO threshold interrupt enable
+#define SSP_TXFIFOTHIE_EN 1
+#define mskSSP_TXFIFOTHIE_DIS (SSP_TXFIFOTHIE_DIS<<3)
+#define mskSSP_TXFIFOTHIE_EN (SSP_TXFIFOTHIE_EN<<3)
+
+
+/* SSP n Raw Interrupt Status register <SSPn_RIS> (0x14) */
+/* SSP n Interrupt Clear register <SSPn_IC> (0x18) */
+#define mskSSP_RXOVFIF (0x1<<0) //[0:0]RX overflow interrupt flag
+#define mskSSP_RXOVFIC mskSSP_RXOVFIF
+
+#define mskSSP_RXTOIF (0x1<<1) //[1:1]RX time-out interrupt flag
+#define mskSSP_RXTOIC mskSSP_RXTOIF
+
+#define mskSSP_RXFIFOTHIF (0x1<<2) //[2:2]RX FIFO threshold interrupt flag
+#define mskSSP_RXFIFOTHIC mskSSP_RXFIFOTHIF
+
+#define mskSSP_TXFIFOTHIF (0x1<<3) //[3:3]TX FIFO threshold interrupt flag
+#define mskSSP_TXFIFOTHIC mskSSP_TXFIFOTHIF
+
+
+/* SSP n Data Fetch register <SSPn_DF> (0x20) */
+ //[0:0]SSP data fetch control bit
+#define SSP_DF_DIS 0 //Disable
+#define SSP_DF_EN 1 //Enable when SCKn frequency > 6MHz
+#define mskSSP_DF_DIS (SSP_DF_DIS<<0)
+#define mskSSP_SSP_DF_EN (SSP_DF_EN<<0)
+
+
+/*_____ M A C R O S ________________________________________________________*/
+#define __SPI0_FIFO_RESET (SN_SSP0->CTRL0_b.FRESET = SSP_FRESET_RESET_FIFO)
+#define __SPI1_FIFO_RESET (SN_SSP1->CTRL0_b.FRESET = SSP_FRESET_RESET_FIFO)
+#define __SPI0_CLR_SEL0 (SN_GPIO1->DATA_b.DATA2=0)
+#define __SPI0_SET_SEL0 (SN_GPIO1->DATA_b.DATA2=1)
+#define __SPI1_CLR_SEL1 (SN_GPIO3->DATA_b.DATA6=0)
+#define __SPI1_SET_SEL1 (SN_GPIO3->DATA_b.DATA6=1)
+//SSP Data Fetch speed (High: SCK>6MHz)
+#define __SSP0_DATA_FETCH_HIGH_SPEED (SN_SSP0->DF = SSP_DF_EN) //*(volatile unsigned long *)(0x4001C020) = 1
+#define __SSP1_DATA_FETCH_HIGH_SPEED (SN_SSP1->DF = SSP_DF_EN) //*(volatile unsigned long *)(0x40058020) = 1
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+extern void SPI0_Init(void);
+extern void SPI0_Enable(void);
+extern void SPI0_Disable(void);
+
+extern void SPI0_Write(unsigned char *p, int len);
+#endif /*__SN32F760_SSP_H*/
+
diff --git a/keyboards/gmmk/full/rev3/SPI0.c b/keyboards/gmmk/full/rev3/SPI0.c
new file mode 100644
index 000000000..0a29fa044
--- /dev/null
+++ b/keyboards/gmmk/full/rev3/SPI0.c
@@ -0,0 +1,138 @@
+/******************** (C) COPYRIGHT 2014 SONiX *******************************
+* COMPANY: SONiX
+* DATE: 2014/05
+* AUTHOR: SA1
+* IC: SN32F240/230/220
+* DESCRIPTION: SPI0 related functions.
+*____________________________________________________________________________
+* REVISION Date User Description
+* 1.0 2013/12/17 SA1 1. First release
+* 1.1 2014/05/23 SA1 1. Add __SSP0_DATA_FETCH_HIGH_SPEED macro
+*
+*____________________________________________________________________________
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS TIME TO MARKET.
+* SONiX SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL
+* DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH SOFTWARE
+* AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN
+* IN CONNECTION WITH THEIR PRODUCTS.
+*****************************************************************************/
+
+/*_____ I N C L U D E S ____________________________________________________*/
+#include <SN32F260.h>
+#include "SPI.h"
+
+#define SN_SSP0 SN_SPI0
+#define SSP0_IRQn SPI0_IRQn
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+
+
+/*_____ D E F I N I T I O N S ______________________________________________*/
+
+
+/*_____ M A C R O S ________________________________________________________*/
+
+
+/*_____ F U N C T I O N S __________________________________________________*/
+
+/*****************************************************************************
+* Function : SPI0_Init
+* Description : Initialization of SPI0 init
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Init(void)
+{
+ SN_SYS1->AHBCLKEN |= (0x1 << 12);
+
+ SN_SSP0->CTRL0_b.DL = SSP_DL_8;
+ SN_SSP0->CTRL0_b.FORMAT = SSP_FORMAT_SPI_MODE;
+ SN_SSP0->CTRL0_b.MS = SSP_MS_MASTER_MODE;
+ SN_SSP0->CTRL0_b.LOOPBACK = SSP_LOOPBACK_DIS;
+ SN_SSP0->CTRL0_b.SDODIS = SSP_SDODIS_EN;
+
+ // SN_SSP0->CLKDIV_b.DIV = 5; // 48/12 = 4MHz
+ SN_SSP0->CLKDIV_b.DIV = 4; // 48/10 = 4.8 MHz
+
+ SN_SSP0->CTRL1 = SSP_CPHA_FALLING_EDGE | SSP_CPOL_SCK_IDLE_LOW | SSP_MLSB_MSB;
+
+ SN_SSP0->CTRL0_b.SELDIS = SSP_SELDIS_DIS;
+
+ __SPI0_FIFO_RESET;
+
+ NVIC_DisableIRQ(SSP0_IRQn);
+
+ // __SSP0_DATA_FETCH_HIGH_SPEED; //Enable if Freq. of SCK > 6MHz
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_EN;
+}
+
+/*****************************************************************************
+* Function : SPI0_Enable
+* Description : SPI0 enable setting
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Enable(void)
+{
+ //Enable HCLK for SSP0
+ SN_SYS1->AHBCLKEN |= (0x1 << 12);
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_EN;
+ __SPI0_FIFO_RESET;
+}
+
+/*****************************************************************************
+* Function : SPI0_Disable
+* Description : SPI0 disable setting
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Disable(void)
+{
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_DIS;
+ SN_SYS1->AHBCLKEN &=~ (0x1 << 12);
+}
+
+void SPI0_Write(unsigned char *p, int len)
+{
+ for (int i = 0; i < len; i++)
+ {
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = *p++;
+ }
+
+ while (SN_SSP0->STAT_b.BUSY);
+}
+
+void SPI0_Write1(uint8_t data)
+{
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = data;
+}
+
+void SPI0_Flush(void)
+{
+ while (SN_SSP0->STAT_b.BUSY);
+}
+
+void SPI0_Read3(unsigned char b1, unsigned char b2, unsigned char *b3)
+{
+ /* write first 2 bytes: header and address */
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = b1;
+ SN_SSP0->DATA_b.Data = b2;
+
+ /* read 1 byte data */
+ while (SN_SSP0->STAT_b.BUSY);
+ while (SN_SSP0->STAT_b.RX_EMPTY);
+ *b3 = SN_SSP0->DATA_b.Data;
+
+ while (SN_SSP0->STAT_b.BUSY);
+}
diff --git a/keyboards/gmmk/full/rev3/backlight.c b/keyboards/gmmk/full/rev3/backlight.c
new file mode 100644
index 000000000..117702437
--- /dev/null
+++ b/keyboards/gmmk/full/rev3/backlight.c
@@ -0,0 +1,311 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <SN32F260.h>
+#include "ch.h"
+#include "hal.h"
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+#include "SPI.h"
+
+extern void SPI0_Write1(uint8_t data);
+extern void SPI0_Read3(unsigned char b1, unsigned char b2, unsigned char *b3);
+
+#ifdef USE_FRAMEBUFFER
+static RGB g_fb[DRIVER_LED_TOTAL];
+#endif
+
+#define SDB B0
+#define SPI_DELAY() for (int32_t _del = 0; _del < 10; _del++) __NOP();
+
+static int g_cs_pin = 0;
+
+void spi_init(void)
+{
+ SPI0_Init();
+ SPI0_Enable();
+}
+
+void spi_set_cspin(int pin)
+{
+ if (g_cs_pin == pin)
+ return;
+
+ writePinHigh(B2);
+ setPinOutput(B2);
+ writePinHigh(B1);
+ setPinOutput(B1);
+
+ g_cs_pin = pin;
+}
+
+void spi_read3(unsigned char b1, unsigned char b2, unsigned char *b3)
+{
+ writePinLow(g_cs_pin);
+ SPI0_Read3(b1, b2, b3);
+ writePinHigh(g_cs_pin);
+}
+
+void spi_write(uint8_t *data_p, int len)
+{
+ writePinLow(g_cs_pin);
+ SPI0_Write(data_p, len);
+ writePinHigh(g_cs_pin);
+}
+
+void spi_w2(uint8_t page, uint8_t addr)
+{
+ uint8_t c[2];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ spi_write(c, 2);
+}
+
+void spi_w3(uint8_t page, uint8_t addr, uint8_t data)
+{
+ uint8_t c[4];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ c[2] = data;
+ spi_write(c, 3);
+}
+
+void spi_r3(uint8_t page, uint8_t addr, uint8_t *data)
+{
+ uint8_t c[4];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ spi_read3(c[0], c[1], data);
+}
+
+/*
+ * LED index to RGB address
+ * >100 means it belongs to pin B1 chipselected SN2735 chip, the real addr is minus by 100
+ */
+#ifdef KEYMAP_ISO
+
+/* ISO */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/* 0*/ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+/*16*/ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 21, 22, 23, 24, 25, 26, 27,
+/*37*/ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 32, 33, 34, 35, 36, 37, 38,
+/*58*/ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 145, 42, 43, 44,
+/*74*/ 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 49, 51, 52, 53, 54,
+/*91*/ 114, 115, 130, 131, 146, 147, 162, 163, 55, 56, 57, 59, 60, 149 /* KC_NUBS */
+};
+
+#else
+
+/* ANSI */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/* 0*/ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+/*16*/ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 21, 22, 23, 24, 25, 26, 27,
+/*37*/ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 32, 33, 34, 35, 36, 37, 38,
+/*58*/ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 145, 42, 43, 44,
+/*74*/ 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 49, 51, 52, 53, 54,
+/*91*/ 114, 115, 130, 131, 146, 147, 162, 163, 55, 56, 57, 59, 60
+};
+
+#endif
+
+#ifdef USE_FRAMEBUFFER
+// B1
+static const uint8_t led_b1_map[64] = {
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 91, 92,
+ 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 93, 94,
+ 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 255, 70, 95, 96,
+ 74, 104, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 255, 85, 97, 98
+};
+
+// B2
+static const uint8_t led_b2_map[64] = {
+ 0, 255, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 255, 255, 255, 255, 30, 31, 32,
+ 33, 34, 35, 36, 255, 255, 255, 255,
+ 51, 52, 53, 54, 55, 56, 57, 255,
+ 255, 255, 71, 72, 73, 255, 255, 255,
+ 255, 86, 255, 87, 88, 89, 90, 99,
+ 100, 101, 255, 102, 103, 255, 255, 255
+};
+
+// #pragma GCC push_options
+// #pragma GCC optimize ("-O2")
+
+static void flush_led_fb(int32_t pin, const uint8_t *map)
+{
+ uint8_t block[48];
+
+ spi_set_cspin(pin);
+
+ writePinHigh(pin);
+ SPI_DELAY();
+ writePinLow(pin);
+ SPI0_Write1(0x21);
+ SPI0_Write1(0);
+
+ int32_t led_idx = 0, i, j;
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ uint8_t r, g, b;
+ uint8_t mi = map[led_idx++];
+
+ if (mi >= DRIVER_LED_TOTAL)
+ r = g = b = 0;
+ else {
+ RGB *v = &g_fb[mi];
+ r = v->r;
+ g = v->g;
+ b = v->b;
+ }
+
+ block[j] = r;
+ block[j + 16] = b;
+ block[j + 32] = g;
+ }
+
+ SPI0_Write(block, 48);
+ }
+
+ writePinHigh(pin);
+}
+
+// #pragma GCC pop_options
+
+#else
+
+static void _set_color_direct(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+ int l = g_led_pos[index];
+
+ if (l >= 100)
+ {
+ l -= 100;
+ spi_set_cspin(B1);
+ }
+ else
+ spi_set_cspin(B2);
+
+ int y = l / 16;
+ int a = l % 16;
+
+ spi_w3(1, y * 48 + a, r); // r
+ spi_w3(1, y * 48 + a + 2 * 8, b); // b
+ spi_w3(1, y * 48 + a + 4 * 8, g); // g
+}
+
+#endif
+
+void _set_color(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+#ifdef USE_FRAMEBUFFER
+ g_fb[index].r = r;
+ g_fb[index].g = g;
+ g_fb[index].b = b;
+#else
+ _set_color_direct(index, r, g, b);
+#endif
+}
+
+void _read_color(int index, uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ int l = g_led_pos[index];
+
+ if (l >= 100)
+ {
+ l -= 100;
+ spi_set_cspin(B1);
+ }
+ else
+ spi_set_cspin(B2);
+
+ int y = l / 16;
+ int a = l % 16;
+
+ spi_r3(1, y * 48 + a, r); // r
+ spi_r3(1, y * 48 + a + 2 * 8, b); // b
+ spi_r3(1, y * 48 + a + 4 * 8, g); // g
+}
+
+void reset_rgb(int pin)
+{
+ spi_set_cspin(pin);
+
+ spi_w3(3, 0, 0);
+ spi_w3(3, 0x13, 0xAA);
+ spi_w3(3, 0x14, 0);
+ spi_w3(3, 0x15, 4);
+ spi_w3(3, 0x16, 0xC0);
+ spi_w3(3, 0x1A, 0);
+
+ // set curent
+ for (int i = 0; i < 12; i++)
+ {
+ spi_w3(4, i, 0x80);
+ }
+
+ // led all on
+ for (int i = 0; i < 192/8; i++)
+ {
+ spi_w3(0, i, 0xFF);
+ }
+
+ // turn off pwm
+ for (int i = 0; i < 192; i++)
+ {
+ spi_w3(1, i, 0);
+ }
+
+ // normal mode
+ spi_w3(3, 0, 1);
+}
+
+#ifdef VIA_OPENRGB_HYBRID
+extern uint8_t is_orgb_mode;
+#endif
+
+void process_backlight(uint8_t devid, volatile LED_TYPE* states)
+{
+ static unsigned char state = 0;
+
+ switch (state)
+ {
+ case 0: /* init RGB chips */
+ spi_init();
+
+ writePinHigh(SDB);
+ setPinOutput(SDB);
+ reset_rgb(B1);
+ reset_rgb(B2);
+
+ state = 1;
+ break;
+
+ case 1:
+ #ifdef USE_FRAMEBUFFER
+ #ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode) {
+ rgb_matrix_set_color(78, 255, 255, 255);
+ rgb_matrix_set_color(45, 255, 255, 255);
+ rgb_matrix_set_color(59, 255, 255, 255);
+ }
+ #endif
+
+ flush_led_fb(B1, led_b1_map);
+ flush_led_fb(B2, led_b2_map);
+ #endif
+ break;
+
+ }
+}
diff --git a/keyboards/gmmk/full/rev3/readme.md b/keyboards/gmmk/full/rev3/readme.md
new file mode 100644
index 000000000..41c0b1499
--- /dev/null
+++ b/keyboards/gmmk/full/rev3/readme.md
@@ -0,0 +1,33 @@
+# GMMK Full Mechanical Keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap: (104 keys)
+ make gmmk/full:default
+ make gmmk/full/rev2:default
+ make gmmk/full/rev3:default
+
+ to build ISO keymap: (105 keys)
+ make gmmk/full:iso
+ make gmmk/full/rev2:iso
+ make gmmk/full/rev3:iso
+
+ to build VIA:
+ make gmmk/full/rev2:via
+ make gmmk/full/rev3:via
+
+ For VIA + OpenRGB (WIP),
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+PS.
+1. FULL would work on TKL. Some rgb effects would got offset issues.
+2. Rev2 firmware will work on rev3 without rgb. Hang otherwise.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions] (https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/full/rev3/rules.mk b/keyboards/gmmk/full/rev3/rules.mk
new file mode 100644
index 000000000..b90a0d541
--- /dev/null
+++ b/keyboards/gmmk/full/rev3/rules.mk
@@ -0,0 +1,4 @@
+SRC += ../config_led.c
+SRC += ../led_matrix.c
+SRC += backlight.c
+SRC += SPI0.c \ No newline at end of file
diff --git a/keyboards/gmmk/full/rules.mk b/keyboards/gmmk/full/rules.mk
new file mode 100644
index 000000000..4b91c1747
--- /dev/null
+++ b/keyboards/gmmk/full/rules.mk
@@ -0,0 +1,34 @@
+# project specific files
+SRC += gmmk.c
+
+# MCU name
+MCU = SN32F268F
+
+# Build Options
+# comment out to disable the options.
+#
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = no
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes
+KEYBOARD_SHARED_EP = yes
+CONSOLE_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = yes
+CUSTOM_MATRIX = no
+LED_MATRIX_ENABLE = no
+LED_MATRIX_DRIVER = custom
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
+RAW_ENABLE = yes
+
+# ENCODER_ENABLE = yes
+# OPENRGB_ENABLE = yes
+
+USE_EXCEPTIONS_STACKSIZE = 0xE0
+USE_PROCESS_STACKSIZE = 0x1E0
+
+DEFAULT_FOLDER = gmmk/full/rev3
diff --git a/keyboards/gmmk/tkl/VIA_gmmk_tkl_ansi.json b/keyboards/gmmk/tkl/VIA_gmmk_tkl_ansi.json
new file mode 100644
index 000000000..f392fd518
--- /dev/null
+++ b/keyboards/gmmk/tkl/VIA_gmmk_tkl_ansi.json
@@ -0,0 +1,20 @@
+{
+ "name": "GMMK TKL ANSI",
+ "lighting": "none",
+ "vendorId": "0x0c45",
+ "productId": "0x652f",
+ "matrix": {"rows": 7, "cols": 13},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x":1}, "0,1", "0,2", "0,3", "0,4", {"x":0.5}, "0,5", "0,6", "0,7", "0,8", {"x":0.5}, "0,9", "0,10", "0,11", "0,12", {"x":0.25}, "6,3", "6,4", "6,5", {"y":0.25}],
+ ["1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":2}, "5,12", {"x":0.25}, "6,7", "6,8", "6,9"],
+ [{"w":1.5}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"w":1.5}, "3,12", {"x":0.25}, "6,10", "6,11", "6,12"],
+ [{"w":1.75}, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":2.25}, "4,12"],
+ [{"w":2.25}, "4,0", "4,1", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", {"w":2.75}, "4,11", {"x":1.25}, "5,10"],
+ [{"w":1.25}, "5,0", {"w":1.25}, "5,1", {"w":1.25}, "5,2", {"w":6.25}, "5,3", {"w":1.25}, "5,4", {"w":1.25}, "5,5", {"w":1.25}, "5,6", {"w":1.25}, "5,7",{"x":0.25}, "5,8", "5,9", "5,11"]
+ ]
+ }
+}
+
+
+
diff --git a/keyboards/gmmk/tkl/VIA_gmmk_tkl_iso.json b/keyboards/gmmk/tkl/VIA_gmmk_tkl_iso.json
new file mode 100644
index 000000000..e79e3b041
--- /dev/null
+++ b/keyboards/gmmk/tkl/VIA_gmmk_tkl_iso.json
@@ -0,0 +1,17 @@
+{
+ "name": "GMMK TKL ISO",
+ "lighting": "none",
+ "vendorId": "0x0c45",
+ "productId": "0x652f",
+ "matrix": {"rows": 7, "cols": 13},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x":1}, "0,1", "0,2", "0,3", "0,4", {"x":0.5}, "0,5", "0,6", "0,7", "0,8", {"x":0.5}, "0,9", "0,10", "0,11", "0,12", {"x":0.25}, "6,3", "6,4", "6,5", {"y":0.25}],
+ ["1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":2}, "5,12", {"x":0.25}, "6,7", "6,8", "6,9"],
+ [{"w":1.5}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25}, "4,12", {"x":0.25}, "6,10", "6,11", "6,12"],
+ [{"w":1.75}, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", "3,12"],
+ [{"w":1.25}, "4,0", "6,2", "4,1", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", {"w":2.75}, "4,11", {"x":1.25}, "5,10"],
+ [{"w":1.25}, "5,0", {"w":1.25}, "5,1", {"w":1.25}, "5,2", {"w":6.25}, "5,3", {"w":1.25}, "5,4", {"w":1.25}, "5,5", {"w":1.25}, "5,6", {"w":1.25}, "5,7", {"x":0.25}, "5,8", "5,9", "5,11"]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/boot_return.S b/keyboards/gmmk/tkl/boot_return.S
new file mode 100644
index 000000000..8acbec710
--- /dev/null
+++ b/keyboards/gmmk/tkl/boot_return.S
@@ -0,0 +1,12 @@
+ .cpu cortex-m0
+ .fpu softvfp
+ .syntax unified
+ .thumb
+ .section .bootreturn,"ax"
+
+ .align 2
+ .thumb_func
+ .global __boot_return
+__boot_return:
+ b _crt0_entry
+
diff --git a/keyboards/gmmk/tkl/config.h b/keyboards/gmmk/tkl/config.h
new file mode 100644
index 000000000..64ef5a0cc
--- /dev/null
+++ b/keyboards/gmmk/tkl/config.h
@@ -0,0 +1,75 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x652F
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Glorious
+#define PRODUCT GMMK TKL
+#define DESCRIPTION "Mechanical Keyboard"
+
+/* key matrix size */
+#define MATRIX_ROWS 7
+#define MATRIX_COLS 13
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6 }
+#define MATRIX_COL_PINS { C1, C2, A0, A1, A2, A3, A6, A7, A8, A9, A10, A11, A12}
+#define UNUSED_PINS
+
+#ifdef ENCODER_ENABLE
+#define ENCODERS_PAD_A { B4 }
+#define ENCODERS_PAD_B { B5 }
+#define ENCODER_RESOLUTIONS { 2 }
+#endif
+
+#define DIODE_DIRECTION ROW2COL
+
+/*
+ * Feature
+ */
+#define USB_POLLING_INTERVAL_MS 1 /* 1000 Hz */
+#define FORCE_NKRO /* default NRKO enabled */
+#define DEBOUNCE 1 /* Debounce time in ms */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true /* rgb off when power off / suspend */
+// #define VIA_OPENRGB_HYBRID
+// #define USE_FRAMEBUFFER
+// #define KEYMAP_ISO 1
+/* default ripple effect */
+#ifdef RGB_MATRIX_CUSTOM_USER
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_RIPPLE
+#endif
+
+/*
+ * Optimization
+ */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+// #define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
+#define NO_DEBUG 1
+// #define NO_PRINT 1
+#define OPENRGB_DIRECT_MODE_UNBUFFERED /* use unbuffered direct mode in OpenRGB protocol */
+
+#include "config_led.h"
+
+// #define DEBUG_GMMK \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/config_led.c b/keyboards/gmmk/tkl/config_led.c
new file mode 100644
index 000000000..2c186b72c
--- /dev/null
+++ b/keyboards/gmmk/tkl/config_led.c
@@ -0,0 +1,41 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "config_led.h"
+#include "rgb_matrix.h"
+
+#define ND NO_LED
+
+led_config_t g_led_config = {
+{
+/*0*/ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, // esc
+/*1*/ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28}, // ~
+/*2*/ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}, // tab
+/*3*/ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 46}, // caps
+/*4*/ { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 62}, // shift ... ent
+/*5*/ { 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 75, 86, 29}, // ctrl
+/*6*/ { ND, ND, 87, 13, 14, 15, ND, 30, 31, 32, 47, 48, 49},
+
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {139, 29}, {157, 29}, {167, 29}, {177, 29},
+ {3 , 41}, {20 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {136, 41},
+ {2 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64},
+
+#ifdef KEYMAP_ISO
+ {13, 52}
+#endif
+}, {
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,
+#ifdef KEYMAP_ISO
+ 4
+#endif
+} };
+
+#endif /* RGB_MATRIX_ENABLE */
diff --git a/keyboards/gmmk/tkl/config_led.h b/keyboards/gmmk/tkl/config_led.h
new file mode 100644
index 000000000..1f082977a
--- /dev/null
+++ b/keyboards/gmmk/tkl/config_led.h
@@ -0,0 +1,43 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS 7
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+
+#define LED_MATRIX_ROW_PINS MATRIX_ROW_PINS
+#define LED_MATRIX_COLS 13
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifndef VIA_ENABLE
+#ifdef QMK_KEYMAP_H
+ #include QMK_KEYMAP_H
+#endif
+#endif
+
+#ifdef KEYMAP_ISO
+ #define DRIVER_LED_TOTAL 88
+#else
+ #define DRIVER_LED_TOTAL 87
+#endif
+
+/* indicator pins */
+#define LED_PIN_ON_STATE 0
+#define LED_NUM_LOCK_PIN C6
+#define LED_CAPS_LOCK_PIN C7
+#define LED_SCROLL_LOCK_PIN C8
diff --git a/keyboards/gmmk/tkl/default.h b/keyboards/gmmk/tkl/default.h
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/gmmk/tkl/default.h
diff --git a/keyboards/gmmk/tkl/gmmk.c b/keyboards/gmmk/tkl/gmmk.c
new file mode 100644
index 000000000..8df4d1f48
--- /dev/null
+++ b/keyboards/gmmk/tkl/gmmk.c
@@ -0,0 +1,88 @@
+#include "quantum.h"
+#include "rgb_matrix.h"
+
+/*
+ * turn off rgb when power off / suspend
+ */
+void suspend_power_down_kb(void) {
+ rgb_matrix_set_suspend_state(true);
+ suspend_power_down_user();
+}
+
+void housekeeping_task_kb(void) { rgb_matrix_set_suspend_state(false); }
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ wait_ms(5);
+ } else {
+ tap_code(KC_VOLD);
+ wait_ms(5);
+ }
+ }
+ return true;
+}
+
+bool encoder_update_kb(uint8_t index, bool clockwise) { return encoder_update_user(index, clockwise); }
+#endif
+
+#ifdef RAW_CONSOLE
+extern void raw_hid_send(uint8_t *data, uint8_t length);
+
+int8_t sendchar(uint8_t c) {
+ raw_hid_send(&c, 1);
+
+ return 1;
+}
+#endif
+
+/*
+ * must override sleep functions without idle thread
+ */
+#if CH_CFG_NO_IDLE_THREAD == TRUE
+
+# define CYCLES_PER_LOOP 9
+# define LOOP_TIMES (48000000 / (CH_CFG_ST_FREQUENCY) / (CYCLES_PER_LOOP))
+
+void chThdSleep(sysinterval_t time) {
+ uint32_t loops = time * LOOP_TIMES;
+
+ for (uint32_t i = 0; i < loops; i++) __NOP();
+}
+
+/* suspend thread used in usb_main.c */
+msg_t chThdSuspendTimeoutS(thread_reference_t *trp, sysinterval_t timeout) {
+ osalSysUnlock();
+ wait_ms(1);
+ //while (usbGetTransmitStatusI(&USBD1, KEYBOARD_IN_EPNUM));
+#ifdef SHARED_EP_ENABLE
+ //while (usbGetTransmitStatusI(&USBD1, SHARED_IN_EPNUM));
+#endif
+ osalSysLock();
+
+ return MSG_OK;
+}
+
+#endif /* CH_CFG_NO_IDLE_THREAD */
+
+int rand(void) {
+ static uint32_t seed = 134775813U;
+ seed = seed * 1664525U + 1013904223U;
+ return seed;
+}
+
+#ifdef GMMK_DEBUG
+void rgbprint(int v, uint8_t r, uint8_t g, uint8_t b) {
+ int32_t kc = 26;
+
+ if (v != 0) kc = 17 + v;
+
+ rgb_matrix_set_color(kc, r, g, b);
+}
+#endif
+
+#ifdef VIA_OPENRGB_HYBRID
+uint8_t is_orgb_mode = 1;
+#endif \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/info.json b/keyboards/gmmk/tkl/info.json
new file mode 100644
index 000000000..de9471084
--- /dev/null
+++ b/keyboards/gmmk/tkl/info.json
@@ -0,0 +1 @@
+{"version":1,"keyboard":{"keys":[{"id":0,"legend":"Esc","state":{"x":0,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":0,"keycodes":[{"id":"KC_ESC","fields":[]},{"id":"RESET","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"F1","state":{"x":2,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":1,"keycodes":[{"id":"KC_F1","fields":[]},{"id":"KC_MYCM","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":2,"legend":"F2","state":{"x":3,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":2,"keycodes":[{"id":"KC_F2","fields":[]},{"id":"KC_WSCH","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":3,"legend":"F3","state":{"x":4,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":3,"keycodes":[{"id":"KC_F3","fields":[]},{"id":"KC_CALC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":4,"legend":"F4","state":{"x":5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":4,"keycodes":[{"id":"KC_F4","fields":[]},{"id":"KC_MSEL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":5,"legend":"F5","state":{"x":6.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":5,"keycodes":[{"id":"KC_F5","fields":[]},{"id":"KC_MPRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":6,"legend":"F6","state":{"x":7.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":6,"keycodes":[{"id":"KC_F6","fields":[]},{"id":"KC_MNXT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":7,"legend":"F7","state":{"x":8.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":7,"keycodes":[{"id":"KC_F7","fields":[]},{"id":"KC_MPLY","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":8,"legend":"F8","state":{"x":9.5,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":8,"keycodes":[{"id":"KC_F8","fields":[]},{"id":"KC_MSTP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":9,"legend":"F9","state":{"x":11,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":9,"keycodes":[{"id":"KC_F9","fields":[]},{"id":"KC_MUTE","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":10,"legend":"F10","state":{"x":12,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":10,"keycodes":[{"id":"KC_F10","fields":[]},{"id":"KC_VOLD","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":11,"legend":"F11","state":{"x":13,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":11,"keycodes":[{"id":"KC_F11","fields":[]},{"id":"KC_VOLU","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":12,"legend":"F12","state":{"x":14,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":12,"keycodes":[{"id":"KC_F12","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":13,"legend":"PrtSc","state":{"x":15.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":3,"keycodes":[{"id":"KC_PSCR","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":14,"legend":"Scroll Lock","state":{"x":16.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":4,"keycodes":[{"id":"KC_SLCK","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":15,"legend":"Pause\nBreak","state":{"x":17.25,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":5,"keycodes":[{"id":"KC_PAUS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":16,"legend":"~\n`","state":{"x":0,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":0,"keycodes":[{"id":"KC_GRV","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":17,"legend":"!\n1","state":{"x":1,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":1,"keycodes":[{"id":"KC_1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":18,"legend":"@\n2","state":{"x":2,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":2,"keycodes":[{"id":"KC_2","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":19,"legend":"#\n3","state":{"x":3,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":3,"keycodes":[{"id":"KC_3","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":20,"legend":"$\n4","state":{"x":4,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":4,"keycodes":[{"id":"KC_4","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":21,"legend":"%\n5","state":{"x":5,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":5,"keycodes":[{"id":"KC_5","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":22,"legend":"^\n6","state":{"x":6,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":6,"keycodes":[{"id":"KC_6","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":23,"legend":"&\n7","state":{"x":7,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":7,"keycodes":[{"id":"KC_7","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":24,"legend":"*\n8","state":{"x":8,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":8,"keycodes":[{"id":"KC_8","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":25,"legend":"(\n9","state":{"x":9,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":9,"keycodes":[{"id":"KC_9","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":26,"legend":")\n0","state":{"x":10,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":10,"keycodes":[{"id":"KC_0","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":27,"legend":"_\n-","state":{"x":11,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":11,"keycodes":[{"id":"KC_MINS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":28,"legend":"+\n=","state":{"x":12,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":1,"col":12,"keycodes":[{"id":"KC_EQL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":29,"legend":"Backspace","state":{"x":13,"y":1.5,"r":0,"rx":0,"ry":0,"w":2,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":12,"keycodes":[{"id":"KC_BSPC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":30,"legend":"Insert","state":{"x":15.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":7,"keycodes":[{"id":"KC_INS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":31,"legend":"Home","state":{"x":16.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":8,"keycodes":[{"id":"KC_HOME","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":32,"legend":"PgUp","state":{"x":17.25,"y":1.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":9,"keycodes":[{"id":"KC_PGUP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":33,"legend":"Tab","state":{"x":0,"y":2.5,"r":0,"rx":0,"ry":0,"w":1.5,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":0,"keycodes":[{"id":"KC_TAB","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":34,"legend":"Q","state":{"x":1.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":1,"keycodes":[{"id":"KC_Q","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":35,"legend":"W","state":{"x":2.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":2,"keycodes":[{"id":"KC_W","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":36,"legend":"E","state":{"x":3.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":3,"keycodes":[{"id":"KC_E","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":37,"legend":"R","state":{"x":4.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":4,"keycodes":[{"id":"KC_R","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":38,"legend":"T","state":{"x":5.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":5,"keycodes":[{"id":"KC_T","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":39,"legend":"Y","state":{"x":6.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":6,"keycodes":[{"id":"KC_Y","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":40,"legend":"U","state":{"x":7.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":7,"keycodes":[{"id":"KC_U","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":41,"legend":"I","state":{"x":8.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":8,"keycodes":[{"id":"KC_I","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":42,"legend":"O","state":{"x":9.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":9,"keycodes":[{"id":"KC_O","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":43,"legend":"P","state":{"x":10.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":10,"keycodes":[{"id":"KC_P","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":44,"legend":"{\n[","state":{"x":11.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":11,"keycodes":[{"id":"KC_LBRC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":45,"legend":"}\n]","state":{"x":12.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":2,"col":12,"keycodes":[{"id":"KC_RBRC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":46,"legend":"|\n\\","state":{"x":13.5,"y":2.5,"r":0,"rx":0,"ry":0,"w":1.5,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":12,"keycodes":[{"id":"KC_BSLS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":47,"legend":"Delete","state":{"x":15.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":10,"keycodes":[{"id":"KC_DEL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":48,"legend":"End","state":{"x":16.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":11,"keycodes":[{"id":"KC_END","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":49,"legend":"PgDn","state":{"x":17.25,"y":2.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":6,"col":12,"keycodes":[{"id":"KC_PGDN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":50,"legend":"Caps Lock","state":{"x":0,"y":3.5,"r":0,"rx":0,"ry":0,"w":1.75,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":0,"keycodes":[{"id":"KC_CAPS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":51,"legend":"A","state":{"x":1.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":1,"keycodes":[{"id":"KC_A","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":52,"legend":"S","state":{"x":2.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":2,"keycodes":[{"id":"KC_S","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":53,"legend":"D","state":{"x":3.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":3,"keycodes":[{"id":"KC_D","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":54,"legend":"F","state":{"x":4.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":4,"keycodes":[{"id":"KC_F","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":55,"legend":"G","state":{"x":5.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":5,"keycodes":[{"id":"KC_G","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":56,"legend":"H","state":{"x":6.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":6,"keycodes":[{"id":"KC_H","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":57,"legend":"J","state":{"x":7.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":7,"keycodes":[{"id":"KC_J","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":58,"legend":"K","state":{"x":8.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":8,"keycodes":[{"id":"KC_K","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":59,"legend":"L","state":{"x":9.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":9,"keycodes":[{"id":"KC_L","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":60,"legend":":\n;","state":{"x":10.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":10,"keycodes":[{"id":"KC_SCLN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":61,"legend":"\"\n'","state":{"x":11.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":3,"col":11,"keycodes":[{"id":"KC_QUOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":62,"legend":"Enter","state":{"x":12.75,"y":3.5,"r":0,"rx":0,"ry":0,"w":2.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":12,"keycodes":[{"id":"KC_ENT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":63,"legend":"Shift","state":{"x":0,"y":4.5,"r":0,"rx":0,"ry":0,"w":2.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":0,"keycodes":[{"id":"KC_LSFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":64,"legend":"Z","state":{"x":2.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":1,"keycodes":[{"id":"KC_Z","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":65,"legend":"X","state":{"x":3.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":2,"keycodes":[{"id":"KC_X","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":66,"legend":"C","state":{"x":4.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":3,"keycodes":[{"id":"KC_C","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":67,"legend":"V","state":{"x":5.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":4,"keycodes":[{"id":"KC_V","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":68,"legend":"B","state":{"x":6.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":5,"keycodes":[{"id":"KC_B","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":69,"legend":"N","state":{"x":7.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":6,"keycodes":[{"id":"KC_N","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":70,"legend":"M","state":{"x":8.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":7,"keycodes":[{"id":"KC_M","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":71,"legend":"<\n,","state":{"x":9.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":8,"keycodes":[{"id":"KC_COMM","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":72,"legend":">\n.","state":{"x":10.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":9,"keycodes":[{"id":"KC_DOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":73,"legend":"?\n/","state":{"x":11.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":10,"keycodes":[{"id":"KC_SLSH","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":74,"legend":"Shift","state":{"x":12.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":2.75,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":4,"col":11,"keycodes":[{"id":"KC_LSFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":75,"legend":"↑","state":{"x":16.25,"y":4.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":10,"keycodes":[{"id":"KC_UP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":76,"legend":"Ctrl","state":{"x":0,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":0,"keycodes":[{"id":"KC_LCTL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":77,"legend":"Win","state":{"x":1.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":1,"keycodes":[{"id":"KC_LGUI","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":78,"legend":"Alt","state":{"x":2.5,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":5,"col":2,"keycodes":[{"id":"KC_LALT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":79,"legend":"","state":{"x":3.75,"y":5.5,"r":0,"rx":0,"ry":0,"w":6.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":7},"row":5,"col":3,"keycodes":[{"id":"KC_SPC","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":80,"legend":"Alt","state":{"x":10,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":4,"keycodes":[{"id":"KC_RALT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":81,"legend":"Win","state":{"x":11.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":5,"keycodes":[{"id":"MO()","fields":[1]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":82,"legend":"Menu","state":{"x":12.5,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":6,"keycodes":[{"id":"KC_APP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":83,"legend":"Ctrl","state":{"x":13.75,"y":5.5,"r":0,"rx":0,"ry":0,"w":1.25,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":7,"keycodes":[{"id":"KC_RCTL","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":84,"legend":"←","state":{"x":15.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":8,"keycodes":[{"id":"KC_LEFT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":85,"legend":"↓","state":{"x":16.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":9,"keycodes":[{"id":"KC_DOWN","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":86,"legend":"→","state":{"x":17.25,"y":5.5,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"a":4},"row":5,"col":11,"keycodes":[{"id":"KC_RGHT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]}],"controller":2,"bounds":{"min":{"x":0,"y":0},"max":{"x":18.25,"y":6.5}},"rows":7,"cols":13,"pins":{"row":["D0","D1","D2","D3","D4","D5","D6"],"col":["C1","C2","A0","A1","A2","A3","A6","A7","C3","C4","C5","C7","C0"],"num":null,"caps":null,"scroll":null,"compose":null,"kana":null,"led":null,"rgb":null},"macros":{},"quantum":"void matrix_init_user(void) {\n}\n\nvoid matrix_scan_user(void) {\n}\n\nbool process_record_user(uint16_t keycode, keyrecord_t *record) {\n\treturn true;\n}","settings":{"diodeDirection":1,"name":"","bootloaderSize":2,"rgbNum":0,"backlightLevels":3}}} \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/iso.h b/keyboards/gmmk/tkl/iso.h
new file mode 100644
index 000000000..687cb2e73
--- /dev/null
+++ b/keyboards/gmmk/tkl/iso.h
@@ -0,0 +1 @@
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/keymaps/default/keymap.c b/keyboards/gmmk/tkl/keymaps/default/keymap.c
new file mode 100644
index 000000000..e73db2f8a
--- /dev/null
+++ b/keyboards/gmmk/tkl/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* The GMMK uses a 7x16 matrix. Some keys are not wired in the matrix at their physical location */
+
+ [_BL] = KEYMAP( 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_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS,
+ 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_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC,
+ KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN),
+
+ [_FN] = KEYMAP( RESET, KC_MYCM, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, 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, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_VAD, RGB_VAI, RGB_HUI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_MOD, RGB_RMOD),
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/keymaps/iso/keymap.c b/keyboards/gmmk/tkl/keymaps/iso/keymap.c
new file mode 100644
index 000000000..add6cc443
--- /dev/null
+++ b/keyboards/gmmk/tkl/keymaps/iso/keymap.c
@@ -0,0 +1,36 @@
+#include QMK_KEYBOARD_H
+
+#define _BL 0
+#define _FN 1
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* The GMMK uses a 7x16 matrix. Some keys are not wired in the matrix at their physical location */
+
+ [_BL] = KEYMAP( 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_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS,
+ 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_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC,
+ KC_NUBS, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN),
+
+ [_FN] = KEYMAP( RESET, KC_MYCM, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, 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, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_VAD, RGB_VAI, RGB_HUI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_MOD, RGB_RMOD),
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/keymaps/via/keymap.c b/keyboards/gmmk/tkl/keymaps/via/keymap.c
new file mode 100644
index 000000000..f2eb105fb
--- /dev/null
+++ b/keyboards/gmmk/tkl/keymaps/via/keymap.c
@@ -0,0 +1,72 @@
+#include QMK_KEYBOARD_H
+#include "rgb_matrix.h"
+
+#ifdef DEBUG_GMMK
+#include "printf.h"
+#endif
+
+#define _BL 0
+#define _FN 1
+#define _L2 2
+#define _L3 3
+
+#define SWITCH_MODE 0x1688
+#define GUI_LOCK 0x1689
+
+#ifdef VIA_OPENRGB_HYBRID
+extern uint8_t is_orgb_mode;
+#endif
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BL] = KEYMAP( 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_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS,
+ 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_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC,
+ KC_NUBS, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_HOME, KC_PGUP, KC_DEL, KC_END, KC_PGDN),
+
+ [_FN] = KEYMAP( RESET, KC_MYCM, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, LCTL(LSFT(KC_ESC)),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, SWITCH_MODE,KC_TRNS, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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,
+ KC_TRNS, GUI_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_VAD, RGB_VAI, RGB_HUI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_MOD, RGB_RMOD),
+ [_L2] = {[0 ... MATRIX_ROWS - 1] = {[0 ... MATRIX_COLS - 1] = KC_TRNS}},
+ [_L3] = {[0 ... MATRIX_ROWS - 1] = {[0 ... MATRIX_COLS - 1] = KC_TRNS}}
+};
+
+void matrix_init_user(void)
+{
+}
+
+void matrix_scan_user(void)
+{
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record)
+{
+ switch (keycode) {
+ case SWITCH_MODE:
+ #ifdef VIA_OPENRGB_HYBRID
+ if (record->event.pressed) {
+ is_orgb_mode = !is_orgb_mode;
+ }
+ #endif
+ return false;
+
+ case GUI_LOCK:
+ /* win lock */
+ if (record->event.pressed) {
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.no_gui = !keymap_config.no_gui;
+ eeconfig_update_keymap(keymap_config.raw);
+ clear_keyboard();
+ }
+
+ return false;
+ }
+
+ return true;
+}
diff --git a/keyboards/gmmk/tkl/keymaps/via/rgb_matrix_user.inc b/keyboards/gmmk/tkl/keymaps/via/rgb_matrix_user.inc
new file mode 100644
index 000000000..c6ffd7313
--- /dev/null
+++ b/keyboards/gmmk/tkl/keymaps/via/rgb_matrix_user.inc
@@ -0,0 +1 @@
+#include "ripple.h" \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/keymaps/via/ripple.h b/keyboards/gmmk/tkl/keymaps/via/ripple.h
new file mode 100644
index 000000000..9c543df03
--- /dev/null
+++ b/keyboards/gmmk/tkl/keymaps/via/ripple.h
@@ -0,0 +1,124 @@
+#ifndef DISABLE_RGB_MATRIX_RIPPLE
+# define RGB_MATRIX_RIPPLE
+RGB_MATRIX_EFFECT(RIPPLE)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+# define RIPPLE_MAX_NUM 3
+# define RIPPLE_SPEED_MAX 5
+# define RIPPLE_X_MAX 224
+# define RIPPLE_Y_MAX 64
+# define RIPPLE_R_MAX 232
+# define RIPPLE_MIN_HSV_V 10
+# define RIPPLE_SPEED 16
+# define RIPPLE_DELAY 100
+
+# define ABS(x) ((x) > 0 ? (x) : -(x))
+# define RAND(x) ((uint32_t)rand() % (uint32_t)(x))
+
+typedef struct {
+ uint8_t cx, cy;
+ uint8_t delay;
+ uint8_t speed;
+ uint16_t r;
+ uint16_t thick;
+ HSV hsv;
+} ripple_t;
+
+static ripple_t ripples[RIPPLE_MAX_NUM];
+
+static bool is_on_ripple(int32_t x, int32_t y, int32_t cx, int32_t cy, int32_t r, int32_t thick) {
+ int32_t dx, dy, r2, s;
+
+ dx = x - cx;
+ dy = y - cy;
+ r >>= 1;
+ r2 = r * r;
+ s = dx * dx + dy * dy - r2;
+ s = ABS(s);
+
+ if (s <= thick)
+ return true;
+ else
+ return false;
+}
+
+static void init_ripple(ripple_t *rp) {
+ rp->cx = RAND(RIPPLE_X_MAX);
+ rp->cy = RAND(RIPPLE_Y_MAX);
+ rp->r = RAND(10) + 2;
+ rp->delay = RAND(scale8(RIPPLE_DELAY, rgb_matrix_config.speed) + 1) + 40;
+ rp->speed = RAND(scale8(RIPPLE_SPEED, rgb_matrix_config.speed) + 1) + 2;
+ rp->hsv.h = RAND(255);
+ rp->hsv.s = 150 + RAND(100);
+ rp->hsv.v = rgb_matrix_config.hsv.v;
+ rp->thick = RAND(1500) + 700;
+}
+
+bool RIPPLE(effect_params_t *params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ if (params->init) {
+ for (int32_t i = 0; i < RIPPLE_MAX_NUM; i++) {
+ ripple_t *rp = ripples + i;
+ init_ripple(rp);
+ }
+ }
+
+ if (led_min == 0) {
+ for (int32_t j = 0; j < RIPPLE_MAX_NUM; j++) {
+ ripple_t *rp = ripples + j;
+
+ if (rp->delay)
+ rp->delay--;
+ else {
+ int32_t r = rp->r / 2;
+
+ if (r > RIPPLE_R_MAX) {
+ init_ripple(rp);
+ } else {
+ rp->r += rp->speed;
+
+ // degrade V with radius
+ int32_t new_v = (int32_t)rp->hsv.v - (int32_t)(rp->speed / 2);
+
+ if (new_v < RIPPLE_MIN_HSV_V)
+ rp->hsv.v = RIPPLE_MIN_HSV_V;
+ else
+ rp->hsv.v = (uint32_t)new_v;
+ }
+ }
+ }
+ }
+
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+
+ bool is_rendered = false;
+ uint32_t r = 0, g = 0, b = 0;
+
+ for (int32_t j = 0; j < RIPPLE_MAX_NUM; j++) {
+ ripple_t *rp = ripples + j;
+ bool is_ripple = (rp->delay == 0) && is_on_ripple(g_led_config.point[i].x, g_led_config.point[i].y, rp->cx, rp->cy, rp->r, rp->thick);
+ if (is_ripple) {
+ RGB rgb = rgb_matrix_hsv_to_rgb(rp->hsv);
+ r += rgb.r;
+ g += rgb.g;
+ b += rgb.b;
+ is_rendered = true;
+ }
+ }
+
+ if (is_rendered) {
+ if (r > 255) r = 255;
+ if (g > 255) g = 255;
+ if (b > 255) b = 255;
+ rgb_matrix_set_color(i, r, g, b);
+ } else
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BREATHING
diff --git a/keyboards/gmmk/tkl/keymaps/via/rules.mk b/keyboards/gmmk/tkl/keymaps/via/rules.mk
new file mode 100644
index 000000000..730559684
--- /dev/null
+++ b/keyboards/gmmk/tkl/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+RGB_MATRIX_CUSTOM_USER = yes
diff --git a/keyboards/gmmk/tkl/led_matrix.c b/keyboards/gmmk/tkl/led_matrix.c
new file mode 100644
index 000000000..f4dec5361
--- /dev/null
+++ b/keyboards/gmmk/tkl/led_matrix.c
@@ -0,0 +1,36 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+extern void _set_color(int index, uint8_t r, uint8_t g, uint8_t b);
+
+extern void process_backlight(uint8_t devid, volatile LED_TYPE* states);
+
+static void flush(void)
+{
+ process_backlight(0, NULL);
+}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ if (index >= 0 && index < DRIVER_LED_TOTAL)
+ {
+ _set_color(index, r, g, b);
+ }
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+void init(void) {
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
diff --git a/keyboards/gmmk/tkl/readme.md b/keyboards/gmmk/tkl/readme.md
new file mode 100644
index 000000000..7f43c0b88
--- /dev/null
+++ b/keyboards/gmmk/tkl/readme.md
@@ -0,0 +1,28 @@
+# GMMK TKL Mechanical Keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap: (87 keys)
+ make gmmk/tkl:default
+ make gmmk/tkl/rev2:default
+ make gmmk/tkl/rev3:default
+
+ to build ISO keymap: (88 keys)
+ make gmmk/tkl:iso
+ make gmmk/tkl/rev2:iso
+ make gmmk/tkl/rev3:iso
+
+ to build VIA:
+ make gmmk/tkl/rev2:via
+ make gmmk/tkl/rev3:via
+
+ For VIA + OpenRGB,
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/tkl/rev2/backlight.c b/keyboards/gmmk/tkl/rev2/backlight.c
new file mode 100644
index 000000000..e47a6cf4f
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev2/backlight.c
@@ -0,0 +1,448 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <SN32F260.h>
+#include "ch.h"
+#include "hal.h"
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+#define I2C_SCL A4
+#define I2C_SDA A5
+#define I2C_SDB B0
+
+#define I2C_SCL_IN readPin(I2C_SCL)
+#define I2C_SDA_IN readPin(I2C_SDA)
+
+#define I2C_SCL_HI do { setPinOutput(I2C_SCL); writePinHigh(I2C_SCL); } while (0)
+#define I2C_SCL_LO do { setPinOutput(I2C_SCL); writePinLow(I2C_SCL); } while (0)
+#define I2C_SCL_HIZ do { setPinInputHigh(I2C_SCL); } while (0)
+
+#define I2C_SDA_HI do { setPinOutput(I2C_SDA); writePinHigh(I2C_SDA); } while (0)
+#define I2C_SDA_LO do { setPinOutput(I2C_SDA); writePinLow(I2C_SDA); } while (0)
+#define I2C_SDA_HIZ do { setPinInputHigh(I2C_SDA); } while (0)
+
+/*
+ * according to the spec, high SCL peroid 0.7us, low SCL peroid 1.3us
+ *
+ * i2c_delay 1 loop about 7 cycles. Under 48MHz, the actual delay is around 0.9us and 1.5us respectively.
+ */
+#define I2C_DELAY i2c_delay(2)
+
+#ifdef USE_FRAMEBUFFER
+static RGB g_fb[DRIVER_LED_TOTAL];
+#else
+static uint8_t sel_frame[2] = {0xFF, 0xFF};
+static uint8_t sel_frame_idx = 0;
+#endif
+
+extern uint8_t is_orgb_mode;
+
+static __inline void i2c_delay(uint32_t loop)
+{
+ // #pragma GCC unroll 0
+ for (int32_t i = 0; i < loop; i++)
+ __NOP();
+ // SN_WDT->FEED = 0x5AFA55AA;
+}
+
+void i2c_init(void)
+{
+ // drive strength all gpio A 20ma
+ SN_GPIO0->MODE |= 0xFFFF0000;
+
+ I2C_SCL_HI;
+ I2C_SDA_HIZ;
+
+ setPinOutput(I2C_SDB);
+ writePinHigh(I2C_SDB);
+ i2c_delay(100);
+}
+
+// #pragma GCC push_options
+// #pragma GCC optimize ("-O2")
+
+static void i2c_process_bit(uint8_t *i2c_tx_byte)
+{
+ if (*i2c_tx_byte & 0x80)
+ {
+ I2C_SDA_HI;
+ }
+ else
+ {
+ I2C_SDA_LO;
+ }
+
+ *i2c_tx_byte = *i2c_tx_byte << 1;
+
+ I2C_SCL_HI;
+ I2C_DELAY;
+ I2C_SCL_LO;
+ I2C_DELAY;
+}
+
+static uint8_t i2c_writeb(uint8_t b)
+{
+ uint8_t fail = 0;
+
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+ i2c_process_bit(&b);
+
+/*
+ if (!is_ack)
+ return 0;
+*/
+ /* ack bit */
+ setPinInput(I2C_SDA);
+
+ I2C_SCL_HI;
+ I2C_DELAY;
+
+ fail = I2C_SDA_IN;
+
+ I2C_SCL_LO;
+ I2C_DELAY;
+
+ return fail;
+}
+
+static void i2c_start_phase(void)
+{
+ /* START */
+ I2C_SDA_LO;
+ I2C_DELAY;
+ I2C_SCL_LO;
+ I2C_DELAY;
+}
+
+static void i2c_stop_phase(void)
+{
+ I2C_SDA_LO;
+ I2C_DELAY;
+
+ /* STOP */
+ I2C_SCL_HI;
+ I2C_DELAY;
+ I2C_SDA_HIZ;
+
+ I2C_DELAY;
+ I2C_DELAY;
+}
+
+// #pragma GCC pop_options
+
+static uint8_t i2c_transaction(uint8_t i2c_addr_rw, uint8_t* i2c_data_ptr, uint8_t i2c_byte_ct)
+{
+ i2c_start_phase();
+
+ i2c_writeb(i2c_addr_rw);
+
+ for (uint8_t i = 0; i < i2c_byte_ct; i++)
+ i2c_writeb(i2c_data_ptr[i]);
+
+ i2c_stop_phase();
+
+ return 0;
+}
+
+static uint8_t i2c_write_buf(uint8_t devid, uint8_t* data, uint8_t len)
+{
+ int32_t tries = 1;
+
+ while ((tries-- > 0) && i2c_transaction(devid, data, len));
+
+ return 0;
+}
+
+static void i2c_write_reg(uint8_t devid, uint8_t reg, uint8_t data)
+{
+ uint8_t i2c_data[2];
+
+ i2c_data[0] = reg;
+ i2c_data[1] = data;
+
+ i2c_write_buf(devid, i2c_data, 2);
+}
+
+static void reset_rgb(int devid)
+{
+ i2c_write_reg(devid, 0xFD, 0x0B);
+
+ i2c_write_reg(devid, 0x0A, 0x00);
+ i2c_write_reg(devid, 0x00, 0x00);
+ i2c_write_reg(devid, 0x01, 0x10);
+ i2c_write_reg(devid, 0x05, 0x00);
+ i2c_write_reg(devid, 0x06, 0x00);
+ i2c_write_reg(devid, 0x08, 0x00);
+ i2c_write_reg(devid, 0x09, 0x00);
+ i2c_write_reg(devid, 0x0B, 0x00);
+ i2c_write_reg(devid, 0x0D, 0x0F);
+ i2c_write_reg(devid, 0x0E, 0x01);
+ i2c_write_reg(devid, 0x14, 68);
+ i2c_write_reg(devid, 0x15, 128);
+ i2c_write_reg(devid, 0x0F, 153);
+
+ i2c_write_reg(devid, 0xFD, 0);
+ for (int32_t i = 0; i < 0x10; i++)
+ i2c_write_reg(devid, i, 0xFF);
+ /* skip blink control 0x10~0x1F as reset 0 */
+ for (int32_t i = 0x20; i < 0xA0; i++)
+ i2c_write_reg(devid, i, 0);
+
+ i2c_write_reg(devid, 0xFD, 1);
+ for (int32_t i = 0; i < 0x10; i++)
+ i2c_write_reg(devid, i, 0xFF);
+ /* skip blink control 0x10~0x1F as reset 0 */
+ for (int32_t i = 0x20; i < 0xA0; i++)
+ i2c_write_reg(devid, i, 0);
+
+ i2c_write_reg(devid, 0xFD, 0xB);
+ i2c_write_reg(devid, 0x0A, 1);
+}
+
+#ifdef USE_FRAMEBUFFER
+// EE chip
+static const uint8_t led_ee_map[80] = {
+ 255, 255, 255, 63, 87, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74,
+ 50, 51, 52, 255, 255, 255, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62,
+ 33, 34, 35, 36, 37, 38, 255, 255,
+ 255, 39, 40, 41, 42, 43, 44, 45,
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 255, 255, 255, 25, 26, 27, 28,
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 255, 255, 255, 255, 255,
+};
+
+// E8 chip
+static const uint8_t led_e8_map[80] = {
+ 255, 255, 255, 76, 77, 78, 255, 79,
+ 255, 80, 81, 82, 255, 83, 84, 85,
+ 255, 255, 255, 255, 255, 255, 75, 255,
+ 255, 255, 255, 86, 255, 255, 255, 255,
+ 48, 49, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 30, 31, 32, 255, 255, 255, 255, 46,
+ 47, 255, 255, 255, 255, 255, 255, 255,
+ 11, 12, 13, 14, 15, 255, 255, 255,
+ 255, 255, 29, 255, 255, 255, 255, 255
+};
+
+static void flush_led_fb(uint8_t devid, const uint8_t *map)
+{
+ int32_t led_idx = 0, i, j;
+ uint8_t block[48];
+
+ // page 1
+ i2c_write_reg(devid, 0xFD, 0);
+
+ i2c_start_phase();
+ i2c_writeb(devid);
+ i2c_writeb(0x20);
+
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ uint8_t r, g, b;
+ int32_t mi = map[led_idx++];
+
+ if (mi >= DRIVER_LED_TOTAL)
+ r = g = b = 0;
+ else {
+ r = g_fb[mi].r;
+ g = g_fb[mi].g;
+ b = g_fb[mi].b;
+ }
+
+ block[j] = r;
+ block[j + 16] = g;
+ block[j + 32] = b;
+ }
+
+ int32_t block_size;
+
+ if (i <= 1)
+ block_size = 48;
+ else
+ block_size = 32;
+
+ for (j = 0; j < block_size; j++)
+ i2c_writeb(block[j]);
+ }
+
+ i2c_stop_phase();
+
+ // page 2
+ i2c_write_reg(devid, 0xFD, 1);
+
+ // write the blue channel of last row in page 1
+ i2c_start_phase();
+ i2c_writeb(devid);
+ i2c_writeb(0x20);
+ for (i = 0; i < 16; i++)
+ i2c_writeb(block[32 + i]);
+
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ uint8_t r, g, b;
+ int32_t mi = map[led_idx++];
+
+ if (mi >= DRIVER_LED_TOTAL)
+ r = g = b = 0;
+ else {
+ r = g_fb[mi].r;
+ g = g_fb[mi].g;
+ b = g_fb[mi].b;
+ }
+
+ block[j] = r;
+ block[j + 16] = g;
+ block[j + 32] = b;
+ }
+
+ for (j = 0; j < 48; j++)
+ i2c_writeb(block[j]);
+ }
+
+ i2c_stop_phase();
+}
+
+#else
+
+/*
+ * led index to RGB address
+ */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/* 0*/ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xC0,0xC1,0xC2,0xC3,0xC4,
+/*16*/ 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x9C,0x9D,0x9E,0x9F,0xCA,0x90,0x91,0x92,
+/*37*/ 0x60,0x61,0x62,0x63,0x64,0x65,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,0x97,0x98,0x60,0x61,
+/*58*/ 0x30,0x31,0x32,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+/*74*/ 0x03,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x36,
+/*91*/ 0x03,0x04,0x05,0x07,0x09,0x0A,0x0B,0x0D,0x0E,0x0F,0x3B
+#ifdef KEYMAP_ISO
+ ,0x04 /* KC_NUBS */
+#endif
+};
+
+/*
+ * led index to chip selection table (0: E8, 1: EE)
+ */
+static const uint8_t g_led_chip[DRIVER_LED_TOTAL] = {
+/* 0*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+/*16*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
+/*37*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
+/*58*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+/*74*/ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+/*91*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+#ifdef KEYMAP_ISO
+ ,1 /* KC_NUBS */
+#endif
+};
+
+static void set_pwm(uint8_t dev, uint8_t addr, uint8_t value)
+{
+ /* >=0x80 for frame 2 otherwise frame 1 */
+ if (addr >= 0x80) {
+ if (sel_frame[sel_frame_idx] != 1) {
+ i2c_write_reg(dev, 0xFD, 1);
+ sel_frame[sel_frame_idx] = 1;
+ }
+ addr -= 0x80;
+ }
+ else if (sel_frame[sel_frame_idx] != 0) {
+ i2c_write_reg(dev, 0xFD, 0);
+ sel_frame[sel_frame_idx] = 0;
+ }
+
+ i2c_write_reg(dev, addr + 0x20, value);
+}
+
+static void _set_color_direct(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+ uint8_t dev;
+ int l = g_led_pos[index];
+
+ if (g_led_chip[index]) {
+ dev = 0xEE;
+ sel_frame_idx = 1;
+ }
+ else {
+ dev = 0xE8;
+ sel_frame_idx = 0;
+ }
+
+ set_pwm(dev, l, r);
+ set_pwm(dev, l + 0x10, g);
+ set_pwm(dev, l + 0x20, b);
+}
+#endif
+
+void _set_color(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+#ifdef USE_FRAMEBUFFER
+ g_fb[index].r = r;
+ g_fb[index].g = g;
+ g_fb[index].b = b;
+#else
+
+#ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode && (index == 67 || index == 41 || index == 51))
+ r = g = b = 255;
+#endif
+
+ _set_color_direct(index, r, g, b);
+#endif
+}
+
+void _read_color(int index, uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ *r = 0;
+ *g = 0;
+ *b = 0;
+}
+
+void process_backlight(uint8_t devid, volatile LED_TYPE *states)
+{
+ static unsigned char state = 0;
+
+ switch (state)
+ {
+ case 0: /* init RGB chips */
+ i2c_init();
+ reset_rgb(0xE8);
+ reset_rgb(0xEE);
+
+ state = 1;
+ break;
+
+ case 1:
+ #ifdef USE_FRAMEBUFFER
+
+ #ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode) {
+ rgb_matrix_set_color(67, 255, 255, 255);
+ rgb_matrix_set_color(41, 255, 255, 255);
+ rgb_matrix_set_color(51, 255, 255, 255);
+ }
+ #endif
+
+ flush_led_fb(0xEE, led_ee_map);
+ flush_led_fb(0xE8, led_e8_map);
+ #endif
+ break;
+ }
+} \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/rev2/readme.md b/keyboards/gmmk/tkl/rev2/readme.md
new file mode 100644
index 000000000..7f43c0b88
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev2/readme.md
@@ -0,0 +1,28 @@
+# GMMK TKL Mechanical Keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap: (87 keys)
+ make gmmk/tkl:default
+ make gmmk/tkl/rev2:default
+ make gmmk/tkl/rev3:default
+
+ to build ISO keymap: (88 keys)
+ make gmmk/tkl:iso
+ make gmmk/tkl/rev2:iso
+ make gmmk/tkl/rev3:iso
+
+ to build VIA:
+ make gmmk/tkl/rev2:via
+ make gmmk/tkl/rev3:via
+
+ For VIA + OpenRGB,
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/tkl/rev2/rules.mk b/keyboards/gmmk/tkl/rev2/rules.mk
new file mode 100644
index 000000000..e15d0adf5
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev2/rules.mk
@@ -0,0 +1,3 @@
+SRC += ../config_led.c
+SRC += ../led_matrix.c
+SRC += backlight.c \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/rev3/SPI.h b/keyboards/gmmk/tkl/rev3/SPI.h
new file mode 100644
index 000000000..825805453
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev3/SPI.h
@@ -0,0 +1,186 @@
+#ifndef __SN32F240_SSP_H
+#define __SN32F240_SSP_H
+
+
+/*_____ I N C L U D E S ____________________________________________________*/
+
+/*_____ D E F I N I T I O N S ______________________________________________*/
+/*
+Base Address: 0x4001 C000 (SSP0)
+ 0x4005 8000 (SSP1)
+*/
+
+/* SSP n Control register 0 <SSPn_CTRL0> (0x00) */
+#define SSP_SSPEN_DIS 0 //[0:0] SSP enable bit
+#define SSP_SSPEN_EN 1
+#define mskSSP_SSPEN_DIS (SSP_SSPEN_DIS<<0)
+#define mskSSP_SSPEN_EN (SSP_SSPEN_EN<<0)
+
+ //[1:1] Loop back mode disable
+#define SSP_LOOPBACK_DIS 0 //Disable
+#define SSP_LOOPBACK_EN 1 //Data input from data output
+#define mskSSP_LOOPBACK_DIS (SSP_LOOPBACK_DIS<<1)
+#define mskSSP_LOOPBACK_EN (SSP_LOOPBACK_EN<<1)
+
+ //[2:2] Slave data output disable bit (ONLY used in slave mode)
+#define SSP_SDODIS_EN 0 //Enable slave data output
+#define SSP_SDODIS_DIS 1 //Disable slave data output. (MISO=0)
+#define mskSSP_SDODIS_EN (SSP_SDODIS_EN<<2)
+#define mskSSP_SDODIS_DIS (SSP_SDODIS_DIS<<2)
+
+#define SSP_MS_MASTER_MODE 0 //[3:3] Master/Slave selection bit
+#define SSP_MS_SLAVE_MODE 1
+#define mskSSP_MS_MASTER_MODE (SSP_MS_MASTER_MODE<<3)
+#define mskSSP_MS_SLAVE_MODE (SSP_MS_SLAVE_MODE<<3)
+
+#define SSP_FORMAT_SPI_MODE 0 //[4:4] Interface format
+#define SSP_FORMAT_SSP_MODE 1
+#define mskSSP_FORMAT_SPI_MODE (SSP_FORMAT_SPI_MODE<<4)
+#define mskSSP_FORMAT_SSP_MODE (SSP_FORMAT_SSP_MODE<<4)
+
+ //[7:6] SSP FSM and FIFO Reset bit
+#define SSP_FRESET_DO_NOTHING 0 //Do nothing
+#define SSP_FRESET_RESET_FIFO 3 //Reset finite state machine and FIFO
+#define mskSSP_FRESET_DO_NOTHING (SSP_FRESET_DO_NOTHING<<6)
+#define mskSSP_FRESET_RESET_FIFO (SSP_FRESET_RESET_FIFO<<6)
+
+#define SSP_DL_3 2 //[11:8] Data Length = DL[3:0]+1
+#define SSP_DL_4 3
+#define SSP_DL_5 4
+#define SSP_DL_6 5
+#define SSP_DL_7 6
+#define SSP_DL_8 7
+#define SSP_DL_9 8
+#define SSP_DL_10 9
+#define SSP_DL_11 10
+#define SSP_DL_12 11
+#define SSP_DL_13 12
+#define SSP_DL_14 13
+#define SSP_DL_15 14
+#define SSP_DL_16 15
+
+#define SSP_TXFIFOTH_0 0 //[14:12]TX FIFO Threshold level
+#define SSP_TXFIFOTH_1 1
+#define SSP_TXFIFOTH_2 2
+#define SSP_TXFIFOTH_3 3
+#define SSP_TXFIFOTH_4 4
+#define SSP_TXFIFOTH_5 5
+#define SSP_TXFIFOTH_6 6
+#define SSP_TXFIFOTH_7 7
+
+#define SSP_RXFIFOTH_0 0 //[17:15]RX FIFO Threshold level
+#define SSP_RXFIFOTH_1 1
+#define SSP_RXFIFOTH_2 2
+#define SSP_RXFIFOTH_3 3
+#define SSP_RXFIFOTH_4 4
+#define SSP_RXFIFOTH_5 5
+#define SSP_RXFIFOTH_6 6
+#define SSP_RXFIFOTH_7 7
+
+ //[18:18]Auto-SEL disable bit. For SPI mode only.
+#define SSP_SELDIS_EN 0 //Enable Auto-SEL flow control
+#define SSP_SELDIS_DIS 1 //Disable Auto-SEL flow control
+#define mskSSP_SELDIS_EN (SSP_SELDIS_EN<<18)
+#define mskSSP_SELDIS_DIS (SSP_SELDIS_DIS<<18)
+
+
+/* SSP n Control register 1 <SSPn_CTRL1> (0x04) */
+ //[0:0]MSB/LSB selection bit
+#define SSP_MLSB_MSB 0 //MSB transmit first
+#define SSP_MLSB_LSB 1 //LSB transmit first
+#define mskSSP_MLSB_MSB (SSP_MLSB_MSB<<0)
+#define mskSSP_MLSB_LSB (SSP_MLSB_LSB<<0)
+
+ //[1:1]Clock polarity selection bit
+#define SSP_CPOL_SCK_IDLE_LOW 0 //SCK idles at Low level
+#define SSP_CPOL_SCK_IDLE_HIGH 1 //SCK idles at High level
+#define mskSSP_CPOL_SCK_IDLE_LOW (SSP_CPOL_SCK_IDLE_LOW<<1)
+#define mskSSP_CPOL_SCK_IDLE_HIGH (SSP_CPOL_SCK_IDLE_HIGH<<1)
+
+ //[2:2]Clock phase for edge sampling
+#define SSP_CPHA_FALLING_EDGE 0 //Data changes at clock falling edge
+#define SSP_CPHA_RISING_EDGE 1 //Data changes at clock rising edge
+#define mskSSP_CPHA_FALLING_EDGE (SSP_CPHA_FALLING_EDGE<<2)
+#define mskSSP_CPHA_RISING_EDGE (SSP_CPHA_RISING_EDGE<<2)
+
+
+/* SSP n Clock Divider register <SSPn_CLKDIV> (0x08) */
+ //[7:0]SSPn clock divider
+#define SSP_DIV 16 //MCLK/n, n = 2, 4, 6, 8, ...,512
+
+
+/* SSP n Status register <SSPn_STAT> (0x0C) */
+#define mskSSP_TX_EMPTY (0x1<<0) //TX FIFO empty flag
+#define mskSSP_TX_FULL (0x1<<1) //TX FIFO full flag
+#define mskSSP_RX_EMPTY (0x1<<2) //RX FIFO empty flag
+#define mskSSP_RX_FULL (0x1<<3) //RX FIFO full flag
+#define mskSSP_BUSY (0x1<<4) //Busy flag
+#define mskSSP_TXFIFOTHF (0x1<<5) //TX FIFO threshold flag
+#define mskSSP_RXFIFOTHF (0x1<<6) //RX FIFO threshold flag
+
+
+/* SSP n Interrupt Enable register <SSPn_IE> (0x10) */
+#define SSP_RXOVFIE_DIS 0 //[0:0]RX Overflow interrupt enable
+#define SSP_RXOVFIE_EN 1
+#define mskSSP_RXOVFIE_DIS (SSP_RXOVFIE_DIS<<0)
+#define mskSSP_RXOVFIE_EN (SSP_RXOVFIE_EN<<0)
+
+#define SSP_RXTOIE_DIS 0 //[1:1]RX time-out interrupt enable
+#define SSP_RXTOIE_EN 1
+#define mskSSP_RXTOIE_DIS (SSP_RXTOIE_DIS<<1)
+#define mskSSP_RXTOIE_EN (SSP_RXTOIE_EN<<1)
+
+#define SSP_RXFIFOTHIE_DIS 0 //[2:2]RX FIFO threshold interrupt enable
+#define SSP_RXFIFOTHIE_EN 1
+#define mskSSP_RXFIFOTHIE_DIS (SSP_RXFIFOTHIE_DIS<<2)
+#define mskSSP_RXFIFOTHIE_EN (SSP_RXFIFOTHIE_EN <<2)
+
+#define SSP_TXFIFOTHIE_DIS 0 //[3:3]TX FIFO threshold interrupt enable
+#define SSP_TXFIFOTHIE_EN 1
+#define mskSSP_TXFIFOTHIE_DIS (SSP_TXFIFOTHIE_DIS<<3)
+#define mskSSP_TXFIFOTHIE_EN (SSP_TXFIFOTHIE_EN<<3)
+
+
+/* SSP n Raw Interrupt Status register <SSPn_RIS> (0x14) */
+/* SSP n Interrupt Clear register <SSPn_IC> (0x18) */
+#define mskSSP_RXOVFIF (0x1<<0) //[0:0]RX overflow interrupt flag
+#define mskSSP_RXOVFIC mskSSP_RXOVFIF
+
+#define mskSSP_RXTOIF (0x1<<1) //[1:1]RX time-out interrupt flag
+#define mskSSP_RXTOIC mskSSP_RXTOIF
+
+#define mskSSP_RXFIFOTHIF (0x1<<2) //[2:2]RX FIFO threshold interrupt flag
+#define mskSSP_RXFIFOTHIC mskSSP_RXFIFOTHIF
+
+#define mskSSP_TXFIFOTHIF (0x1<<3) //[3:3]TX FIFO threshold interrupt flag
+#define mskSSP_TXFIFOTHIC mskSSP_TXFIFOTHIF
+
+
+/* SSP n Data Fetch register <SSPn_DF> (0x20) */
+ //[0:0]SSP data fetch control bit
+#define SSP_DF_DIS 0 //Disable
+#define SSP_DF_EN 1 //Enable when SCKn frequency > 6MHz
+#define mskSSP_DF_DIS (SSP_DF_DIS<<0)
+#define mskSSP_SSP_DF_EN (SSP_DF_EN<<0)
+
+
+/*_____ M A C R O S ________________________________________________________*/
+#define __SPI0_FIFO_RESET (SN_SSP0->CTRL0_b.FRESET = SSP_FRESET_RESET_FIFO)
+#define __SPI1_FIFO_RESET (SN_SSP1->CTRL0_b.FRESET = SSP_FRESET_RESET_FIFO)
+#define __SPI0_CLR_SEL0 (SN_GPIO1->DATA_b.DATA2=0)
+#define __SPI0_SET_SEL0 (SN_GPIO1->DATA_b.DATA2=1)
+#define __SPI1_CLR_SEL1 (SN_GPIO3->DATA_b.DATA6=0)
+#define __SPI1_SET_SEL1 (SN_GPIO3->DATA_b.DATA6=1)
+//SSP Data Fetch speed (High: SCK>6MHz)
+#define __SSP0_DATA_FETCH_HIGH_SPEED (SN_SSP0->DF = SSP_DF_EN) //*(volatile unsigned long *)(0x4001C020) = 1
+#define __SSP1_DATA_FETCH_HIGH_SPEED (SN_SSP1->DF = SSP_DF_EN) //*(volatile unsigned long *)(0x40058020) = 1
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+extern void SPI0_Init(void);
+extern void SPI0_Enable(void);
+extern void SPI0_Disable(void);
+
+extern void SPI0_Write(unsigned char *p, int len);
+#endif /*__SN32F760_SSP_H*/
+
diff --git a/keyboards/gmmk/tkl/rev3/SPI0.c b/keyboards/gmmk/tkl/rev3/SPI0.c
new file mode 100644
index 000000000..0a29fa044
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev3/SPI0.c
@@ -0,0 +1,138 @@
+/******************** (C) COPYRIGHT 2014 SONiX *******************************
+* COMPANY: SONiX
+* DATE: 2014/05
+* AUTHOR: SA1
+* IC: SN32F240/230/220
+* DESCRIPTION: SPI0 related functions.
+*____________________________________________________________________________
+* REVISION Date User Description
+* 1.0 2013/12/17 SA1 1. First release
+* 1.1 2014/05/23 SA1 1. Add __SSP0_DATA_FETCH_HIGH_SPEED macro
+*
+*____________________________________________________________________________
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS TIME TO MARKET.
+* SONiX SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL
+* DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH SOFTWARE
+* AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN
+* IN CONNECTION WITH THEIR PRODUCTS.
+*****************************************************************************/
+
+/*_____ I N C L U D E S ____________________________________________________*/
+#include <SN32F260.h>
+#include "SPI.h"
+
+#define SN_SSP0 SN_SPI0
+#define SSP0_IRQn SPI0_IRQn
+
+
+/*_____ D E C L A R A T I O N S ____________________________________________*/
+
+
+/*_____ D E F I N I T I O N S ______________________________________________*/
+
+
+/*_____ M A C R O S ________________________________________________________*/
+
+
+/*_____ F U N C T I O N S __________________________________________________*/
+
+/*****************************************************************************
+* Function : SPI0_Init
+* Description : Initialization of SPI0 init
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Init(void)
+{
+ SN_SYS1->AHBCLKEN |= (0x1 << 12);
+
+ SN_SSP0->CTRL0_b.DL = SSP_DL_8;
+ SN_SSP0->CTRL0_b.FORMAT = SSP_FORMAT_SPI_MODE;
+ SN_SSP0->CTRL0_b.MS = SSP_MS_MASTER_MODE;
+ SN_SSP0->CTRL0_b.LOOPBACK = SSP_LOOPBACK_DIS;
+ SN_SSP0->CTRL0_b.SDODIS = SSP_SDODIS_EN;
+
+ // SN_SSP0->CLKDIV_b.DIV = 5; // 48/12 = 4MHz
+ SN_SSP0->CLKDIV_b.DIV = 4; // 48/10 = 4.8 MHz
+
+ SN_SSP0->CTRL1 = SSP_CPHA_FALLING_EDGE | SSP_CPOL_SCK_IDLE_LOW | SSP_MLSB_MSB;
+
+ SN_SSP0->CTRL0_b.SELDIS = SSP_SELDIS_DIS;
+
+ __SPI0_FIFO_RESET;
+
+ NVIC_DisableIRQ(SSP0_IRQn);
+
+ // __SSP0_DATA_FETCH_HIGH_SPEED; //Enable if Freq. of SCK > 6MHz
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_EN;
+}
+
+/*****************************************************************************
+* Function : SPI0_Enable
+* Description : SPI0 enable setting
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Enable(void)
+{
+ //Enable HCLK for SSP0
+ SN_SYS1->AHBCLKEN |= (0x1 << 12);
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_EN;
+ __SPI0_FIFO_RESET;
+}
+
+/*****************************************************************************
+* Function : SPI0_Disable
+* Description : SPI0 disable setting
+* Input : None
+* Output : None
+* Return : None
+* Note : None
+*****************************************************************************/
+void SPI0_Disable(void)
+{
+ SN_SSP0->CTRL0_b.SSPEN = SSP_SSPEN_DIS;
+ SN_SYS1->AHBCLKEN &=~ (0x1 << 12);
+}
+
+void SPI0_Write(unsigned char *p, int len)
+{
+ for (int i = 0; i < len; i++)
+ {
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = *p++;
+ }
+
+ while (SN_SSP0->STAT_b.BUSY);
+}
+
+void SPI0_Write1(uint8_t data)
+{
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = data;
+}
+
+void SPI0_Flush(void)
+{
+ while (SN_SSP0->STAT_b.BUSY);
+}
+
+void SPI0_Read3(unsigned char b1, unsigned char b2, unsigned char *b3)
+{
+ /* write first 2 bytes: header and address */
+ while (!SN_SSP0->STAT_b.TX_EMPTY);
+ SN_SSP0->DATA_b.Data = b1;
+ SN_SSP0->DATA_b.Data = b2;
+
+ /* read 1 byte data */
+ while (SN_SSP0->STAT_b.BUSY);
+ while (SN_SSP0->STAT_b.RX_EMPTY);
+ *b3 = SN_SSP0->DATA_b.Data;
+
+ while (SN_SSP0->STAT_b.BUSY);
+}
diff --git a/keyboards/gmmk/tkl/rev3/backlight.c b/keyboards/gmmk/tkl/rev3/backlight.c
new file mode 100644
index 000000000..9914cbfee
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev3/backlight.c
@@ -0,0 +1,297 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <SN32F260.h>
+#include "ch.h"
+#include "hal.h"
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+#include "SPI.h"
+
+extern void SPI0_Write1(uint8_t data);
+extern void SPI0_Read3(unsigned char b1, unsigned char b2, unsigned char *b3);
+
+#ifdef USE_FRAMEBUFFER
+static RGB g_fb[DRIVER_LED_TOTAL];
+#endif
+
+#define SDB B0
+#define SPI_DELAY() for (int32_t _del = 0; _del < 10; _del++) __NOP();
+
+static int g_cs_pin = 0;
+
+void spi_init(void)
+{
+ SPI0_Init();
+ SPI0_Enable();
+}
+
+void spi_set_cspin(int pin)
+{
+ if (g_cs_pin == pin)
+ return;
+
+ writePinHigh(B2);
+ setPinOutput(B2);
+ writePinHigh(B1);
+ setPinOutput(B1);
+
+ g_cs_pin = pin;
+}
+
+void spi_read3(unsigned char b1, unsigned char b2, unsigned char *b3)
+{
+ writePinLow(g_cs_pin);
+ SPI0_Read3(b1, b2, b3);
+ writePinHigh(g_cs_pin);
+}
+
+void spi_write(uint8_t *data_p, int len)
+{
+ writePinLow(g_cs_pin);
+ SPI0_Write(data_p, len);
+ writePinHigh(g_cs_pin);
+}
+
+void spi_w2(uint8_t page, uint8_t addr)
+{
+ uint8_t c[2];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ spi_write(c, 2);
+}
+
+void spi_w3(uint8_t page, uint8_t addr, uint8_t data)
+{
+ uint8_t c[4];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ c[2] = data;
+ spi_write(c, 3);
+}
+
+void spi_r3(uint8_t page, uint8_t addr, uint8_t *data)
+{
+ uint8_t c[4];
+ c[0] = page | 0x20;
+ c[1] = addr;
+ spi_read3(c[0], c[1], data);
+}
+
+/*
+ * LED index to RGB address
+ * >100 means it belongs to pin B1 chipselected SN2735 chip, the real addr is minus by 100
+ */
+static const uint8_t g_led_pos[DRIVER_LED_TOTAL] = {
+/* 0*/ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+/*16*/ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 21, 22, 23,
+/*37*/ 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 32, 33, 34,
+/*58*/ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 145,
+/*74*/ 148, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 49,
+/*91*/ 114, 115, 130, 131, 146, 147, 162, 163, 55, 56, 57,
+#ifdef KEYMAP_ISO
+149 /* KC_NUBS */
+#endif
+};
+
+#ifdef USE_FRAMEBUFFER
+// B1
+static const uint8_t led_b1_map[64] = {
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 76, 77,
+ 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 78, 79,
+ 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 255, 62, 80, 81,
+ 63, 87, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 255, 74, 82, 83
+};
+
+// B2
+static const uint8_t led_b2_map[64] = {
+ 0, 255, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 255, 255, 255, 255, 30, 31, 32,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 47, 48, 49, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 75, 255, 255, 255, 255, 255, 84,
+ 85, 86, 255, 255, 255, 255, 255, 255
+};
+
+// #pragma GCC push_options
+// #pragma GCC optimize ("-O2")
+
+static void flush_led_fb(int32_t pin, const uint8_t *map)
+{
+ uint8_t block[48];
+
+ spi_set_cspin(pin);
+
+ writePinHigh(pin);
+ SPI_DELAY();
+ writePinLow(pin);
+ SPI0_Write1(0x21);
+ SPI0_Write1(0);
+
+ int32_t led_idx = 0, i, j;
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 16; j++)
+ {
+ uint8_t r, g, b;
+ uint8_t mi = map[led_idx++];
+
+ if (mi >= DRIVER_LED_TOTAL)
+ r = g = b = 0;
+ else {
+ RGB *v = &g_fb[mi];
+ r = v->r;
+ g = v->g;
+ b = v->b;
+ }
+
+ block[j] = r;
+ block[j + 16] = b;
+ block[j + 32] = g;
+ }
+
+ SPI0_Write(block, 48);
+ }
+
+ writePinHigh(pin);
+}
+
+// #pragma GCC pop_options
+
+#else
+
+static void _set_color_direct(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+ int l = g_led_pos[index];
+
+ if (l >= 100)
+ {
+ l -= 100;
+ spi_set_cspin(B1);
+ }
+ else
+ spi_set_cspin(B2);
+
+ int y = l / 16;
+ int a = l % 16;
+
+ spi_w3(1, y * 48 + a, r); // r
+ spi_w3(1, y * 48 + a + 2 * 8, b); // b
+ spi_w3(1, y * 48 + a + 4 * 8, g); // g
+}
+
+#endif
+
+void _set_color(int index, uint8_t r, uint8_t g, uint8_t b)
+{
+#ifdef USE_FRAMEBUFFER
+ g_fb[index].r = r;
+ g_fb[index].g = g;
+ g_fb[index].b = b;
+#else
+ _set_color_direct(index, r, g, b);
+#endif
+}
+
+void _read_color(int index, uint8_t *r, uint8_t *g, uint8_t *b)
+{
+ int l = g_led_pos[index];
+
+ if (l >= 100)
+ {
+ l -= 100;
+ spi_set_cspin(B1);
+ }
+ else
+ spi_set_cspin(B2);
+
+ int y = l / 16;
+ int a = l % 16;
+
+ spi_r3(1, y * 48 + a, r); // r
+ spi_r3(1, y * 48 + a + 2 * 8, b); // b
+ spi_r3(1, y * 48 + a + 4 * 8, g); // g
+}
+
+void reset_rgb(int pin)
+{
+ spi_set_cspin(pin);
+
+ spi_w3(3, 0, 0);
+ spi_w3(3, 0x13, 0xAA);
+ spi_w3(3, 0x14, 0);
+ spi_w3(3, 0x15, 4);
+ spi_w3(3, 0x16, 0xC0);
+ spi_w3(3, 0x1A, 0);
+
+ // set curent
+ for (int i = 0; i < 12; i++)
+ {
+ spi_w3(4, i, 0x80);
+ }
+
+ // led all on
+ for (int i = 0; i < 192/8; i++)
+ {
+ spi_w3(0, i, 0xFF);
+ }
+
+ // turn off pwm
+ for (int i = 0; i < 192; i++)
+ {
+ spi_w3(1, i, 0);
+ }
+
+ // normal mode
+ spi_w3(3, 0, 1);
+}
+
+#ifdef VIA_OPENRGB_HYBRID
+extern uint8_t is_orgb_mode;
+#endif
+
+void process_backlight(uint8_t devid, volatile LED_TYPE* states)
+{
+ static unsigned char state = 0;
+
+ switch (state)
+ {
+ case 0: /* init RGB chips */
+ spi_init();
+
+ writePinHigh(SDB);
+ setPinOutput(SDB);
+ reset_rgb(B1);
+ reset_rgb(B2);
+
+ state = 1;
+ break;
+
+ case 1:
+ #ifdef USE_FRAMEBUFFER
+ #ifdef VIA_OPENRGB_HYBRID
+ if (!is_orgb_mode) {
+ rgb_matrix_set_color(67, 255, 255, 255);
+ rgb_matrix_set_color(41, 255, 255, 255);
+ rgb_matrix_set_color(51, 255, 255, 255);
+ }
+ #endif
+
+ flush_led_fb(B1, led_b1_map);
+ flush_led_fb(B2, led_b2_map);
+ #endif
+ break;
+
+ }
+}
diff --git a/keyboards/gmmk/tkl/rev3/readme.md b/keyboards/gmmk/tkl/rev3/readme.md
new file mode 100644
index 000000000..7f43c0b88
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev3/readme.md
@@ -0,0 +1,28 @@
+# GMMK TKL Mechanical Keyboard
+
+Hardware Supported: SN32F268
+Revisions
+rev1: IS31FL3731 , NOT SUPPORTED, red led color only
+rev2: VS12L03A (I2C), SN before SNSS12116xxxxx
+rev3: VS12L17A (SPI), SN equal or after SNSS12116xxxxx
+
+Make example for this keyboard (after setting up your build environment):
+
+ to build ANSI keymap: (87 keys)
+ make gmmk/tkl:default
+ make gmmk/tkl/rev2:default
+ make gmmk/tkl/rev3:default
+
+ to build ISO keymap: (88 keys)
+ make gmmk/tkl:iso
+ make gmmk/tkl/rev2:iso
+ make gmmk/tkl/rev3:iso
+
+ to build VIA:
+ make gmmk/tkl/rev2:via
+ make gmmk/tkl/rev3:via
+
+ For VIA + OpenRGB,
+ https://github.com/gloryhzw/qmk_tool/wiki/VIA-OpenRGB-for-GMMK
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/gmmk/tkl/rev3/rules.mk b/keyboards/gmmk/tkl/rev3/rules.mk
new file mode 100644
index 000000000..b90a0d541
--- /dev/null
+++ b/keyboards/gmmk/tkl/rev3/rules.mk
@@ -0,0 +1,4 @@
+SRC += ../config_led.c
+SRC += ../led_matrix.c
+SRC += backlight.c
+SRC += SPI0.c \ No newline at end of file
diff --git a/keyboards/gmmk/tkl/rules.mk b/keyboards/gmmk/tkl/rules.mk
new file mode 100644
index 000000000..f7be9b438
--- /dev/null
+++ b/keyboards/gmmk/tkl/rules.mk
@@ -0,0 +1,35 @@
+# project specific files
+SRC += gmmk.c
+
+# MCU name
+MCU = SN32F268F
+
+# Build Options
+# comment out to disable the options.
+#
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = no
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes
+KEYBOARD_SHARED_EP = yes
+CONSOLE_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = yes
+CUSTOM_MATRIX = no
+LED_MATRIX_ENABLE = no
+LED_MATRIX_DRIVER = custom
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
+RAW_ENABLE = yes
+
+# ENCODER_ENABLE = yes
+# OPENRGB_ENABLE = yes
+
+
+USE_EXCEPTIONS_STACKSIZE = 0xE0
+USE_PROCESS_STACKSIZE = 0x1E0
+
+DEFAULT_FOLDER = gmmk/full/rev3
diff --git a/keyboards/gmmk/tkl/tkl.h b/keyboards/gmmk/tkl/tkl.h
new file mode 100644
index 000000000..3a49cdd1b
--- /dev/null
+++ b/keyboards/gmmk/tkl/tkl.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+
+
+#define KEYMAP( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, \
+ K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, \
+ K602, K603, K604, K605, K607, K608, K609, K610, K611, K612 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012}, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112}, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212}, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312}, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412}, \
+ { K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512}, \
+ { KC_NO, KC_NO, K602, K603, K604, K605, KC_NO, K607, K608, K609, K610, K611, K612} \
+}
diff --git a/keyboards/keychron/c1/plain/config.h b/keyboards/keychron/c1/plain/config.h
new file mode 100644
index 000000000..b70037a06
--- /dev/null
+++ b/keyboards/keychron/c1/plain/config.h
@@ -0,0 +1,67 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE20
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Keychron
+// \x43\x31 is "C1" in ASCII hex, this is used to prevent macro expansion, because C1 is also a pin macro.
+#define PRODUCT \x43\x31
+#define DESCRIPTION \x43\x31 QMK
+
+#define WAIT_FOR_USB
+#define USB_MAX_POWER_CONSUMPTION 100
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, D0 }
+#define MATRIX_ROW_PINS { C3, C4, C5, C6, C7, C8 }
+
+/* Keep LED Matrix pins so that we can set them low */
+#define LED_MATRIX_ROW_PINS { C0, C1, C2, D4, C9, C10 }
+
+/* Connects each switch in the dip switch to the GPIO pin of the MCU */
+#define DIP_SWITCH_PINS { D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B3
+#define LED_PIN_ON_STATE 1
+
+#define LED_MAC_PIN B4
+#define LED_WIN_PIN B5
+
+/* Enable NKRO by default */
+#define FORCE_NKRO
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1000
+
+/* Polling Rate */
+#define USB_POLLING_INTERVAL_MS 1
diff --git a/keyboards/keychron/c1/plain/info.json b/keyboards/keychron/c1/plain/info.json
new file mode 100644
index 000000000..0a26b78b1
--- /dev/null
+++ b/keyboards/keychron/c1/plain/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Keychron C1",
+ "url": "https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard",
+ "maintainer": "IsaacDynamo",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Mic", "x":16.25, "y":0}, {"label":"Lamp", "x":17.25, "y":0},
+ {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5},
+ {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5},
+ {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5},
+ {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/c1/plain/keymaps/default/keymap.c b/keyboards/keychron/c1/plain/keymaps/default/keymap.c
new file mode 100644
index 000000000..16e60e95f
--- /dev/null
+++ b/keyboards/keychron/c1/plain/keymaps/default/keymap.c
@@ -0,0 +1,102 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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 KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_CORT LGUI(KC_C) // Cortana
+#define KC_LOCK LGUI(KC_L) // Lock
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+#define KC_W_FN MO(WIN_FN) // Windows Fn
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+#define KC_M_FN MO(MAC_FN) // Mac Fn
+#define KD_M_LK LCMD(LCTL(KC_Q)) // Mac Lock
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT|LOCK|
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [WIN_BASE] = 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_CORT, KC_LOCK, \
+ 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_INS, KC_HOME, KC_PGUP, \
+ 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_DEL, KC_END, KC_PGDN, \
+ 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_W_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ [WIN_FN] = LAYOUT( \
+ RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNIP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ /* Mac layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI|LOCK|
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [MAC_BASE] = 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_MSCR, KC_SIRI, KD_M_LK, \
+ 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_INS, KC_HOME, KC_PGUP, \
+ 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_DEL, KC_END, KC_PGDN, \
+ 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_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_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_M_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ [MAC_FN] = LAYOUT( \
+ RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MSNP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ )
+};
diff --git a/keyboards/keychron/c1/plain/keymaps/via/keymap.c b/keyboards/keychron/c1/plain/keymaps/via/keymap.c
new file mode 100644
index 000000000..9b448f5d5
--- /dev/null
+++ b/keyboards/keychron/c1/plain/keymaps/via/keymap.c
@@ -0,0 +1,3 @@
+// Include default keymap
+// This way the VIA keymap is always up to date with the default keymap
+#include "../default/keymap.c" \ No newline at end of file
diff --git a/keyboards/keychron/c1/plain/keymaps/via/rules.mk b/keyboards/keychron/c1/plain/keymaps/via/rules.mk
new file mode 100644
index 000000000..74edb2bf0
--- /dev/null
+++ b/keyboards/keychron/c1/plain/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE=yes
diff --git a/keyboards/keychron/c1/plain/plain.c b/keyboards/keychron/c1/plain/plain.c
new file mode 100644
index 000000000..86fc9856e
--- /dev/null
+++ b/keyboards/keychron/c1/plain/plain.c
@@ -0,0 +1,91 @@
+/* Copyright 2021 IsaacDynamo
+ *
+ * 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 "plain.h"
+
+// Manage Windows and Mac LEDs
+// - Show status of mode switch
+// - Turn LEDs off durring USB suspend
+static bool mode_leds_show = true;
+static bool mode_leds_windows;
+
+static void mode_leds_update(void){
+ writePin(LED_WIN_PIN, mode_leds_show && mode_leds_windows);
+ writePin(LED_MAC_PIN, mode_leds_show && !mode_leds_windows);
+}
+
+void dip_switch_update_kb(uint8_t index, bool active){
+ if(index == 0) {
+ if(active) { // Mac mode
+ layer_move(MAC_BASE);
+ } else { // Windows mode
+ layer_move(WIN_BASE);
+ }
+
+ // Update mode and update leds
+ mode_leds_windows = !active;
+ mode_leds_update();
+ }
+
+ dip_switch_update_user(index, active);
+}
+
+void keyboard_pre_init_kb(void) {
+ // Setup Win & Mac LED Pins as output
+ setPinOutput(LED_WIN_PIN);
+ setPinOutput(LED_MAC_PIN);
+
+ keyboard_pre_init_user();
+}
+
+void suspend_power_down_kb(void) {
+ // Turn leds off
+ mode_leds_show = false;
+ mode_leds_update();
+
+ suspend_power_down_user();
+}
+
+/// TODO: Clean-up workaround
+/// Currently the suspend_wakeup_init_kb() has issues. See https://github.com/SonixQMK/qmk_firmware/issues/80
+/// A workaround is to use housekeeping_task_kb() instead.
+void housekeeping_task_kb(void) {
+ // Turn on
+ mode_leds_show = true;
+ mode_leds_update();
+
+ housekeeping_task_user();
+}
+
+#if CH_CFG_NO_IDLE_THREAD == TRUE
+
+# define CYCLES_PER_LOOP 9
+# define LOOP_TIMES (48000000 / (CH_CFG_ST_FREQUENCY) / (CYCLES_PER_LOOP))
+
+void chThdSleep(sysinterval_t time) {
+ uint32_t loops = time * LOOP_TIMES;
+
+ for (uint32_t i = 0; i < loops; i++) __NOP();
+}
+
+/* suspend thread used in usb_main.c */
+msg_t chThdSuspendTimeoutS(thread_reference_t* trp, sysinterval_t timeout) {
+ osalSysUnlock();
+ osalSysLock();
+
+ return MSG_OK;
+}
+
+#endif /* CH_CFG_NO_IDLE_THREAD */
diff --git a/keyboards/keychron/c1/plain/plain.h b/keyboards/keychron/c1/plain/plain.h
new file mode 100644
index 000000000..d996ca48d
--- /dev/null
+++ b/keyboards/keychron/c1/plain/plain.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "quantum.h"
+
+// Each layer gets a name for readability
+enum layer_names {
+ WIN_BASE = 0,
+ WIN_FN = 1,
+ MAC_BASE = 2,
+ MAC_FN = 3,
+};
+
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4f, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ {k00, XXX, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, XXX, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, XXX, k4f, XXX}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g} \
+}
diff --git a/keyboards/keychron/c1/plain/plain.json b/keyboards/keychron/c1/plain/plain.json
new file mode 100644
index 000000000..dd407c47f
--- /dev/null
+++ b/keyboards/keychron/c1/plain/plain.json
@@ -0,0 +1,188 @@
+{
+ "name": "Keychron C1",
+ "lighting": "none",
+ "vendorId": "0x3434",
+ "productId": "0xfe20",
+ "matrix": {
+ "rows": 6,
+ "cols": 17
+ },
+ "layouts": {
+ "keymap": [
+ [
+ "0,1",
+ {
+ "x": 1
+ },
+ "0,2",
+ "0,3",
+ "0,4",
+ "0,5",
+ {
+ "x": 0.5
+ },
+ "0,6",
+ "0,7",
+ "0,8",
+ "0,9",
+ {
+ "x": 0.5
+ },
+ "0,10",
+ "0,11",
+ "0,12",
+ "0,13",
+ {
+ "x": 0.25
+ },
+ "0,14",
+ "0,15",
+ "0,16"
+ ],
+ [
+ {
+ "y": 0.5
+ },
+ "1,0",
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ "1,11",
+ "1,12",
+ {
+ "w": 2
+ },
+ "1,13",
+ {
+ "x": 0.25
+ },
+ "1,14",
+ "1,15",
+ "1,16"
+ ],
+ [
+ {
+ "w": 1.5
+ },
+ "2,0",
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ "2,12",
+ {
+ "w": 1.5
+ },
+ "2,13",
+ {
+ "x": 0.25
+ },
+ "2,14",
+ "2,15",
+ "2,16"
+ ],
+ [
+ {
+ "w": 1.75
+ },
+ "3,0",
+ "3,1",
+ "3,2",
+ "3,3",
+ "3,4",
+ "3,5",
+ "3,6",
+ "3,7",
+ "3,8",
+ "3,9",
+ "3,10",
+ "3,11",
+ {
+ "w": 2.25
+ },
+ "3,13"
+ ],
+ [
+ {
+ "w": 2.25
+ },
+ "4,0",
+ "4,2",
+ "4,3",
+ "4,4",
+ "4,5",
+ "4,6",
+ "4,7",
+ "4,8",
+ "4,9",
+ "4,10",
+ "4,11",
+ {
+ "w": 2.75
+ },
+ "4,13",
+ {
+ "x": 1.25
+ },
+ "4,15",
+ {
+ "x": 1.25
+ }
+ ],
+ [
+ {
+ "w": 1.25
+ },
+ "5,0",
+ {
+ "w": 1.25
+ },
+ "5,1",
+ {
+ "w": 1.25
+ },
+ "5,2",
+ {
+ "w": 6.25
+ },
+ "5,6",
+ {
+ "w": 1.25
+ },
+ "5,10",
+ {
+ "w": 1.25
+ },
+ "5,11",
+ {
+ "w": 1.25
+ },
+ "5,12",
+ {
+ "w": 1.25
+ },
+ "5,13",
+ {
+ "x": 0.25
+ },
+ "5,14",
+ "5,15",
+ "5,16"
+ ]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/c1/plain/rand.c b/keyboards/keychron/c1/plain/rand.c
new file mode 100644
index 000000000..a1096bbe2
--- /dev/null
+++ b/keyboards/keychron/c1/plain/rand.c
@@ -0,0 +1,31 @@
+// Small rand() implementation
+//
+// The libc rand implementation takes to much flash space, so an smaller rand() function is used.
+#include "quantum.h"
+
+int rand(void)
+{
+ // static unsigned int z4;
+ unsigned int z1, z2, z3, z4;
+ int r;
+ unsigned int b;
+
+ z1 = timer_read32();
+ z2 = 12345;
+ z3 = 12345;
+ z4 = z1 << 8;
+
+ b = ((z1 << 6) ^ z1) >> 13;
+ z1 = ((z1 & 4294967294U) << 18) ^ b;
+ b = ((z2 << 2) ^ z2) >> 27;
+ z2 = ((z2 & 4294967288U) << 2) ^ b;
+ b = ((z3 << 13) ^ z3) >> 21;
+ z3 = ((z3 & 4294967280U) << 7) ^ b;
+ b = ((z4 << 3) ^ z4) >> 12;
+ z4 = ((z4 & 4294967168U) << 13) ^ b;
+
+ r = z1 ^ z2 ^ z3 ^ z4;
+ // z4 = r;
+
+ return r;
+}
diff --git a/keyboards/keychron/c1/plain/readme.md b/keyboards/keychron/c1/plain/readme.md
new file mode 100644
index 000000000..1d4f27a84
--- /dev/null
+++ b/keyboards/keychron/c1/plain/readme.md
@@ -0,0 +1,74 @@
+# Keychron C1 plain
+
+![Keychron C1](https://i.imgur.com/oB9h56v.png)
+
+A customizable TKL keyboard.
+
+* Keyboard Maintainer(s): [SonixQMK](https://github.com/SonixQMK), [IsaacDynamo](https://github.com/IsaacDynamo), [noldevin](https://github.com/noldevin), [vjdato21](https://github.com/vjdato21)
+* Hardware Supported: Keychron C1 plain (no leds, shares PCB with White Led version)
+* Hardware Availability: [Keychron](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard)
+
+# Install
+1. If your keyboard currently has stock firmware installed, put your keyboard first into bootloader by shorting the boot pins found under the spacebar before plugging in your keyboard to the PC. Otherwise, press `Fn + Esc` to put your keyboard into bootloader.
+1. Download and run [Sonix Flasher](https://github.com/SonixQMK/sonix-flasher/releases/tag/v0.2.1).
+1. In Sonix Flasher, select `SN32F26x` under 'Device'. And select `0x00` as the qmk offset.
+1. Click 'Flash QMK...' and flash jumploader-keychron_c1_white.bin. This can be found in 'Pre-Compiled Jumploaders' build by the latest [Sonix keyboard bootloader action](https://github.com/SonixQMK/sonix-keyboard-bootloader/actions).
+1. In Sonix Flasher, select `SN32F26x` under 'Device'. And select `0x200` as the qmk offset.
+1. Lastly, click 'Flash QMK...' and flash keychron_c1_white_default.bin. This can be found in 'Pre-Compiled Firmware' build by the latest [Sonix QMK firmware action](https://github.com/SonixQMK/qmk_firmware/actions).
+
+# Keymapping
+### Windows Mode
+<details>
+
+Without Fn | With Fn
+---------- | -------
+ESC | Reset keyboard
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | Task View
+F4 | File Explorer
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Print Screen | Snip & Sketch
+Cortana | -
+Lock PC | -
+
+</details>
+
+### Mac Mode
+<details>
+
+Without Fn | With Fn
+---------- | -------
+ESC | Reset keyboard
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | None
+F4 | Finder
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Take a screenshot (whole screen) | Take a screenshot (specific area)
+Siri (hold down) | -
+Lock Mac | -
+
+</details>
+
+# More Info
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/c1/plain
+
+[Video](https://www.youtube.com/watch?v=aUiKHdI5Vk8) explaining installation for a similar keyboard.
+
+For more info and detailed flashing instructions, please visit https://github.com/CanUnesi/QMK-on-K6#readme
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/c1/plain/rules.mk b/keyboards/keychron/c1/plain/rules.mk
new file mode 100644
index 000000000..0e85fc64a
--- /dev/null
+++ b/keyboards/keychron/c1/plain/rules.mk
@@ -0,0 +1,23 @@
+# project specific files
+SRC = rand.c
+
+# MCU name
+MCU = SN32F268F
+
+# Build Options
+# comment out to disable the options.
+#
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+EXTRAKEY_ENABLE = yes # Audio control and System control
+NKRO_ENABLE = yes # USB Nkey Rollover
+DIP_SWITCH_ENABLE = yes
+
+# Custom Key and LED matrix handling
+CUSTOM_MATRIX = no
+RGB_MATRIX_ENABLE = no
+
+# Reduce code size
+USE_PROCESS_STACKSIZE = 0x1E0
+USE_EXCEPTIONS_STACKSIZE = 0xE0 \ No newline at end of file
diff --git a/keyboards/keychron/c1/rgb/config.h b/keyboards/keychron/c1/rgb/config.h
new file mode 100644
index 000000000..49d2929ec
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/config.h
@@ -0,0 +1,62 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE20
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Keychron
+#define PRODUCT Keychron \x43\x31
+#define DESCRIPTION \x43\x31 RGB Hotswap
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7, B8 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D4 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 0
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B10
+#define LED_MAC_PIN B11 //labeled Mac on KB since no Scroll Lock
+#define LED_WIN_PIN B12 //labeled Windows on KB since no Numpad
+#define LED_PIN_ON_STATE 1
+
+/* Enable NKRO by default*/
+#define FORCE_NKRO
+
+/* Polling Rate */
+#define USB_POLLING_INTERVAL_MS 1
+
+/* Disable RGB while USB is sleeping */
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+
+
+#include "config_led.h"
diff --git a/keyboards/keychron/c1/rgb/config_led.c b/keyboards/keychron/c1/rgb/config_led.c
new file mode 100644
index 000000000..47e2bc499
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/config_led.c
@@ -0,0 +1,31 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+#define XX NO_LED
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, XX, 13, 14, 15},
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32},
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49},
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, XX, 62, XX, XX, XX},
+ { 63, XX, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, XX, 74, XX, 75, XX},
+ { 76, 77, 78, XX, XX, XX, 79, XX, XX, XX, 80, 81, 82, 83, 84, 85, 86}
+}, {
+ {0 , 0}, {12 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {174, 0}, {187, 0}, {199, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {174, 13}, {187, 13}, {199, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {168, 26}, {174, 26}, {187, 26}, {199, 26},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {166, 38},
+ {8 , 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {187, 51},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64}, {199, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+} };
+
+#endif
diff --git a/keyboards/keychron/c1/rgb/config_led.h b/keyboards/keychron/c1/rgb/config_led.h
new file mode 100644
index 000000000..bfd3fac78
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/config_led.h
@@ -0,0 +1,32 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (87)
diff --git a/keyboards/keychron/c1/rgb/info.json b/keyboards/keychron/c1/rgb/info.json
new file mode 100644
index 000000000..a5b2eb545
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Keychron C1 RGB",
+ "url": "https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard",
+ "maintainer": "noldevin, vjdato21",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_ansi": {
+ "layout_ansi": [
+ {"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Assistant", "x":16.25, "y":0}, {"label":"RGB", "x":17.25, "y":0},
+ {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5},
+ {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5},
+ {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5},
+ {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Fn", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
+ }
+ }
+}
diff --git a/keyboards/keychron/c1/rgb/keymaps/default/keymap.c b/keyboards/keychron/c1/rgb/keymaps/default/keymap.c
new file mode 100644
index 000000000..67daa090c
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keymaps/default/keymap.c
@@ -0,0 +1,113 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ WIN_BASE = 0,
+ WIN_FN = 1,
+ MAC_BASE = 2,
+ MAC_FN = 3,
+};
+
+#define KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_CRTN LGUI(KC_C) // Cortana | Microsoft Teams
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [WIN_BASE] = { // Windows base layout
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { 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_NO, KC_PSCR, KC_CRTN, RGB_MOD },
+ { 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_INS, KC_HOME, KC_PGUP },
+ { 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_DEL, KC_END, KC_PGDN },
+ { 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_NO, KC_NO, KC_NO },
+ { 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, KC_NO, KC_UP, KC_NO },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+ [WIN_FN] = { // Windows Fn overlay
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_SNIP, _______, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, RGB_HUI, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI }
+ },
+
+ /* Mac layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [MAC_BASE] = { // Mac base layout
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { 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_NO, KC_MSCR, KC_SIRI, RGB_MOD },
+ { 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_INS, KC_HOME, KC_PGUP },
+ { 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_DEL, KC_END, KC_PGDN },
+ { 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_NO, KC_NO, KC_NO },
+ { 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, KC_NO, KC_UP, KC_NO },
+ { KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RGUI, KC_RALT, MO(3), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+ [MAC_FN] = { // Mac Fn overlay
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MSNP, _______, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, RGB_HUI, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI }
+ }
+};
diff --git a/keyboards/keychron/c1/rgb/keymaps/via/keymap.c b/keyboards/keychron/c1/rgb/keymaps/via/keymap.c
new file mode 100644
index 000000000..67daa090c
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keymaps/via/keymap.c
@@ -0,0 +1,113 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ WIN_BASE = 0,
+ WIN_FN = 1,
+ MAC_BASE = 2,
+ MAC_FN = 3,
+};
+
+#define KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_CRTN LGUI(KC_C) // Cortana | Microsoft Teams
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [WIN_BASE] = { // Windows base layout
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { 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_NO, KC_PSCR, KC_CRTN, RGB_MOD },
+ { 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_INS, KC_HOME, KC_PGUP },
+ { 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_DEL, KC_END, KC_PGDN },
+ { 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_NO, KC_NO, KC_NO },
+ { 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, KC_NO, KC_UP, KC_NO },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+ [WIN_FN] = { // Windows Fn overlay
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_SNIP, _______, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, RGB_HUI, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI }
+ },
+
+ /* Mac layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI|RGB |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [MAC_BASE] = { // Mac base layout
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { 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_NO, KC_MSCR, KC_SIRI, RGB_MOD },
+ { 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_INS, KC_HOME, KC_PGUP },
+ { 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_DEL, KC_END, KC_PGDN },
+ { 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_NO, KC_NO, KC_NO },
+ { 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, KC_NO, KC_UP, KC_NO },
+ { KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RGUI, KC_RALT, MO(3), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+ [MAC_FN] = { // Mac Fn overlay
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ { RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MSNP, _______, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, RGB_HUI, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI }
+ }
+};
diff --git a/keyboards/keychron/c1/rgb/keymaps/via/rules.mk b/keyboards/keychron/c1/rgb/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/c1/rgb/readme.md b/keyboards/keychron/c1/rgb/readme.md
new file mode 100644
index 000000000..fe40aad0e
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/readme.md
@@ -0,0 +1,90 @@
+# Keychron C1 RGB
+
+![Keychron C1](https://i.imgur.com/oB9h56v.png)
+
+A customizable TKL keyboard.
+
+* Keyboard Maintainer(s): [SonixQMK](https://github.com/SonixQMK), [IsaacDynamo](https://github.com/IsaacDynamo), [noldevin](https://github.com/noldevin), [vjdato21](https://github.com/vjdato21)
+* Hardware Supported: Keychron C1 RGB
+* Hardware Availability: [Keychron](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/c1/rgb:default | make keychron/c1/rgb:via
+
+## How to Flash
+Flashing example for this keyboard:
+1. If your keyboard currently has stock firmware installed, put your keyboard first into bootloader by shorting the boot pins found under the spacebar before plugging in your keyboard to the PC. Otherwise, press `Fn + Esc` to put your keyboard into bootloader.
+1. Download and run [Sonix Flasher](https://github.com/SonixQMK/sonix-flasher/releases/tag/v0.2.1).
+1. In Sonix Flasher, select `SN32F24X` under 'Device'. And select `0x00` as the qmk offset.
+1. Lastly, click 'Flash QMK...' and locate the compiled firmware.
+
+* * *
+# Keymapping
+### Windows Mode
+<details>
+
+Without Fn | With Fn
+---------- | -------
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | Task View
+F4 | File Explorer
+F5 | Decrease KB Brightness
+F6 | Increase KB Brightness
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Print Screen | Snip & Sketch
+Cortana / Microsoft Teams | None
+Change RGB | Toggle RGB
+Home | Increase RGB Saturation
+End | Decrease RGB Saturation
+Page Up | Increase RGB Hue
+Page Down | Decrease RGB Hue
+↑ | Increase RGB Hue
+← | Decrease RGB Saturation
+↓ | Decrease RGB Hue
+→ | Increase RGB Saturation
+
+</details>
+
+### Mac Mode
+<details>
+
+Without Fn | With Fn
+---------- | -------
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | Mission Control
+F4 | Finder
+F5 | Decrease KB Brightness
+F6 | Increase KB Brightness
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Take a screenshot (whole screen) | Take a screenshot (specific area)
+Siri (hold down) | None
+Change RGB | Toggle RGB
+Home | Increase RGB Saturation
+End | Decrease RGB Saturation
+Page Up | Increase RGB Hue
+Page Down | Decrease RGB Hue
+↑ | Increase RGB Hue
+← | Decrease RGB Saturation
+↓ | Decrease RGB Hue
+→ | Increase RGB Saturation
+
+</details>
+
+* * *
+
+For more information and more detailed flashing instructions, please visit https://github.com/CanUnesi/QMK-on-K6#readme
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/c1/rgb/rgb.c b/keyboards/keychron/c1/rgb/rgb.c
new file mode 100644
index 000000000..e2fb6163d
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/rgb.c
@@ -0,0 +1,69 @@
+/*
+Copyright 2021 Dimitris Mantzouranis
+
+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 "rgb.h"
+
+// Manage Windows and Mac LEDs
+// - Show status of mode switch
+// - Turn LEDs off durring USB suspend
+static bool mode_leds_show = true;
+static bool mode_leds_windows;
+
+static void mode_leds_update(void){
+ writePin(LED_WIN_PIN, mode_leds_show && mode_leds_windows);
+ writePin(LED_MAC_PIN, mode_leds_show && !mode_leds_windows);
+}
+
+void dip_switch_update_user(uint8_t index, bool active){
+ if(index == 0) {
+ if(active) { // Mac mode
+ layer_move(2);
+ } else { // Windows mode
+ layer_move(0);
+ }
+
+ // Update mode and update leds
+ mode_leds_windows = !active;
+ mode_leds_update();
+ }
+}
+
+void keyboard_pre_init_user(void) {
+ // Setup Win & Mac LED Pins as output
+ setPinOutput(LED_WIN_PIN);
+ setPinOutput(LED_MAC_PIN);
+}
+
+void suspend_power_down_user(void) {
+ // Turn leds off
+ mode_leds_show = false;
+ mode_leds_update();
+
+ // Suspend RGB
+ rgb_matrix_set_suspend_state(true);
+}
+
+/// TODO: Clean-up workaround
+/// Currently the suspend_wakeup_init_user() has issues. See https://github.com/SonixQMK/qmk_firmware/issues/80
+/// A workaround is to use housekeeping_task_user() instead.
+void housekeeping_task_user(void) {
+ // Turn on
+ mode_leds_show = true;
+ mode_leds_update();
+
+ // Turn on RGB
+ rgb_matrix_set_suspend_state(false);
+}
diff --git a/keyboards/keychron/c1/rgb/rgb.h b/keyboards/keychron/c1/rgb/rgb.h
new file mode 100644
index 000000000..e996bd32f
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/rgb.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4f, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, XXX}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f, k2g}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, XXX, XXX, XXX, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f, k5g} \
+}
diff --git a/keyboards/keychron/c1/rgb/rgb.json b/keyboards/keychron/c1/rgb/rgb.json
new file mode 100644
index 000000000..25b07456e
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/rgb.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron C1",
+ "vendorId": "0x3434",
+ "productId": "0xFE20",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 17},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x": 1}, "0,1", "0,2", "0,3", "0,4", {"x": 0.5}, "0,5", "0,6", "0,7", "0,8", {"x": 0.5}, "0,9", "0,10", "0,11", "0,12", {"x": 0.25}, "0,14", "0,15", "0,16"],
+ [{"y": 0.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w": 2}, "1,13", {"x": 0.25 }, "1,14", "1,15", "1,16"],
+ [{"w": 1.5 }, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"w": 1.5}, "2,13", { "x": 0.25 }, "2,14", "2,15", "2,16"],
+ [{"w": 1.75 }, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", { "w": 2.25 }, "3,13"],
+ [{"w": 2.25 }, "4,0", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", "4,11", {"w": 2.75 }, "4,13", {"x": 1.25 }, "4,15"],
+ [{"w": 1.25 }, "5,0", {"w": 1.25 }, "5,1", {"w": 1.25 }, "5,2", {"w": 6.25 }, "5,6", {"w": 1.25 }, "5,10", {"w": 1.25 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"]
+ ]
+ }
+}
diff --git a/keyboards/keychron/c1/rgb/rules.mk b/keyboards/keychron/c1/rgb/rules.mk
new file mode 100644
index 000000000..c6eeb3e53
--- /dev/null
+++ b/keyboards/keychron/c1/rgb/rules.mk
@@ -0,0 +1,32 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = yes
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+KEYBOARD_SHARED_EP = no
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/c1/white/config.h b/keyboards/keychron/c1/white/config.h
new file mode 100644
index 000000000..3129cf2de
--- /dev/null
+++ b/keyboards/keychron/c1/white/config.h
@@ -0,0 +1,87 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x05AC
+#define PRODUCT_ID 0x024F
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Keychron
+// \x43\x31 is "C1" in ASCII hex, this is used to prevent macro expansion, because C1 is also a pin macro.
+#define PRODUCT Keychron \x43\x31 White
+
+#define WAIT_FOR_USB
+#define USB_MAX_POWER_CONSUMPTION 100
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, D0 }
+#define MATRIX_ROW_PINS { C3, C4, C5, C6, C7, C8 }
+
+/* LED matrix */
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 1
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C2, D4, C9, C10 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (87)
+
+/* Backlight configuration */
+#define RGB_MATRIX_VAL_STEP 32
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+
+/* Connects each switch in the dip switch to the GPIO pin of the MCU */
+#define DIP_SWITCH_PINS { D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B3
+#define LED_PIN_ON_STATE 1
+
+#define LED_MAC_PIN B4
+#define LED_WIN_PIN B5
+
+/* Enable NKRO by default */
+#define FORCE_NKRO
+
+/* Disable the following animation because they are not interesting in monochrome */
+#define DISABLE_RGB_MATRIX_ALPHAS_MODS
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define DISABLE_RGB_MATRIX_BAND_SAT
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+#define DISABLE_RGB_MATRIX_CYCLE_ALL
+#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define DISABLE_RGB_MATRIX_DUAL_BEACON
+
+/* TODO: Disabled the following animation because they crash the keyboard. Probably due to a too small stack */
+#define DISABLE_RGB_MATRIX_RAINDROPS
+#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
diff --git a/keyboards/keychron/c1/white/info.json b/keyboards/keychron/c1/white/info.json
new file mode 100644
index 000000000..1ccc86137
--- /dev/null
+++ b/keyboards/keychron/c1/white/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Keychron C1 white",
+ "url": "https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard",
+ "maintainer": "IsaacDynamo",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Mic", "x":16.25, "y":0}, {"label":"Lamp", "x":17.25, "y":0},
+ {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5},
+ {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5},
+ {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5},
+ {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/c1/white/keychron_c1_white_via.json b/keyboards/keychron/c1/white/keychron_c1_white_via.json
new file mode 100644
index 000000000..0c34cadaa
--- /dev/null
+++ b/keyboards/keychron/c1/white/keychron_c1_white_via.json
@@ -0,0 +1,185 @@
+{
+ "name": "Keychron C1 White",
+ "vendorId": "0x05ac",
+ "productId": "0x024f",
+ "lighting": "qmk_rgblight",
+ "matrix": {"rows": 6, "cols": 17},
+ "layouts": {
+ "keymap": [
+ [
+ "0,0",
+ {
+ "x": 1
+ },
+ "0,2",
+ "0,3",
+ "0,4",
+ "0,5",
+ {
+ "x": 0.5
+ },
+ "0,6",
+ "0,7",
+ "0,8",
+ "0,9",
+ {
+ "x": 0.5
+ },
+ "0,10",
+ "0,11",
+ "0,12",
+ "0,13",
+ {
+ "x": 0.25
+ },
+ "0,14",
+ "0,15",
+ "0,16"
+ ],
+ [
+ {
+ "y": 0.5
+ },
+ "1,0",
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ "1,11",
+ "1,12",
+ {
+ "w": 2
+ },
+ "1,13",
+ {
+ "x": 0.25
+ },
+ "1,14",
+ "1,15",
+ "1,16"
+ ],
+ [
+ {
+ "w": 1.5
+ },
+ "2,0",
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ "2,12",
+ {
+ "w": 1.5
+ },
+ "2,13",
+ {
+ "x": 0.25
+ },
+ "2,14",
+ "2,15",
+ "2,16"
+ ],
+ [
+ {
+ "w": 1.75
+ },
+ "3,0",
+ "3,1",
+ "3,2",
+ "3,3",
+ "3,4",
+ "3,5",
+ "3,6",
+ "3,7",
+ "3,8",
+ "3,9",
+ "3,10",
+ "3,11",
+ {
+ "w": 2.25
+ },
+ "3,13"
+ ],
+ [
+ {
+ "w": 2.25
+ },
+ "4,0",
+ "4,2",
+ "4,3",
+ "4,4",
+ "4,5",
+ "4,6",
+ "4,7",
+ "4,8",
+ "4,9",
+ "4,10",
+ "4,11",
+ {
+ "w": 2.75
+ },
+ "4,13",
+ {
+ "x": 1.25
+ },
+ "4,15",
+ {
+ "x": 1.25
+ }
+ ],
+ [
+ {
+ "w": 1.25
+ },
+ "5,0",
+ {
+ "w": 1.25
+ },
+ "5,1",
+ {
+ "w": 1.25
+ },
+ "5,2",
+ {
+ "w": 6.25
+ },
+ "5,6",
+ {
+ "w": 1.25
+ },
+ "5,10",
+ {
+ "w": 1.25
+ },
+ "5,11",
+ {
+ "w": 1.25
+ },
+ "5,12",
+ {
+ "w": 1.25
+ },
+ "5,13",
+ {
+ "x": 0.25
+ },
+ "5,14",
+ "5,15",
+ "5,16"
+ ]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/c1/white/keymaps/default/keymap.c b/keyboards/keychron/c1/white/keymaps/default/keymap.c
new file mode 100644
index 000000000..bcfec6d5c
--- /dev/null
+++ b/keyboards/keychron/c1/white/keymaps/default/keymap.c
@@ -0,0 +1,100 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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 KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_CORT LGUI(KC_C) // Cortana
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+#define KC_W_FN MO(WIN_FN) // Windows Fn
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+#define KC_M_FN MO(MAC_FN) // Mac Fn
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT| BL |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [WIN_BASE] = 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_CORT, RGB_TOG, \
+ 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_INS, KC_HOME, KC_PGUP, \
+ 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_DEL, KC_END, KC_PGDN, \
+ 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_W_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ [WIN_FN] = LAYOUT( \
+ RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNIP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, \
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_MOD \
+ ),
+
+ /* Mac layout
+ +-------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI| BL |
+ +--------------------------------------------------------------------------+ +--------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP|
+ +--------------------------------------------------------------------------+ +--------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+ +--------------+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ +----+ |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+ +--------------+
+ |LCTRL| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT |
+ +-------------------------------------------------------------------------------------------+
+ */
+
+ [MAC_BASE] = 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_MSCR, KC_SIRI, RGB_TOG, \
+ 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_INS, KC_HOME, KC_PGUP, \
+ 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_DEL, KC_END, KC_PGDN, \
+ 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_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_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_M_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ [MAC_FN] = LAYOUT( \
+ RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MSNP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, \
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_MOD \
+ )
+};
diff --git a/keyboards/keychron/c1/white/keymaps/via/keymap.c b/keyboards/keychron/c1/white/keymaps/via/keymap.c
new file mode 100644
index 000000000..9b448f5d5
--- /dev/null
+++ b/keyboards/keychron/c1/white/keymaps/via/keymap.c
@@ -0,0 +1,3 @@
+// Include default keymap
+// This way the VIA keymap is always up to date with the default keymap
+#include "../default/keymap.c" \ No newline at end of file
diff --git a/keyboards/keychron/c1/white/keymaps/via/no_idle_thread.c b/keyboards/keychron/c1/white/keymaps/via/no_idle_thread.c
new file mode 100644
index 000000000..d5ab9b8aa
--- /dev/null
+++ b/keyboards/keychron/c1/white/keymaps/via/no_idle_thread.c
@@ -0,0 +1,30 @@
+// Size optimizations to fit VIA support
+//
+// These optimizations are pretty intrusive because they remove the idle thread.
+// Without idle thread some sleep related functions no longer function.
+// These broken functions are overwritten with patched variants.
+//
+// These optimization are copied from:
+// https://github.com/gloryhzw/qmk_firmware/blob/sn32/keyboards/gmmk/full
+//
+// This file adds patch sleep related functions that work without idle threads.
+
+#include "quantum.h"
+
+/*
+ * must override sleep functions without idle thread
+ */
+#define CYCLES_PER_LOOP 9
+#define LOOP_TIMES (48000000 / (CH_CFG_ST_FREQUENCY) / (CYCLES_PER_LOOP))
+
+void chThdSleep(sysinterval_t time) {
+ uint32_t loops = time * LOOP_TIMES;
+ for (uint32_t i = 0; i < loops; i++) __NOP();
+}
+
+/* suspend thread used in usb_main.c */
+msg_t chThdSuspendTimeoutS(thread_reference_t* trp, sysinterval_t timeout) {
+ osalSysUnlock();
+ osalSysLock();
+ return MSG_OK;
+}
diff --git a/keyboards/keychron/c1/white/keymaps/via/rules.mk b/keyboards/keychron/c1/white/keymaps/via/rules.mk
new file mode 100644
index 000000000..086f21f4a
--- /dev/null
+++ b/keyboards/keychron/c1/white/keymaps/via/rules.mk
@@ -0,0 +1,21 @@
+# Experimental VIA support
+VIA_ENABLE=yes
+
+# Size optimizations to fit VIA support
+#
+# These optimizations are pretty intrusive because they remove the idle thread.
+# Without idle thread some sleep related functions no longer function.
+# These broken functions are overwritten with patched variants.
+#
+# These optimization are copied from:
+# https://github.com/gloryhzw/qmk_firmware/blob/sn32/keyboards/gmmk/full
+
+# Reduce RAW endpoints
+OPT_DEFS += -DRAW_IN_CAPACITY=1
+OPT_DEFS += -DRAW_OUT_CAPACITY=1
+
+# Remove idle thread
+OPT_DEFS += -DCH_CFG_NO_IDLE_THREAD=TRUE
+
+# Include the patched functions
+SRC += keymaps/via/no_idle_thread.c
diff --git a/keyboards/keychron/c1/white/rand.c b/keyboards/keychron/c1/white/rand.c
new file mode 100644
index 000000000..a1096bbe2
--- /dev/null
+++ b/keyboards/keychron/c1/white/rand.c
@@ -0,0 +1,31 @@
+// Small rand() implementation
+//
+// The libc rand implementation takes to much flash space, so an smaller rand() function is used.
+#include "quantum.h"
+
+int rand(void)
+{
+ // static unsigned int z4;
+ unsigned int z1, z2, z3, z4;
+ int r;
+ unsigned int b;
+
+ z1 = timer_read32();
+ z2 = 12345;
+ z3 = 12345;
+ z4 = z1 << 8;
+
+ b = ((z1 << 6) ^ z1) >> 13;
+ z1 = ((z1 & 4294967294U) << 18) ^ b;
+ b = ((z2 << 2) ^ z2) >> 27;
+ z2 = ((z2 & 4294967288U) << 2) ^ b;
+ b = ((z3 << 13) ^ z3) >> 21;
+ z3 = ((z3 & 4294967280U) << 7) ^ b;
+ b = ((z4 << 3) ^ z4) >> 12;
+ z4 = ((z4 & 4294967168U) << 13) ^ b;
+
+ r = z1 ^ z2 ^ z3 ^ z4;
+ // z4 = r;
+
+ return r;
+}
diff --git a/keyboards/keychron/c1/white/readme.md b/keyboards/keychron/c1/white/readme.md
new file mode 100644
index 000000000..7b280c99b
--- /dev/null
+++ b/keyboards/keychron/c1/white/readme.md
@@ -0,0 +1,86 @@
+# Keychron C1 white
+
+![Keychron C1](https://i.imgur.com/oB9h56v.png)
+
+A customizable TKL keyboard.
+
+* Keyboard Maintainer(s): [SonixQMK](https://github.com/SonixQMK), [IsaacDynamo](https://github.com/IsaacDynamo), [noldevin](https://github.com/noldevin), [vjdato21](https://github.com/vjdato21)
+* Hardware Supported: Keychron C1 white
+* Hardware Availability: [Keychron](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard)
+
+# Install
+1. If your keyboard currently has stock firmware installed, put your keyboard first into bootloader by shorting the boot pins found under the spacebar before plugging in your keyboard to the PC. Otherwise, press `Fn + Esc` to put your keyboard into bootloader.
+1. Download and run [Sonix Flasher](https://github.com/SonixQMK/sonix-flasher/releases/tag/v0.2.1).
+1. In Sonix Flasher, select `SN32F26x` under 'Device'. And select `0x00` as the qmk offset.
+1. Click 'Flash QMK...' and flash jumploader-keychron_c1_white.bin. This can be found in 'Pre-Compiled Jumploaders' build by the latest [Sonix keyboard bootloader action](https://github.com/SonixQMK/sonix-keyboard-bootloader/actions).
+1. In Sonix Flasher, select `SN32F26x` under 'Device'. And select `0x200` as the qmk offset.
+1. Lastly, click 'Flash QMK...' and flash keychron_c1_white_default.bin. This can be found in 'Pre-Compiled Firmware' build by the latest [Sonix QMK firmware action](https://github.com/SonixQMK/qmk_firmware/actions).
+
+# Keymapping
+### Windows Mode
+<details>
+
+Without Fn | With Fn
+---------- | -------
+ESC | Reset keyboard
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | Task View
+F4 | File Explorer
+F5 | Decrease KB Brightness
+F6 | Increase KB Brightness
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Print Screen | Snip & Sketch
+Cortana | -
+Toggle backlight | -
+↑ | Increase effect speed
+← | Cycle through modes in reverse
+↓ | Decrease effect speed
+→ | Cycle through modes
+
+</details>
+
+### Mac Mode
+<details>
+
+Without Fn | With Fn
+---------- | -------
+ESC | Reset keyboard
+F1 | Decrease PC Brightness
+F2 | Increase PC Brightness
+F3 | None
+F4 | Finder
+F5 | Decrease KB Brightness
+F6 | Increase KB Brightness
+F7 | Previous Track
+F8 | Play/Pause Track
+F9 | Next Track
+F10 | Mute
+F11 | Decrease Volume
+F12 | Increase Volume
+Take a screenshot (whole screen) | Take a screenshot (specific area)
+Siri (hold down) | -
+Toggle backlight | -
+↑ | Increase effect speed
+← | Cycle through modes in reverse
+↓ | Decrease effect speed
+→ | Cycle through modes
+
+</details>
+
+# More Info
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/c1/white
+
+[Video](https://www.youtube.com/watch?v=aUiKHdI5Vk8) explaining installation for a similar keyboard.
+
+For more info and detailed flashing instructions, please visit https://github.com/CanUnesi/QMK-on-K6#readme
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/c1/white/rgb_matrix_kb.inc b/keyboards/keychron/c1/white/rgb_matrix_kb.inc
new file mode 100644
index 000000000..cbeff4e04
--- /dev/null
+++ b/keyboards/keychron/c1/white/rgb_matrix_kb.inc
@@ -0,0 +1,40 @@
+#ifndef DISABLE_RGB_MATRIX_HIGH_CONTRAST
+RGB_MATRIX_EFFECT(HIGH_CONTRAST)
+RGB_MATRIX_EFFECT(HIGH_CONTRAST2)
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// Only light up black keys. These are marked with 128 in g_led_config.
+bool HIGH_CONTRAST(effect_params_t* params) {
+ RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ if (HAS_FLAGS(g_led_config.flags[i], 128)) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ } else {
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+// Only light up black and orange keys. These are marked with 128 and 64 in g_led_config.
+// Use this high contrast mode when you use black keycaps for Esc and lightbulb key and what them to be lit as wel.
+bool HIGH_CONTRAST2(effect_params_t* params) {
+ RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ if (HAS_FLAGS(g_led_config.flags[i], 128) || HAS_FLAGS(g_led_config.flags[i], 64)) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ } else {
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_HIGH_CONTRAST
diff --git a/keyboards/keychron/c1/white/rules.mk b/keyboards/keychron/c1/white/rules.mk
new file mode 100644
index 000000000..8d0e2bf7c
--- /dev/null
+++ b/keyboards/keychron/c1/white/rules.mk
@@ -0,0 +1,25 @@
+# project specific files
+SRC += rand.c
+
+# MCU name
+MCU = SN32F268F
+
+# Build Options
+# comment out to disable the options.
+#
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+EXTRAKEY_ENABLE = yes # Audio control and System control
+NKRO_ENABLE = yes # USB Nkey Rollover
+DIP_SWITCH_ENABLE = yes
+
+# Custom Key and LED matrix handling
+CUSTOM_MATRIX = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F26x
+RGB_MATRIX_CUSTOM_KB = yes
+
+# Reduce code size
+USE_PROCESS_STACKSIZE = 0x1E0
+USE_EXCEPTIONS_STACKSIZE = 0xF0 \ No newline at end of file
diff --git a/keyboards/keychron/c1/white/white.c b/keyboards/keychron/c1/white/white.c
new file mode 100644
index 000000000..870f9245e
--- /dev/null
+++ b/keyboards/keychron/c1/white/white.c
@@ -0,0 +1,127 @@
+/* Copyright 2021 IsaacDynamo
+ *
+ * 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 "white.h"
+
+// Manage Windows and Mac LEDs
+// - Show status of mode switch
+// - Turn LEDs off durring USB suspend
+static bool mode_leds_show = true;
+static bool mode_leds_windows;
+
+static void mode_leds_update(void){
+ writePin(LED_WIN_PIN, mode_leds_show && mode_leds_windows);
+ writePin(LED_MAC_PIN, mode_leds_show && !mode_leds_windows);
+}
+
+void dip_switch_update_kb(uint8_t index, bool active){
+ if(index == 0) {
+ if(active) { // Mac mode
+ layer_move(MAC_BASE);
+ } else { // Windows mode
+ layer_move(WIN_BASE);
+ }
+
+ // Update mode and update leds
+ mode_leds_windows = !active;
+ mode_leds_update();
+ }
+
+ dip_switch_update_user(index, active);
+}
+
+void keyboard_pre_init_kb(void) {
+ // Setup Win & Mac LED Pins as output
+ setPinOutput(LED_WIN_PIN);
+ setPinOutput(LED_MAC_PIN);
+
+ // WORKAROUND: Mac & Windows LED flicker.
+ // Normally the GPIOs in DIP_SWITCH_PINS will be initialized by dip_switch_init().
+ // But during startup of the keyboard the Mac/Windows dip switch seems to jitter, causing the Mac and Windows LEDs to flicker.
+ // Maybe the internal pull-up of this chip is really weak, and needs some time to pullup the input voltage to the high level? Seems unlikely but cannot think of a better explanation.
+ // By doing the configuration of the GPIOs here the pullup is enabled earlier and the flicker is gone.
+ const pin_t dip_switch_pad[] = DIP_SWITCH_PINS;
+ const size_t size = sizeof(dip_switch_pad) / sizeof(dip_switch_pad[0]);
+ for (size_t i=0; i<size; i++) {
+ setPinInputHigh(dip_switch_pad[i]);
+ }
+
+ keyboard_pre_init_user();
+}
+
+void suspend_power_down_kb(void) {
+ // Turn leds off
+ mode_leds_show = false;
+ mode_leds_update();
+
+ // Suspend backlight
+ rgb_matrix_set_suspend_state(true);
+
+ suspend_power_down_user();
+}
+
+/// TODO: Clean-up workaround
+/// Currently the suspend_wakeup_init_kb() has issues. See https://github.com/SonixQMK/qmk_firmware/issues/80
+/// A workaround is to use housekeeping_task_kb() instead.
+void housekeeping_task_kb(void) {
+ // Turn on
+ mode_leds_show = true;
+ mode_leds_update();
+
+ // Restore backlight
+ rgb_matrix_set_suspend_state(false);
+
+ housekeeping_task_user();
+}
+
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+
+#define XX NO_LED
+
+// Mark keys that are black & orange with the default keychron keycaps.
+// This is used by the custom rgb matrix effect to create a high contrast mode that only lights up black keys or black and orange keys. To make them better readable.
+#define B (128 | 4) // Black
+#define O (64 | 4) // Orange, Esc and lightbulb are assumed to be orange
+
+/// Force g_led_config into flash, because there is no space in RAM.
+/// This should be safe because g_led_config should never be written to.
+/// We cannot make g_led_config const, because rgb_matrix.h, exports it as mutable.
+__attribute__(( section(".rodata.g_led_config") ))
+led_config_t g_led_config = { {
+ { 0, XX, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32},
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49},
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, XX, 62, XX, XX, XX},
+ { 63, XX, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, XX, 74, XX, 75, XX},
+ { 76, 77, 78, XX, XX, XX, 79, XX, XX, XX, 80, 81, 82, 83, 84, 85, 86}
+}, {
+ {0 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {168, 0}, {174, 0}, {187, 0}, {199, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {174, 13}, {187, 13}, {199, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {168, 26}, {174, 26}, {187, 26}, {199, 26},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {166, 38},
+ {8 , 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {187, 51},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64}, {199, 64},
+}, {
+ O, 4, 4, 4, 4, B, B, B, B, 4, 4, 4, 4, B, B, O,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, B, B, B,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, B, B, B,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, 4,
+ B, B, B, 4, B, B, B, B, 4, 4, 4
+} };
+
+#endif
diff --git a/keyboards/keychron/c1/white/white.h b/keyboards/keychron/c1/white/white.h
new file mode 100644
index 000000000..d996ca48d
--- /dev/null
+++ b/keyboards/keychron/c1/white/white.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "quantum.h"
+
+// Each layer gets a name for readability
+enum layer_names {
+ WIN_BASE = 0,
+ WIN_FN = 1,
+ MAC_BASE = 2,
+ MAC_FN = 3,
+};
+
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4f, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ {k00, XXX, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, XXX, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, XXX, k4f, XXX}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g} \
+}
diff --git a/keyboards/keychron/c2/white/config.h b/keyboards/keychron/c2/white/config.h
new file mode 100644
index 000000000..2249e6d11
--- /dev/null
+++ b/keyboards/keychron/c2/white/config.h
@@ -0,0 +1,86 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE22
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Keychron
+#define PRODUCT \x43\x32 White
+#define DESCRIPTION \x43\x32 White QMK
+
+#define WAIT_FOR_USB
+#define USB_MAX_POWER_CONSUMPTION 100
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+#define MATRIX_COL_PINS { A7, A8, A9, A10, A11, A12, A13, A14, A15, D0, D1, D2, D3, D8, A6, A5, A4, A3, A2, A1, A0 }
+#define MATRIX_ROW_PINS { C3, C4, C5, C6, C7, C8 }
+
+/* LED matrix */
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 1
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { B2, B1, B0, C0, C1, C2 }
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+#define DRIVER_LED_TOTAL 104
+
+/* Backlight configuration */
+#define RGB_MATRIX_VAL_STEP 32
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+
+/* Connects each switch in the dip switch to the GPIO pin of the MCU */
+#define DIP_SWITCH_PINS { B3 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* LED Status indicators */
+#define LED_NUM_LOCK_PIN D7
+#define LED_CAPS_LOCK_PIN D6
+#define LED_MAC_PIN B5
+#define LED_WIN_PIN B4
+#define LED_PIN_ON_STATE 1
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1150
+
+/* Disable the following animation because they are not interesting in monochrome */
+#define DISABLE_RGB_MATRIX_ALPHAS_MODS
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define DISABLE_RGB_MATRIX_BAND_SAT
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+#define DISABLE_RGB_MATRIX_CYCLE_ALL
+#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define DISABLE_RGB_MATRIX_DUAL_BEACON
+
+/* TODO: Disabled the following animation because they crash the keyboard. Probably due to a too small stack */
+#define DISABLE_RGB_MATRIX_RAINDROPS
+#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+
+/* Enable NKRO by default */
+#define FORCE_NKRO
diff --git a/keyboards/keychron/c2/white/info.json b/keyboards/keychron/c2/white/info.json
new file mode 100644
index 000000000..4d7318466
--- /dev/null
+++ b/keyboards/keychron/c2/white/info.json
@@ -0,0 +1,122 @@
+{
+ "keyboard_name": "Keychron C2 White",
+ "url": "https://www.keychron.com/products/keychron-c2-wired-mechanical-keyboard",
+ "maintainer": "None",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_fullsize_ansi": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6.5, "y":0},
+ {"x":7.5, "y":0},
+ {"x":8.5, "y":0},
+ {"x":9.5, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0},
+ {"x":14, "y":0},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+
+ {"x":0, "y":1.25},
+ {"x":1, "y":1.25},
+ {"x":2, "y":1.25},
+ {"x":3, "y":1.25},
+ {"x":4, "y":1.25},
+ {"x":5, "y":1.25},
+ {"x":6, "y":1.25},
+ {"x":7, "y":1.25},
+ {"x":8, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.25},
+ {"x":11, "y":1.25},
+ {"x":12, "y":1.25},
+ {"x":13, "y":1.25, "w":2},
+ {"x":15.25, "y":1.25},
+ {"x":16.25, "y":1.25},
+ {"x":17.25, "y":1.25},
+ {"x":18.5, "y":1.25},
+ {"x":19.5, "y":1.25},
+ {"x":20.5, "y":1.25},
+ {"x":21.5, "y":1.25},
+
+ {"x":0, "y":2.25, "w":1.5},
+ {"x":1.5, "y":2.25},
+ {"x":2.5, "y":2.25},
+ {"x":3.5, "y":2.25},
+ {"x":4.5, "y":2.25},
+ {"x":5.5, "y":2.25},
+ {"x":6.5, "y":2.25},
+ {"x":7.5, "y":2.25},
+ {"x":8.5, "y":2.25},
+ {"x":9.5, "y":2.25},
+ {"x":10.5, "y":2.25},
+ {"x":11.5, "y":2.25},
+ {"x":12.5, "y":2.25},
+ {"x":13.5, "y":2.25, "w":1.5},
+ {"x":15.25, "y":2.25},
+ {"x":16.25, "y":2.25},
+ {"x":17.25, "y":2.25},
+ {"x":18.5, "y":2.25},
+ {"x":19.5, "y":2.25},
+ {"x":20.5, "y":2.25},
+ {"x":21.5, "y":2.25, "h": 2},
+
+ {"x":0, "y":3.25, "w":1.75},
+ {"x":1.75, "y":3.25},
+ {"x":2.75, "y":3.25},
+ {"x":3.75, "y":3.25},
+ {"x":4.75, "y":3.25},
+ {"x":5.75, "y":3.25},
+ {"x":6.75, "y":3.25},
+ {"x":7.75, "y":3.25},
+ {"x":8.75, "y":3.25},
+ {"x":9.75, "y":3.25},
+ {"x":10.75, "y":3.25},
+ {"x":11.75, "y":3.25},
+ {"x":12.75, "y":3.25, "w":2.25},
+ {"x":18.5, "y":3.25},
+ {"x":19.5, "y":3.25},
+ {"x":20.5, "y":3.25},
+
+ {"x":0, "y":4.25, "w":2.25},
+ {"x":2.25, "y":4.25},
+ {"x":3.25, "y":4.25},
+ {"x":4.25, "y":4.25},
+ {"x":5.25, "y":4.25},
+ {"x":6.25, "y":4.25},
+ {"x":7.25, "y":4.25},
+ {"x":8.25, "y":4.25},
+ {"x":9.25, "y":4.25},
+ {"x":10.25, "y":4.25},
+ {"x":11.25, "y":4.25},
+ {"x":12.25, "y":4.25, "w":2.75},
+ {"x":16.25, "y":4.25},
+ {"x":18.5, "y":4.25},
+ {"x":19.5, "y":4.25},
+ {"x":20.5, "y":4.25},
+ {"x":21.5, "y":4.25, "h":2},
+
+ {"x":0, "y":5.25, "w":1.25},
+ {"x":1.25, "y":5.25, "w":1.25},
+ {"x":2.5, "y":5.25, "w":1.25},
+ {"x":3.75, "y":5.25, "w":6.25},
+ {"x":10, "y":5.25, "w":1.25},
+ {"x":11.25, "y":5.25, "w":1.25},
+ {"x":12.5, "y":5.25, "w":1.25},
+ {"x":13.75, "y":5.25, "w":1.25},
+ {"x":15.25, "y":5.25},
+ {"x":16.25, "y":5.25},
+ {"x":17.25, "y":5.25},
+ {"x":18.5, "y":5.25, "w":2},
+ {"x":20.5, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keychron/c2/white/keymaps/default/keymap.c b/keyboards/keychron/c2/white/keymaps/default/keymap.c
new file mode 100644
index 000000000..03f5d3cfc
--- /dev/null
+++ b/keyboards/keychron/c2/white/keymaps/default/keymap.c
@@ -0,0 +1,100 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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 KC_TASK LGUI(KC_TAB) // Task viewer
+#define KC_FLXP LGUI(KC_E) // Windows file explorer
+#define KC_CORT LGUI(KC_C) // Cortana (win10) Microsoft Teams (win11)
+#define KC_SNIP LGUI(LSFT(KC_S)) // Windows snip tool
+#define KC_W_FN MO(WIN_FN) // Windows Fn
+
+#define KC_MSSN LGUI(KC_F3) // Mission Control
+#define KC_FIND LALT(LGUI(KC_SPC)) // Finder
+#define KC_SIRI LGUI(KC_SPC) // Siri
+#define KC_MSCR LSFT(LGUI(KC_3)) // Mac screenshot
+#define KC_MSNP LSFT(LGUI(KC_4)) // Mac snip tool
+#define KC_M_FN MO(MAC_FN) // Mac Fn
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Windows layout
+ +-----------------------------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|CORT| BL | |
+ +--------------------------------------------------------------------------+ +--------------+ +-------------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP| |NLCK| P/ | P* | P- |
+ +--------------------------------------------------------------------------+ +--------------+ +-------------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN| | P7 | P8 | P9 | |
+ +--------------------------------------------------------------------------+ +--------------+ +--------------+ P+ |
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | | P4 | P5 | P6 | |
+ +--------------------------------------------------------------------------+ +----+ +-------------------+
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | | P1 | P2 | P3 | |
+ +--------------------------------------------------------------------------+ +--------------+ +---------------PRET|
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT | | P0 | . | |
+ +-----------------------------------------------------------------------------------------------------------------+
+ */
+
+ [WIN_BASE] = 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_CORT, RGB_TOG, \
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
+ 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_W_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \
+ ),
+
+ [WIN_FN] = LAYOUT( \
+ RESET, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNIP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_MOD, _______, _______ \
+ ),
+
+ /* Mac layout
+ +-----------------------------------------------------------------------------------------------------------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|SIRI| BL | |
+ +--------------------------------------------------------------------------+ +--------------+ +-------------------+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |HOME|PGUP| |NLCK| P/ | P* | P- |
+ +--------------------------------------------------------------------------+ +--------------+ +-------------------+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN| | P7 | P8 | P9 | |
+ +--------------------------------------------------------------------------+ +--------------+ +--------------+ P+ |
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | | P4 | P5 | P6 | |
+ +--------------------------------------------------------------------------+ +----+ +-------------------+
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | | P1 | P2 | P3 | |
+ +--------------------------------------------------------------------------+ +--------------+ +---------------PRET|
+ |LCTRL| LALT| LGUI | SPACE | RGUI| RALT | FN | RCTRL | |LFT |DWN |RGT | | P0 | . | |
+ +-----------------------------------------------------------------------------------------------------------------+
+ */
+
+ [MAC_BASE] = 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_MSCR, KC_SIRI, RGB_TOG, \
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
+ 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_M_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \
+ ),
+
+ [MAC_FN] = LAYOUT( \
+ RESET, KC_BRID, KC_BRIU, KC_MSSN, KC_FIND, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MSNP, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_SPD, RGB_MOD, _______, _______ \
+ )
+};
diff --git a/keyboards/keychron/c2/white/keymaps/via/keymap.c b/keyboards/keychron/c2/white/keymaps/via/keymap.c
new file mode 100644
index 000000000..9b448f5d5
--- /dev/null
+++ b/keyboards/keychron/c2/white/keymaps/via/keymap.c
@@ -0,0 +1,3 @@
+// Include default keymap
+// This way the VIA keymap is always up to date with the default keymap
+#include "../default/keymap.c" \ No newline at end of file
diff --git a/keyboards/keychron/c2/white/keymaps/via/no_idle_thread.c b/keyboards/keychron/c2/white/keymaps/via/no_idle_thread.c
new file mode 100644
index 000000000..d5ab9b8aa
--- /dev/null
+++ b/keyboards/keychron/c2/white/keymaps/via/no_idle_thread.c
@@ -0,0 +1,30 @@
+// Size optimizations to fit VIA support
+//
+// These optimizations are pretty intrusive because they remove the idle thread.
+// Without idle thread some sleep related functions no longer function.
+// These broken functions are overwritten with patched variants.
+//
+// These optimization are copied from:
+// https://github.com/gloryhzw/qmk_firmware/blob/sn32/keyboards/gmmk/full
+//
+// This file adds patch sleep related functions that work without idle threads.
+
+#include "quantum.h"
+
+/*
+ * must override sleep functions without idle thread
+ */
+#define CYCLES_PER_LOOP 9
+#define LOOP_TIMES (48000000 / (CH_CFG_ST_FREQUENCY) / (CYCLES_PER_LOOP))
+
+void chThdSleep(sysinterval_t time) {
+ uint32_t loops = time * LOOP_TIMES;
+ for (uint32_t i = 0; i < loops; i++) __NOP();
+}
+
+/* suspend thread used in usb_main.c */
+msg_t chThdSuspendTimeoutS(thread_reference_t* trp, sysinterval_t timeout) {
+ osalSysUnlock();
+ osalSysLock();
+ return MSG_OK;
+}
diff --git a/keyboards/keychron/c2/white/keymaps/via/rules.mk b/keyboards/keychron/c2/white/keymaps/via/rules.mk
new file mode 100644
index 000000000..291e1b137
--- /dev/null
+++ b/keyboards/keychron/c2/white/keymaps/via/rules.mk
@@ -0,0 +1,23 @@
+VIA_ENABLE=yes
+
+# Size optimizations to fit VIA support
+#
+# These optimizations are pretty intrusive because they remove the idle thread.
+# Without idle thread some sleep related functions no longer function.
+# These broken functions are overwritten with patched variants.
+#
+# These optimization are copied from:
+# https://github.com/gloryhzw/qmk_firmware/blob/sn32/keyboards/gmmk/full
+
+# Reduce RAW endpoints
+OPT_DEFS += -DRAW_IN_CAPACITY=1
+OPT_DEFS += -DRAW_OUT_CAPACITY=1
+
+# Remove idle thread
+OPT_DEFS += -DCH_CFG_NO_IDLE_THREAD=TRUE
+
+# Include the patched functions
+SRC += keymaps/via/no_idle_thread.c
+
+# Reduce stack size even further since we literaly need those 10 bytes
+USE_EXCEPTIONS_STACKSIZE = 0xE0 \ No newline at end of file
diff --git a/keyboards/keychron/c2/white/rand.c b/keyboards/keychron/c2/white/rand.c
new file mode 100644
index 000000000..a1096bbe2
--- /dev/null
+++ b/keyboards/keychron/c2/white/rand.c
@@ -0,0 +1,31 @@
+// Small rand() implementation
+//
+// The libc rand implementation takes to much flash space, so an smaller rand() function is used.
+#include "quantum.h"
+
+int rand(void)
+{
+ // static unsigned int z4;
+ unsigned int z1, z2, z3, z4;
+ int r;
+ unsigned int b;
+
+ z1 = timer_read32();
+ z2 = 12345;
+ z3 = 12345;
+ z4 = z1 << 8;
+
+ b = ((z1 << 6) ^ z1) >> 13;
+ z1 = ((z1 & 4294967294U) << 18) ^ b;
+ b = ((z2 << 2) ^ z2) >> 27;
+ z2 = ((z2 & 4294967288U) << 2) ^ b;
+ b = ((z3 << 13) ^ z3) >> 21;
+ z3 = ((z3 & 4294967280U) << 7) ^ b;
+ b = ((z4 << 3) ^ z4) >> 12;
+ z4 = ((z4 & 4294967168U) << 13) ^ b;
+
+ r = z1 ^ z2 ^ z3 ^ z4;
+ // z4 = r;
+
+ return r;
+}
diff --git a/keyboards/keychron/c2/white/readme.md b/keyboards/keychron/c2/white/readme.md
new file mode 100644
index 000000000..16ddb400c
--- /dev/null
+++ b/keyboards/keychron/c2/white/readme.md
@@ -0,0 +1,28 @@
+# Keychron C2 White
+
+A customizable 100% keyboard.
+
+* Keyboard Maintainer(s): None, you are at your own risk
+* Hardware Supported: Keychron C2 White
+* Hardware Availability: [Keychron](https://www.keychron.com/products/keychron-c1-wired-mechanical-keyboard)
+* This is based of the Keychron C1 White implementation by IsaacDynamo
+
+# Install
+1. If your keyboard currently has stock firmware installed, put your keyboard first into bootloader by shorting the boot pins found under the spacebar before plugging in your keyboard to the PC. Otherwise, press `Fn + Esc` to put your keyboard into bootloader.
+1. Download and run [Sonix Flasher](https://github.com/SonixQMK/sonix-flasher/releases/tag/v0.2.1).
+1. In Sonix Flasher, select `SN32F26x` under 'Device'. And select `0x00` as the qmk offset.
+1. Click 'Flash QMK...' and flash jumploader-keychron_c2_white.bin. This can be found in 'Pre-Compiled Jumploaders' build by the latest [Sonix keyboard bootloader action](https://github.com/SonixQMK/sonix-keyboard-bootloader/actions). Note C1 jumploader is also compatible, but the `Fn + Esc` will not work.
+1. In Sonix Flasher, select `SN32F26x` under 'Device'. And select `0x200` as the qmk offset.
+1. Lastly, click 'Flash QMK...' and flash keychron_c1_white_default.bin. This can be found in 'Pre-Compiled Firmware' build by the latest [Sonix QMK firmware action](https://github.com/SonixQMK/qmk_firmware/actions).
+
+# More Info
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/c2/white
+
+[Video](https://www.youtube.com/watch?v=aUiKHdI5Vk8) explaining installation for a similar keyboard.
+
+For more info and detailed flashing instructions, please visit https://github.com/CanUnesi/QMK-on-K6#readme
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/c2/white/rgb_matrix_kb.inc b/keyboards/keychron/c2/white/rgb_matrix_kb.inc
new file mode 100644
index 000000000..8c5a3ffb8
--- /dev/null
+++ b/keyboards/keychron/c2/white/rgb_matrix_kb.inc
@@ -0,0 +1,22 @@
+#ifndef DISABLE_RGB_MATRIX_HIGH_CONTRAST
+RGB_MATRIX_EFFECT(HIGH_CONTRAST)
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// Only light up black keys. These are marked with 128 in g_led_config.
+bool HIGH_CONTRAST(effect_params_t* params) {
+ RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ if (HAS_FLAGS(g_led_config.flags[i], 128)) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ } else {
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_HIGH_CONTRAST
diff --git a/keyboards/keychron/c2/white/rules.mk b/keyboards/keychron/c2/white/rules.mk
new file mode 100644
index 000000000..40d1f9618
--- /dev/null
+++ b/keyboards/keychron/c2/white/rules.mk
@@ -0,0 +1,25 @@
+# project specific files
+SRC += rand.c
+
+# MCU name
+MCU = SN32F268F
+
+# Build Options
+# comment out to disable the options.
+#
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+EXTRAKEY_ENABLE = yes # Audio control and System control
+NKRO_ENABLE = yes # USB Nkey Rollover
+DIP_SWITCH_ENABLE = yes
+
+# Custom Key and LED matrix handling
+CUSTOM_MATRIX = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F26x
+RGB_MATRIX_CUSTOM_KB = yes
+
+# Reduce code size
+USE_PROCESS_STACKSIZE = 0x1C0
+USE_EXCEPTIONS_STACKSIZE = 0xF0
diff --git a/keyboards/keychron/c2/white/white.c b/keyboards/keychron/c2/white/white.c
new file mode 100644
index 000000000..79f99a6d3
--- /dev/null
+++ b/keyboards/keychron/c2/white/white.c
@@ -0,0 +1,107 @@
+/* Copyright 2021 IsaacDynamo
+ *
+ * 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 "white.h"
+#include "config.h"
+#include "rgb_matrix.h"
+#include "../../../drivers/sn32/rgb_matrix_sn32f24xx.h"
+#include "hal_pwm_lld.h"
+
+// Manage Windows and Mac LEDs
+// - Show status of mode switch
+// - Turn LEDs off durring USB suspend
+static bool mode_leds_show = true;
+static bool mode_leds_windows;
+
+static void mode_leds_update(void) {
+ writePin(LED_WIN_PIN, mode_leds_show && mode_leds_windows);
+ writePin(LED_MAC_PIN, mode_leds_show && !mode_leds_windows);
+}
+
+void dip_switch_update_kb(uint8_t index, bool active){
+ if(index == 0) {
+ if(active) { // Windows mode
+ layer_move(WIN_BASE);
+ } else { // Mac mode
+ layer_move(MAC_BASE);
+ }
+
+ // Update mode and update leds
+ mode_leds_windows = active;
+ mode_leds_update();
+ }
+
+ dip_switch_update_user(index, active);
+}
+
+void keyboard_pre_init_kb(void) {
+ // Setup Win & Mac LED Pins as output
+ setPinOutput(LED_WIN_PIN);
+ setPinOutput(LED_MAC_PIN);
+ writePinLow(LED_WIN_PIN);
+ writePinLow(LED_MAC_PIN);
+
+ // Set status leds pins
+ setPinOutput(LED_NUM_LOCK_PIN);
+ setPinOutput(LED_CAPS_LOCK_PIN);
+
+ keyboard_pre_init_user();
+}
+
+void suspend_power_down_kb(void) {
+ // Turn leds off
+ mode_leds_show = false;
+ mode_leds_update();
+
+ // Suspend backlight
+ rgb_matrix_set_suspend_state(true);
+
+ suspend_power_down_user();
+}
+
+#define XX NO_LED
+
+// Mark keys that are black with the default keychron keycaps.
+// This is used but the custom rgb matrix effect to create a high contrast mode that only lights up black keys. To make them better readable.
+#define B (128 | 4)
+
+/// Force g_led_config into flash, because there is no space in RAM.
+/// This should be safe because g_led_config should never be written to.
+/// We cannot make g_led_config const, because rgb_matrix.h, exports it as mutable.
+__attribute__(( section(".rodata.g_led_config") ))
+led_config_t g_led_config = {
+{
+ { XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, XX, XX, XX, XX },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, XX, 70, XX, XX, XX, 71, 72, 73, XX },
+ { 74, XX, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, XX, 85, XX, 86, XX, 87, 88, 89, 90 },
+ { 91, 92, 93, XX, XX, 94, XX, XX, XX, XX, 95, 96, 97, 98, 99, 100, 101, 102, XX, 103, XX }
+}, {
+ { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 14*12, 0 }, { 15*12, 0 }, { 16*12, 0 }, { 17*12, 0 },
+ { 1 *12, 13 }, { 2 *12, 13 }, { 3 *12, 13 }, { 4 *12, 13 }, { 5 *12, 13 }, { 6 *12, 13 }, { 7 *12, 13 }, { 8 *12, 13 }, { 9 *12, 13 }, { 10*12, 13 }, { 11*12, 13 }, { 12*12, 13 }, { 13*12, 13 }, { 14*12, 13 }, { 15*12, 13 }, { 16*12, 13 }, { 17*12, 13 }, { 18*12, 13 }, { 19*12, 13 }, { 20*12, 13 }, { 21*12, 13 },
+ { 1 *12, 26 }, { 2 *12, 26 }, { 3 *12, 26 }, { 4 *12, 26 }, { 5 *12, 26 }, { 6 *12, 26 }, { 7 *12, 26 }, { 8 *12, 26 }, { 9 *12, 26 }, { 10*12, 26 }, { 11*12, 26 }, { 12*12, 26 }, { 13*12, 26 }, { 14*12, 26 }, { 15*12, 26 }, { 16*12, 26 }, { 17*12, 26 }, { 18*12, 26 }, { 19*12, 26 }, { 20*12, 26 }, { 21*12, 26 },
+ { 1 *12, 38 }, { 2 *12, 38 }, { 3 *12, 38 }, { 4 *12, 38 }, { 5 *12, 38 }, { 6 *12, 38 }, { 7 *12, 38 }, { 8 *12, 38 }, { 9 *12, 38 }, { 10*12, 38 }, { 11*12, 38 }, { 12*12, 38 }, { 14*12, 38 }, { 18*12, 38 }, { 19*12, 38 }, { 20*12, 38 },
+ { 1 *12, 51 }, { 3 *12, 51 }, { 4 *12, 51 }, { 5 *12, 51 }, { 6 *12, 51 }, { 7 *12, 51 }, { 8 *12, 51 }, { 9 *12, 51 }, { 10*12, 51 }, { 11*12, 51 }, { 12*12, 51 }, { 14*12, 51 }, { 16*12, 51 }, { 18*12, 51 }, { 19*12, 51 }, { 20*12, 51 }, { 21*12, 51 },
+ { 1 *12, 64 }, { 2 *12, 64 }, { 3 *12, 64 }, { 6 *12, 64 }, { 11*12, 64 }, { 12*12, 64 }, { 13*12, 64 }, { 14*12, 64 }, { 15*12, 64 }, { 16*12, 64 }, { 17*12, 64 }, { 18*12, 64 }, { 20*12, 64 }
+}, {
+ B, 4, 4, 4, 4, B, B, B, B, 4, 4, 4, 4, B, B, B,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, B, B, B, 4, 4, 4, 4,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, B, B, B, 4, 4, 4, 4,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, 4, 4, 4,
+ B, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, B, 4, 4, 4, 4, 4,
+ B, B, B, 4, B, B, B, B, 4, 4, 4, 4, 4
+}
+};
diff --git a/keyboards/keychron/c2/white/white.h b/keyboards/keychron/c2/white/white.h
new file mode 100644
index 000000000..535dba145
--- /dev/null
+++ b/keyboards/keychron/c2/white/white.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#include "quantum.h"
+// Each layer gets a name for readability
+enum layer_names {
+ WIN_BASE = 0,
+ WIN_FN = 1,
+ MAC_BASE = 2,
+ MAC_FN = 3,
+};
+
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j, k1k, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i, k2j, k2k, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3h, k3i, k3j, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4f, k4h, k4i, k4j, k4k, \
+ k50, k51, k52, k55, k5a, k5b, k5c, k5d, k5e, k5f, k5g, k5h, k5j \
+) \
+{ \
+ {XXX, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, XXX, XXX, XXX, XXX}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, k1j, k1k}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i, k2j, k2k}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, XXX, XXX, k3h, k3i, k3j, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, XXX, k4f, XXX, k4h, k4i, k4j, k4k}, \
+ {k50, k51, k52, XXX, XXX, k55, XXX, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g, k5h, XXX, k5j, XXX} \
+}
diff --git a/keyboards/keychron/c2/white/white.json b/keyboards/keychron/c2/white/white.json
new file mode 100644
index 000000000..0990ea100
--- /dev/null
+++ b/keyboards/keychron/c2/white/white.json
@@ -0,0 +1,224 @@
+{
+ "name": "Keychron C2 White",
+ "lighting": "none",
+ "vendorId": "0x3434",
+ "productId": "0xfe22",
+ "matrix": {
+ "rows": 6,
+ "cols": 21
+ },
+ "layouts": {
+ "keymap": [
+ [
+ "0,1",
+ {
+ "x": 1
+ },
+ "0,2",
+ "0,3",
+ "0,4",
+ "0,5",
+ {
+ "x": 0.5
+ },
+ "0,6",
+ "0,7",
+ "0,8",
+ "0,9",
+ {
+ "x": 0.5
+ },
+ "0,10",
+ "0,11",
+ "0,12",
+ "0,13",
+ {
+ "x": 0.25
+ },
+ "0,14",
+ "0,15",
+ "0,16"
+ ],
+ [
+ {
+ "y": 0.5
+ },
+ "1,0",
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ "1,11",
+ "1,12",
+ {
+ "w": 2
+ },
+ "1,13",
+ {
+ "x": 0.25
+ },
+ "1,14",
+ "1,15",
+ "1,16",
+ {
+ "x": 0.25
+ },
+ "1,17",
+ "1,18",
+ "1,19",
+ "1,20"
+ ],
+ [
+ {
+ "w": 1.5
+ },
+ "2,0",
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ "2,12",
+ {
+ "w": 1.5
+ },
+ "2,13",
+ {
+ "x": 0.25
+ },
+ "2,14",
+ "2,15",
+ "2,16",
+ {
+ "x": 0.25
+ },
+ "2,17",
+ "2,18",
+ "2,19",
+ {
+ "h": 2
+ },
+ "2,20"
+ ],
+ [
+ {
+ "w": 1.75
+ },
+ "3,0",
+ "3,1",
+ "3,2",
+ "3,3",
+ "3,4",
+ "3,5",
+ "3,6",
+ "3,7",
+ "3,8",
+ "3,9",
+ "3,10",
+ "3,11",
+ {
+ "w": 2.25
+ },
+ "3,13",
+ {
+ "x": 3.5
+ },
+ "3,17",
+ "3,18",
+ "3,19"
+ ],
+ [
+ {
+ "w": 2.25
+ },
+ "4,0",
+ "4,2",
+ "4,3",
+ "4,4",
+ "4,5",
+ "4,6",
+ "4,7",
+ "4,8",
+ "4,9",
+ "4,10",
+ "4,11",
+ {
+ "w": 2.75
+ },
+ "4,13",
+ {
+ "x": 1.25
+ },
+ "4,15",
+ {
+ "x": 1.25
+ },
+ "4,17",
+ "4,18",
+ "4,19",
+ {
+ "h": 2
+ },
+ "4,20"
+ ],
+ [
+ {
+ "w": 1.25
+ },
+ "5,0",
+ {
+ "w": 1.25
+ },
+ "5,1",
+ {
+ "w": 1.25
+ },
+ "5,2",
+ {
+ "w": 6.25
+ },
+ "5,5",
+ {
+ "w": 1.25
+ },
+ "5,10",
+ {
+ "w": 1.25
+ },
+ "5,11",
+ {
+ "w": 1.25
+ },
+ "5,12",
+ {
+ "w": 1.25
+ },
+ "5,13",
+ {
+ "x": 0.25
+ },
+ "5,14",
+ "5,15",
+ "5,16",
+ {
+ "x": 0.25,
+ "w": 2
+ },
+ "5,17",
+ "5,19"
+ ]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k14/keymaps/ansi/config.h b/keyboards/keychron/k14/keymaps/ansi/config.h
new file mode 100644
index 000000000..dd3097e37
--- /dev/null
+++ b/keyboards/keychron/k14/keymaps/ansi/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE1A
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k14/keymaps/ansi/keymap.c b/keyboards/keychron/k14/keymaps/ansi/keymap.c
new file mode 100644
index 000000000..f2e7a1463
--- /dev/null
+++ b/keyboards/keychron/k14/keymaps/ansi/keymap.c
@@ -0,0 +1,120 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FN1,
+ _FN2,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* +--------------------------------------------------------------------------+----+----+
+ | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | INS| RGB|
+ +--------------------------------------------------------------------------+----+----+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END| DEL|
+ +--------------------------------------------------------------------------+----+----+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | HME|PDUP|
+ +--------------------------------------------------------------------------+----+----+
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | UP |PDDN|
+ +--------------------------------------------------------------------------+----+----+
+ |LCTRL| LGUI| LALT| SPACE |RALT|LCTL| FN1| FN2| DWN| RGT|LEFT|
+ +--------------------------------------------------------------------------+----+----+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_BASE] = { { 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_INS, RGB_MOD },
+ { 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_DEL },
+ { 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_HOME, KC_PGUP },
+ { 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, KC_UP, KC_PGDN },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, KC_RCTL, MO(_FN1), MO(_FN2), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+/* +--------------------------------------------------------------------------+----+----+
+ | ` |SLCK|PAUS| APP| |BRLR|BRIN|MPRV| PLY|MNXT|MUTE|VLDN|VLUP| | SLP| TOG|
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | | | | | | | | | | HUE|
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | | | | | | | | | SPD|
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | | | | | | | | SAT|
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | FN1| FN2| | | |
+ +--------------------------------------------------------------------------+----+----+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_FN1] = { { KC_GRV, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_SLEP, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, RGB_SPI },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, RGB_SAI },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, _______, _______, MO(_FN1), MO(_FN2), _______, _______, _______ }
+ },
+
+/* +--------------------------------------------------------------------------+----+----+
+ | |F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12| | | |
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----+----+
+ | | | | | | | FN1| FN2| | | |
+ +--------------------------------------------------------------------------+----+----+
+*/
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_FN2] = { { 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_NO, _______, _______, _______ },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______ },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, _______, _______, MO(_FN1), MO(_FN2), _______, _______, _______ }
+ }
+
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k14/keymaps/ansi/via_ansi.json b/keyboards/keychron/k14/keymaps/ansi/via_ansi.json
new file mode 100644
index 000000000..e0ef12d90
--- /dev/null
+++ b/keyboards/keychron/k14/keymaps/ansi/via_ansi.json
@@ -0,0 +1,16 @@
+{
+ "name": "Keychron K14 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE1A",
+ "lighting": "none",
+ "matrix": {"rows": 5, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12",{"w":2},"0,13","0,14","0,15"],
+ [{"w":1.5},"1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w":1.5},"1,13","1,14","1,15"],
+ [{"w":1.75},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11",{"w":2.25},"2,13","2,14","2,15"],
+ [{"w":2.25},"3,0","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10", "3,11",{"w":2.75},"3,13","3,14","3,15"],
+ [{"w":1.25},"4,0",{"w":1.25},"4,1",{"w":1.25},"4,2",{"w":6.25},"4,6", "4,9","4,10","4,11","4,12","4,13","4,14","4,15"]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k14/rgb/config.h b/keyboards/keychron/k14/rgb/config.h
new file mode 100644
index 000000000..81abfd635
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/config.h
@@ -0,0 +1,43 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+#define MANUFACTURER Keychron
+#define PRODUCT K14 RGB
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 16
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_ROW_PINS { D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D4, D5 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B9
+#define LED_PIN_ON_STATE 1
diff --git a/keyboards/keychron/k14/rgb/config_led.c b/keyboards/keychron/k14/rgb/config_led.c
new file mode 100644
index 000000000..e18f6fa3b
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// readability
+#define NA NO_LED
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
+ { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NA, 44, 45, 46 },
+ { 47, NA, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NA, 58, 59, 60 },
+ { 61, 62, 63, NA, NA, NA, 64, NA, NA, 65, 66, 67, 68, 69, 70, 71 }
+}, {
+ { 0.00, 0.00 }, { 14.93, 0.00 }, { 29.87, 0.00 }, { 44.80, 0.00 }, { 59.73, 0.00 }, { 74.67, 0.00 }, { 89.60, 0.00 }, { 104.53, 0.00 }, { 119.47, 0.00 }, { 134.40, 0.00 }, { 149.33, 0.00 }, { 164.27, 0.00 }, { 179.20, 0.00 }, { 194.13, 0.00 }, { 209.07, 0.00 }, { 224.00, 0.00 },
+ { 0.00, 16.00 }, { 14.93, 16.00 }, { 29.87, 16.00 }, { 44.80, 16.00 }, { 59.73, 16.00 }, { 74.67, 16.00 }, { 89.60, 16.00 }, { 104.53, 16.00 }, { 119.47, 16.00 }, { 134.40, 16.00 }, { 149.33, 16.00 }, { 164.27, 16.00 }, { 179.20, 16.00 }, { 194.13, 16.00 }, { 209.07, 16.00 }, { 224.00, 16.00 },
+ { 0.00, 32.00 }, { 14.93, 32.00 }, { 29.87, 32.00 }, { 44.80, 32.00 }, { 59.73, 32.00 }, { 74.67, 32.00 }, { 89.60, 32.00 }, { 104.53, 32.00 }, { 119.47, 32.00 }, { 134.40, 32.00 }, { 149.33, 32.00 }, { 164.27, 32.00 }, { 184.13, 32.00 }, { 209.07, 32.00 }, { 224.00, 32.00 },
+ { 7.50, 48.00 }, { 29.87, 48.00 }, { 44.80, 48.00 }, { 59.73, 48.00 }, { 74.67, 48.00 }, { 89.60, 48.00 }, { 104.53, 48.00 }, { 119.47, 48.00 }, { 134.40, 48.00 }, { 149.33, 48.00 }, { 164.27, 48.00 }, { 179.20, 48.00 }, { 209.07, 48.00 }, { 224.00, 48.00 },
+ { 0.00, 64.00 }, { 14.93, 64.00 }, { 29.87, 64.00 }, { 89.60, 64.00 }, { 134.40, 64.00 }, { 149.33, 64.00 }, { 164.27, 64.00 }, { 179.20, 64.00 }, { 194.13, 64.00 }, { 209.07, 64.00 }, { 224.00, 64.00 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4,
+ 1, 1, 1, 4, 1, 1, 1, 1, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/keychron/k14/rgb/config_led.h b/keyboards/keychron/k14/rgb/config_led.h
new file mode 100644
index 000000000..57fddcfb0
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/config_led.h
@@ -0,0 +1,33 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+#include <config.h>
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (72)
diff --git a/keyboards/keychron/k14/rgb/info.json b/keyboards/keychron/k14/rgb/info.json
new file mode 100644
index 000000000..11676ee1f
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "K14 Gateron RGB",
+ "url": "https://www.keychron.com/products/keychron-k14-wireless-mechanical-keyboard",
+ "maintainer": "Jpe230",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "y":0}, {"label":"RGB", "x":16, "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":"End", "x":15, "y":1}, {"label":"Del", "x":16, "y":1}, {"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":"Home", "x":15, "y":2}, {"label":"PgUp", "x":16, "y":2}, {"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":"\u2191", "x":15, "y":3}, {"label":"PgDn", "x":16, "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":"Ctrl", "x":11, "y":4}, {"label":"Fn1", "x":12, "y":4}, {"label":"Fn2", "x":13, "y":4}, {"label":"\u2190", "x":14, "y":4}, {"label":"\u2193", "x":15, "y":4}, {"label":"\u2192", "x":16, "y":4}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k14/rgb/k14.h b/keyboards/keychron/k14/rgb/k14.h
new file mode 100644
index 000000000..f2989d495
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/k14.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, k2f, \
+ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, k3f, \
+ k40, k41, k42, k46, k49, k4a, k4b, k4c, k4d, k4e, k4f \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e, k2f}, \
+ {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e, k3f}, \
+ {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e, k4f} \
+}
diff --git a/keyboards/keychron/k14/rgb/optical/readme.md b/keyboards/keychron/k14/rgb/optical/readme.md
new file mode 100644
index 000000000..70771b481
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K14
+
+K14 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k14/rgb/optical:ansi
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k14/rgb/optical/rules.mk b/keyboards/keychron/k14/rgb/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k14/rgb/optical_via/readme.md b/keyboards/keychron/k14/rgb/optical_via/readme.md
new file mode 100644
index 000000000..c595f6d5d
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K14
+
+K14 Optical RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k14/rgb/optical_via:ansi
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k14/rgb/optical_via/rules.mk b/keyboards/keychron/k14/rgb/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k14/rgb/readme.md b/keyboards/keychron/k14/rgb/readme.md
new file mode 100644
index 000000000..d065fcac0
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/readme.md
@@ -0,0 +1,13 @@
+# Keychron K14 RGB
+
+K14 Gateron RGB
+
+Keyboard Maintainer: [Jpe230](https://github.com/Jpe230)
+Based on Redragon K566 by: [Adam Honse](https://github.com/CalcProgrammer1) and Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k14/rgb:ansi
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k14/rgb/rgb.h b/keyboards/keychron/k14/rgb/rgb.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/rgb.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/keychron/k14/rgb/rules.mk b/keyboards/keychron/k14/rgb/rules.mk
new file mode 100644
index 000000000..0a23d72fd
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k14/rgb/via/readme.md b/keyboards/keychron/k14/rgb/via/readme.md
new file mode 100644
index 000000000..19046f0e0
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/via/readme.md
@@ -0,0 +1,13 @@
+# Keychron K14 RGB
+
+K14 Gateron RGB
+
+Keyboard Maintainer: [Jpe230](https://github.com/Jpe230)
+Based on Redragon K566 by: [Adam Honse](https://github.com/CalcProgrammer1) and Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k14/rgb/via:ansi
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k14/rgb/via/rules.mk b/keyboards/keychron/k14/rgb/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/keychron/k14/rgb/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k2/keymaps/default/config.h b/keyboards/keychron/k2/keymaps/default/config.h
new file mode 100644
index 000000000..2008d81c2
--- /dev/null
+++ b/keyboards/keychron/k2/keymaps/default/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE02
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k2/keymaps/default/keymap.c b/keyboards/keychron/k2/keymaps/default/keymap.c
new file mode 100644
index 000000000..8b666a6b9
--- /dev/null
+++ b/keyboards/keychron/k2/keymaps/default/keymap.c
@@ -0,0 +1,104 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* +--------------------------------------------------------------------------+----+
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12|PSCR|DEL| RGB|
+ +--------------------------------------------------------------------------+----+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |PGUP|
+ +--------------------------------------------------------------------------+----+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |PGDN|
+ +--------------------------------------------------------------------------+----+
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN |HOME|
+ +--------------------------------------------------------------------------+----+
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | UP | END|
+ +--------------------------------------------------------------------------+----+
+ |LCTRL| LGUI| LALT| SPACE | RALT| FN|RCTRL| LFT| DWN| RGT|
+ +--------------------------------------------------------------------------+----+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_BASE] = { { 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, RGB_MOD },
+ { 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_PGUP },
+ { 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_NO, KC_PGDN },
+ { 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_NO, KC_HOME },
+ { 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, KC_UP, KC_END },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | |SLCK|PAUS| |BRLR|BRIN|MPRV| PLY|MNXT|MUTE|VLDN|VLUP| | | | | | SLP| TOG|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | HUE|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SPD+
+ | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SAT+
+ | | LALT| LGUI| | | | | | | | | | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_FL] = { { RESET, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_SLEP, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, RGB_SPI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, RGB_SAI },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, MO(_FL), _______, _______, _______, KC_NO }
+ }
+
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k2/keymaps/default/via_ansi.json b/keyboards/keychron/k2/keymaps/default/via_ansi.json
new file mode 100644
index 000000000..be392ba2d
--- /dev/null
+++ b/keyboards/keychron/k2/keymaps/default/via_ansi.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K2 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE02",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 16},
+ "layouts": {
+ "keymap": [
+ [ "0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15" ],
+ [ "1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w": 2},"1,13","1,15" ],
+ [{"w": 1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"w": 1.5},"2,13","2,15" ],
+ [{"w": 1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11",{"w": 2.25},"3,13","3,15" ],
+ [{"w": 2.25},"4,0","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w": 1.75},"4,13","4,14","4,15" ],
+ [{"w": 1.25},"5,0",{"w": 1.25},"5,1",{"w": 1.25},"5,2",{"w": 6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15" ]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k2/rgb/config.h b/keyboards/keychron/k2/rgb/config.h
new file mode 100644
index 000000000..b2aa1c3f8
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/config.h
@@ -0,0 +1,43 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+#define MANUFACTURER Keychron
+#define PRODUCT K2 RGB
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 16
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D4, D5 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B9
+#define LED_PIN_ON_STATE 1
diff --git a/keyboards/keychron/k2/rgb/config_led.c b/keyboards/keychron/k2/rgb/config_led.c
new file mode 100644
index 000000000..bab3fa61f
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/config_led.c
@@ -0,0 +1,32 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// readability
+#define NA NO_LED
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, NA, 30 },
+ { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NA, 45 },
+ { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NA, 58, NA, 59 },
+ { 60, NA, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, NA, 71, 72, 73 },
+ { 74, 75, 76, NA, NA, NA, 77, NA, NA, NA, 78, 79, 80, 81, 82, 83 }
+}, {
+ {0 , 0}, {12 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {162, 0}, {174, 0}, {187, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {187, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {168, 26}, {187, 26},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {166, 38}, {187, 38},
+ {8 , 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {174, 51}, {187, 51},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/keychron/k2/rgb/config_led.h b/keyboards/keychron/k2/rgb/config_led.h
new file mode 100644
index 000000000..595000372
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/config_led.h
@@ -0,0 +1,33 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+#include <config.h>
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (84)
diff --git a/keyboards/keychron/k2/rgb/info.json b/keyboards/keychron/k2/rgb/info.json
new file mode 100644
index 000000000..f3f9e09e0
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "K2 Gateron RGB v2",
+ "url": "https://www.keychron.com/products/keychron-k2-wireless-mechanical-keyboard",
+ "maintainer": "dexter93",
+ "width": 16,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"esc", "x":0, "y":0}, {"label":"<i class='kb kb-Unicode-Screen-Dim'></i>", "x":1, "y":0}, {"label":"<i class='kb kb-Unicode-Screen-Bright'></i>", "x":2, "y":0}, {"label":"<i class='fa fa-object-group'></i>", "x":3, "y":0}, {"label":"<i class='fa fa-th'></i>", "x":4, "y":0}, {"label":"<i class='fa fa-chevron-down'></i>", "x":5, "y":0}, {"label":"<i class='fa fa-chevron-up'></i>", "x":6, "y":0}, {"label":"<i class='fa fa-backward'></i>", "x":7, "y":0}, {"label":"<i class='fa fa-play'></i><i class='fa fa-pause'></i>", "x":8, "y":0}, {"label":"<i class='fa fa-forward'></i>", "x":9, "y":0}, {"label":"<i class='fa fa-volume-off'></i>", "x":10, "y":0}, {"label":"<i class='fa fa-volume-down'></i>", "x":11, "y":0}, {"label":"<i class='fa fa-volume-up'></i>", "x":12, "y":0}, {"label":"prsc", "x":13, "y":0}, {"label":"del", "x":14, "y":0}, {"label":"<i class='fa fa-lightbulb-o'></i>", "x":15, "y":0}, {"label":"` ~", "x":0, "y":1}, {"label":"1 !", "x":1, "y":1}, {"label":"2 @", "x":2, "y":1}, {"label":"3 #", "x":3, "y":1}, {"label":"4 $", "x":4, "y":1}, {"label":"5 %", "x":5, "y":1}, {"label":"6 ^", "x":6, "y":1}, {"label":"7 &", "x":7, "y":1}, {"label":"8 *", "x":8, "y":1}, {"label":"9 (", "x":9, "y":1}, {"label":"0 )", "x":10, "y":1}, {"label":"- _", "x":11, "y":1}, {"label":"= +", "x":12, "y":1}, {"label":"", "x":13, "y":1, "w":2}, {"label":"page", "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}, {"label":"page", "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":"<i class='kb kb-Return-2'></i>", "x":12.75, "y":3, "w":2.25}, {"label":"home", "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":"<i class='fa fa-angle-up'></i>", "x":14, "y":4}, {"label":"end", "x":15, "y":4}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"command", "x":2.5, "y":5, "w":1.25}, {"label":"&mdash;&mdash;&mdash;&mdash;&mdash;", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn", "x":11, "y":5}, {"label":"control", "x":12, "y":5}, {"label":"<i class='fa fa-angle-left'></i>", "x":13, "y":5}, {"label":"<i class='fa fa-angle-down'></i>", "x":14, "y":5}, {"label":"<i class='fa fa-angle-right'></i>", "x":15, "y":5}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k2/rgb/k2.h b/keyboards/keychron/k2/rgb/k2.h
new file mode 100644
index 000000000..c7762ea88
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/k2.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2f, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3f, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, k4f, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX, k1f}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, k3f}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e, k4f}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f} \
+}
diff --git a/keyboards/keychron/k2/rgb/optical/readme.md b/keyboards/keychron/k2/rgb/optical/readme.md
new file mode 100644
index 000000000..1b286deef
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K2
+
+K2 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k2/rgb/optical:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k2/rgb/optical/rules.mk b/keyboards/keychron/k2/rgb/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k2/rgb/optical_via/readme.md b/keyboards/keychron/k2/rgb/optical_via/readme.md
new file mode 100644
index 000000000..7a06e317e
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K2
+
+K2 Optical RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k2/rgb/optical_via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k2/rgb/optical_via/rules.mk b/keyboards/keychron/k2/rgb/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k2/rgb/readme.md b/keyboards/keychron/k2/rgb/readme.md
new file mode 100644
index 000000000..de23488f8
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/readme.md
@@ -0,0 +1,13 @@
+# Keychron K2
+
+K2 Gateron RGB v2
+
+Keyboard Maintainer: [Dimitris Mantzouranis](https://github.com/dexter93)
+Based on Redragon K566 by: [Adam Honse](https://github.com/CalcProgrammer1) and Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k2:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k2/rgb/rgb.h b/keyboards/keychron/k2/rgb/rgb.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/rgb.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/keychron/k2/rgb/rules.mk b/keyboards/keychron/k2/rgb/rules.mk
new file mode 100644
index 000000000..0a23d72fd
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k2/rgb/via/readme.md b/keyboards/keychron/k2/rgb/via/readme.md
new file mode 100644
index 000000000..6d6578eff
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K2
+
+K2 Gateron RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k2/rgb/via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k2/rgb/via/rules.mk b/keyboards/keychron/k2/rgb/via/rules.mk
new file mode 100644
index 000000000..3d208e31e
--- /dev/null
+++ b/keyboards/keychron/k2/rgb/via/rules.mk
@@ -0,0 +1,5 @@
+VIA_ENABLE = yes
+
+
+
+
diff --git a/keyboards/keychron/k3/keymaps/default/config.h b/keyboards/keychron/k3/keymaps/default/config.h
new file mode 100644
index 000000000..b0bcda0ec
--- /dev/null
+++ b/keyboards/keychron/k3/keymaps/default/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE04
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k3/keymaps/default/keymap.c b/keyboards/keychron/k3/keymaps/default/keymap.c
new file mode 100644
index 000000000..597609d44
--- /dev/null
+++ b/keyboards/keychron/k3/keymaps/default/keymap.c
@@ -0,0 +1,109 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /*
+ *****************************************************************************************************************
+ * ESC * F1 * F2 * F3 * F4 * F5 * F6 * F7 * F8 * F9 * F10 * F11 * F12 * PSCR * DEL * RMOD *
+ *****************************************************************************************************************
+ * ~ * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 0 * * * = * BSPC * PGUP *
+ *****************************************************************************************************************
+ * TAB * Q * W * E * R * T * Y * U * I * O * P * [ * ] * \ * PGDN *
+ *****************************************************************************************************************
+ * CAPS * A * S * D * F * G * H * J * K * L * ; * ' * ENT * HOME *
+ *****************************************************************************************************************
+ * LSFT * Z * X * C * V * B * N * M * , * . * / * RSFT * UP * END *
+ *****************************************************************************************************************
+ * LCTL * LGUI * LALT * SPC * RALT * FN * RCTL * LEFT * DOWN * RGHT *
+ *****************************************************************************************************************
+ */
+ [_BASE] = {
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ { 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, RGB_MOD },
+ { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_PGUP },
+ { 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, XXXXXXX, KC_PGDN },
+ { 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, XXXXXXX, KC_HOME },
+ { KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_UP, KC_END },
+ { KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+
+ /*
+ *****************************************************************************************************************
+ * * * * * * RVAD * RVAI * MPRV * MPLY * MNXT * MUTE * VOLD * VOLU * * * RTOG *
+ *****************************************************************************************************************
+ * * * * * * * * * * * * * * * RM_P *
+ *****************************************************************************************************************
+ * * * * * * * * * * * * * * * *
+ *****************************************************************************************************************
+ * * * * * * * * * * * * * * *
+ *****************************************************************************************************************
+ * * * * * * * * * * * * * RSAI * *
+ *****************************************************************************************************************
+ * * * * * * FN * * RHUD * RSAD * RHUI *
+ *****************************************************************************************************************
+ */
+ [_FN] = {
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ { RESET, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, RGB_TOG },
+ { 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, XXXXXXX, RGB_M_P },
+ { 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, XXXXXXX, 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, XXXXXXX, KC_NO, XXXXXXX, KC_NO },
+ { KC_NO, XXXXXXX, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, KC_NO, RGB_SAI, KC_NO },
+ { KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, MO(_FN), KC_NO, RGB_HUD, RGB_SAD, RGB_HUI }
+ }
+};
+
+void dip_switch_update_user(uint8_t index, bool active) {
+ switch(index) {
+ case 0: // OS switch
+ if (active) { // Win/Android mode
+ // do stuff
+ }
+ else { // Mac/iOS mode
+ // do stuff
+ }
+ break;
+ case 1: // Connection switch
+ // Probably it's not possible to do anything sensible here as switching from Cable to BT requires turning off the board. (BT / OFF / Cable)
+ if (active) { // BT mode
+ // do stuff
+ }
+ else { //Cable mode
+ // do stuff
+ }
+ break;
+ }
+}
+
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ // debug_enable = true;
+ // debug_matrix = true;
+ // debug_keyboard = true;
+ // debug_mouse = true;
+}
diff --git a/keyboards/keychron/k3/keymaps/default/via_ansi.json b/keyboards/keychron/k3/keymaps/default/via_ansi.json
new file mode 100644
index 000000000..68da9b9e0
--- /dev/null
+++ b/keyboards/keychron/k3/keymaps/default/via_ansi.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K3 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE04",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 16},
+ "layouts": {
+ "keymap": [
+ [ "0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15" ],
+ [ "1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w": 2},"1,13","1,15" ],
+ [{"w": 1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"w": 1.5},"2,13","2,15" ],
+ [{"w": 1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11",{"w": 2.25},"3,13","3,15" ],
+ [{"w": 2.25},"4,0","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w": 1.75},"4,13","4,14","4,15" ],
+ [{"w": 1.25},"5,0",{"w": 1.25},"5,1",{"w": 1.25},"5,2",{"w": 6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15" ]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k3/rgb/config.h b/keyboards/keychron/k3/rgb/config.h
new file mode 100644
index 000000000..e946c2e38
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/config.h
@@ -0,0 +1,39 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+#define MANUFACTURER Keychron
+#define PRODUCT K3 RGB
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 16
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D4, D5 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
diff --git a/keyboards/keychron/k3/rgb/config_led.c b/keyboards/keychron/k3/rgb/config_led.c
new file mode 100644
index 000000000..178d0477d
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/config_led.c
@@ -0,0 +1,65 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+#define NA NO_LED // readability
+
+/*
+ ****************************************************************************************************************
+ * 1 * 7 * 13 * 19 * 25 * 31 * 37 * 43 * 49 * 55 * 61 * 67 * 73 * 79 * 85 * 91 *
+ *****************************************************************************************************************
+ * 2 * 8 * 14 * 20 * 26 * 32 * 38 * 44 * 50 * 56 * 62 * 68 * 74 * 80 * 92 *
+ *****************************************************************************************************************
+ * 3 * 9 * 15 * 21 * 27 * 33 * 39 * 45 * 51 * 57 * 63 * 69 * 75 * 81 * 93 *
+ *****************************************************************************************************************
+ * 4 * 10 * 16 * 22 * 28 * 34 * 40 * 46 * 52 * 58 * 64 * 70 * 82 * 94 *
+ *****************************************************************************************************************
+ * 5 * 17 * 23 * 29 * 35 * 41 * 47 * 53 * 59 * 65 * 71 * 83 * 89 * 95 *
+ *****************************************************************************************************************
+ * 6 * 12 * 18 * 42 * 66 * 72 * 78 * 84 * 90 * 96 *
+ *****************************************************************************************************************
+
+ *****************************************************************************************************************
+ * ESC * F1 * F2 * F3 * F4 * F5 * F6 * F7 * F8 * F9 * F10 * F11 * F12 * PSCR * DEL * RGB *
+ *****************************************************************************************************************
+ * ~ * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 0 * * * = * BSPC * PGUP *
+ *****************************************************************************************************************
+ * TAB * Q * W * E * R * T * Y * U * I * O * P * [ * ] * \ * PGDN *
+ *****************************************************************************************************************
+ * CAPS * A * S * D * F * G * H * J * K * L * ; * ' * ENT * HOME *
+ *****************************************************************************************************************
+ * LSFT * Z * X * C * V * B * N * M * , * . * / * RSFT * UP * END *
+ *****************************************************************************************************************
+ * LCTL * LGUI * LALT * SPC * RALT * FN * RCTL * LEFT * DOWN * RGHT *
+ *****************************************************************************************************************
+*/
+
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, NA, 30 },
+ { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NA, 45 },
+ { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NA, 58, NA, 59 },
+ { 60, NA, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, NA, 71, 72, 73 },
+ { 74, 75, 76, NA, NA, NA, 77, NA, NA, NA, 78, 79, 80, 81, 82, 83 }
+ },
+ {
+ {7 , 0}, {21 , 0}, {35 , 0}, {49 , 0}, {63 , 0}, {77 , 0}, {91 , 0}, {105, 0}, {119, 0}, {133, 0}, {147, 0}, {161, 0}, {175, 0}, {189, 0}, {203, 0}, {217, 0},
+ {7 ,13}, {21 ,13}, {35 ,13}, {49 ,13}, {63 ,13}, {77 ,13}, {91 ,13}, {105,13}, {119,13}, {133,13}, {147,13}, {161,13}, {175,13}, {196,13}, {217,13},
+ {11 ,26}, {28 ,26}, {42 ,26}, {56 ,26}, {70 ,26}, {84 ,26}, {98 ,26}, {112,26}, {126,26}, {140,26}, {154,26}, {168,26}, {182,26}, {200,26}, {217,26},
+ {12 ,38}, {32 ,38}, {46 ,38}, {60 ,38}, {74 ,38}, {88 ,38}, {102,38}, {116,38}, {130,38}, {144,38}, {158,38}, {172,38}, {194,38}, {217,38},
+ {16 ,51}, {39 ,51}, {53 ,51}, {67 ,51}, {81 ,51}, {95 ,51}, {109,51}, {123,51}, {137,51}, {151,51}, {165,51}, {184,51}, {203,51}, {217,51},
+ {9 ,64}, {26 ,64}, {44 ,64}, {97 ,64}, {147,64}, {161,64}, {175,64}, {189,64}, {203,64}, {217,64},
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ }
+};
+
+#endif
diff --git a/keyboards/keychron/k3/rgb/config_led.h b/keyboards/keychron/k3/rgb/config_led.h
new file mode 100644
index 000000000..595000372
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/config_led.h
@@ -0,0 +1,33 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+#include <config.h>
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (84)
diff --git a/keyboards/keychron/k3/rgb/info.json b/keyboards/keychron/k3/rgb/info.json
new file mode 100644
index 000000000..3c20cd385
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/info.json
@@ -0,0 +1,444 @@
+{
+ "keyboard_name": "K3 Gateron RGB Non Hotswap",
+ "url": "https://www.keychron.com/products/keychron-k3-wireless-mechanical-keyboard?variant=32220198633561",
+ "maintainer": "smp4488",
+ "width": 16,
+ "height": 5,
+ "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": "print screen",
+ "x": 13,
+ "y": 0
+ },
+ {
+ "label": "del",
+ "x": 14,
+ "y": 0
+ },
+ {
+ "label": "rgb",
+ "x": 15,
+ "y": 0
+ },
+ {
+ "label": "`",
+ "x": 0,
+ "y": 1
+ },
+ {
+ "label": "1 !",
+ "x": 1,
+ "y": 1
+ },
+ {
+ "label": "2 @",
+ "x": 2,
+ "y": 1
+ },
+ {
+ "label": "3 #",
+ "x": 3,
+ "y": 1
+ },
+ {
+ "label": "4 $",
+ "x": 4,
+ "y": 1
+ },
+ {
+ "label": "5 %",
+ "x": 5,
+ "y": 1
+ },
+ {
+ "label": "6 ^",
+ "x": 6,
+ "y": 1
+ },
+ {
+ "label": "7 &",
+ "x": 7,
+ "y": 1
+ },
+ {
+ "label": "8 *",
+ "x": 8,
+ "y": 1
+ },
+ {
+ "label": "9 (",
+ "x": 9,
+ "y": 1
+ },
+ {
+ "label": "0 )",
+ "x": 10,
+ "y": 1
+ },
+ {
+ "label": "- _",
+ "x": 11,
+ "y": 1
+ },
+ {
+ "label": "= +",
+ "x": 12,
+ "y": 1
+ },
+ {
+ "label": "backspace",
+ "x": 13,
+ "y": 1,
+ "w": 2
+ },
+ {
+ "label": "page up",
+ "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": 12.5,
+ "y": 2,
+ "w": 1.5
+ },
+ {
+ "label": "page down",
+ "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": 13.75,
+ "y": 3,
+ "w": 2.25
+ },
+ {
+ "label": "home",
+ "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": "up",
+ "x": 14,
+ "y": 4
+ },
+ {
+ "label": "end",
+ "x": 15,
+ "y": 4
+ },
+ {
+ "label": "control",
+ "x": 0,
+ "y": 5,
+ "w": 1.25
+ },
+ {
+ "label": "option",
+ "x": 1.25,
+ "y": 5,
+ "w": 1.25
+ },
+ {
+ "label": "cmd",
+ "x": 2.5,
+ "y": 5,
+ "w": 1.25
+ },
+ {
+ "label": "space",
+ "x": 3.75,
+ "y": 5,
+ "w": 6.25
+ },
+ {
+ "label": "cmd",
+ "x": 10,
+ "y": 5
+ },
+ {
+ "label": "cmd",
+ "x": 11,
+ "y": 5
+ },
+ {
+ "label": "fn",
+ "x": 12,
+ "y": 5
+ },
+ {
+ "label": "left",
+ "x": 13,
+ "y": 5
+ },
+ {
+ "label": "down",
+ "x": 14,
+ "y": 5
+ },
+ {
+ "label": "right",
+ "x": 15,
+ "y": 5
+ }
+ ]
+ }
+ }
+ }
diff --git a/keyboards/keychron/k3/rgb/k3.h b/keyboards/keychron/k3/rgb/k3.h
new file mode 100644
index 000000000..437847e3f
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/k3.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO // readability
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2f, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3f, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, k4f, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX, k1f}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, k3f}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e, k4f}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f} \
+}
diff --git a/keyboards/keychron/k3/rgb/optical/readme.md b/keyboards/keychron/k3/rgb/optical/readme.md
new file mode 100644
index 000000000..8b8caa54f
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K3
+
+K3 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k3/rgb/optical:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k3/rgb/optical/rules.mk b/keyboards/keychron/k3/rgb/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k3/rgb/optical_via/readme.md b/keyboards/keychron/k3/rgb/optical_via/readme.md
new file mode 100644
index 000000000..821c26d73
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K3
+
+K3 Optical RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k3/rgb/optical_via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k3/rgb/optical_via/rules.mk b/keyboards/keychron/k3/rgb/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k3/rgb/readme.md b/keyboards/keychron/k3/rgb/readme.md
new file mode 100644
index 000000000..286324df4
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/readme.md
@@ -0,0 +1,15 @@
+## Keychron K3
+
+Keychron K3 Non Hotswap RGB (Sonix SN32F248B)
+
+Layout by: [Stephen Peery](https://github.com/smp4488)
+Layout by: [Alexander Frank](https://github.com/jedifindtrick)
+
+Based on Keychron K4 by: [Dimitris Mantzouranis](https://github.com/dexter93) and Keychron K6 by: [Alexander Frank](https://github.com/jedifindtrick)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k3:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k3/rgb/rgb.h b/keyboards/keychron/k3/rgb/rgb.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/rgb.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/keychron/k3/rgb/rules.mk b/keyboards/keychron/k3/rgb/rules.mk
new file mode 100644
index 000000000..0a23d72fd
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k3/rgb/via/readme.md b/keyboards/keychron/k3/rgb/via/readme.md
new file mode 100644
index 000000000..69bbfadce
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K3
+
+K3 Gateron RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k3/rgb/via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k3/rgb/via/rules.mk b/keyboards/keychron/k3/rgb/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/keychron/k3/rgb/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k4/readme.md b/keyboards/keychron/k4/readme.md
new file mode 100644
index 000000000..79311f63a
--- /dev/null
+++ b/keyboards/keychron/k4/readme.md
@@ -0,0 +1,14 @@
+# Keychron K4
+
+![Keychron K4](https://cdn.shopify.com/s/files/1/0059/0630/1017/t/5/assets/pf-102c05e9--1-Edited.jpg)
+
+A compact 96% keyboard.
+
+Brought to you by: [SonixQMK](https://github.com/SonixQMK/qmk_firmware)
+
+* Hardware Supported: SN32F248BF
+ * v1 (Gateron RGB)
+ * v2 (Gateron RGB)
+* Hardware Availability: [keychron.com](https://www.keychron.com/)
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/config.h b/keyboards/keychron/k4/rgb/config.h
new file mode 100644
index 000000000..1529dba0f
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/config.h
@@ -0,0 +1,36 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 19
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D5, D6 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
diff --git a/keyboards/keychron/k4/rgb/config_led.c b/keyboards/keychron/k4/rgb/config_led.c
new file mode 100644
index 000000000..b59fc10d5
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/config_led.c
@@ -0,0 +1,57 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// readability
+#define NA NO_LED
+#ifdef KEYMAP_ISO
+/* ISO keymap LEDs */
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 },
+ { 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, NA, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, NA, NA, 50, 51, 52, 53 },
+ { 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, NA, 68, 69, 70, NA },
+ { 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, NA, 83, 84, 85, 86, 87, 88 },
+ { 89, 90, 91, NA, NA, NA, 92, NA, NA, NA, 93, 94, 95, 96, 97, 98, 99, 100,NA }
+}, {
+ {0 , 0}, {12 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {162, 0}, {174, 0}, {187, 0}, {199, 0}, {212, 0}, {224, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {187, 13}, {199, 13}, {212, 13}, {224, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {187, 26}, {199, 26}, {212, 26}, {224, 32},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {158, 38}, {173, 32}, {187, 38}, {199, 38}, {212, 38},
+ {2 , 51}, {15, 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {174, 51}, {187, 51}, {199, 51}, {212, 51}, {224, 58},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64}, {199, 64}, {212, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+#else
+/* ANSI keymap LEDs */
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 },
+ { 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, NA, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, NA, 51, 52, 53, 54 },
+ { 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, NA, 67, NA, 68, 69, 70, NA },
+ { 71, NA, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, NA, 82, 83, 84, 85, 86, 87 },
+ { 88, 89, 90, NA, NA, NA, 91, NA, NA, NA, 92, 93, 94, 95, 96, 97, 98, 99, NA }
+}, {
+ {0 , 0}, {12 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {162, 0}, {174, 0}, {187, 0}, {199, 0}, {212, 0}, {224, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {187, 13}, {199, 13}, {212, 13}, {224, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {168, 26}, {187, 26}, {199, 26}, {212, 26}, {224, 32},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {166, 38}, {187, 38}, {199, 38}, {212, 38},
+ {8 , 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {174, 51}, {187, 51}, {199, 51}, {212, 51}, {224, 58},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64}, {199, 64}, {212, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+#endif
+#endif
diff --git a/keyboards/keychron/k4/rgb/config_led.h b/keyboards/keychron/k4/rgb/config_led.h
new file mode 100644
index 000000000..a25643b01
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/config_led.h
@@ -0,0 +1,36 @@
+/*
+Copyright 2021 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+#include <config.h>
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifdef KEYMAP_ISO
+#define DRIVER_LED_TOTAL (101)
+#else
+#define DRIVER_LED_TOTAL (100)
+#endif
diff --git a/keyboards/keychron/k4/rgb/readme.md b/keyboards/keychron/k4/rgb/readme.md
new file mode 100644
index 000000000..70072cf38
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/readme.md
@@ -0,0 +1,10 @@
+# Keychron K4
+
+Keychron K4 Gateron RGB
+
+Keyboard Maintainer: [Dimitris Mantzouranis](https://github.com/dexter93)
+Brought to you by: [SonixQMK](https://github.com/SonixQMK/qmk_firmware)
+Hardware Supported: SN32F248BF
+
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/rgb.h b/keyboards/keychron/k4/rgb/rgb.h
new file mode 100644
index 000000000..84fa1e5b0
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/rgb.h
@@ -0,0 +1,12 @@
+#ifndef RGB_H
+#define RGB_H
+
+#include "quantum.h"
+
+#if defined(KEYBOARD_keychron_k4_rgb_v1)
+ #include "v1.h"
+#elif defined(KEYBOARD_keychron_k4_rgb_v2)
+ #include "v2.h"
+#endif // Keychron K4 RGB revisions
+
+#endif
diff --git a/keyboards/keychron/k4/rgb/rules.mk b/keyboards/keychron/k4/rgb/rules.mk
new file mode 100644
index 000000000..1016a67d8
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/rules.mk
@@ -0,0 +1,10 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k4/rgb/v1/config.h b/keyboards/keychron/k4/rgb/v1/config.h
new file mode 100644
index 000000000..8cbcde4db
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/config.h
@@ -0,0 +1,18 @@
+ /* Copyright 2021 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#define MANUFACTURER Keychron
+#define PRODUCT K4v1 RGB
diff --git a/keyboards/keychron/k4/rgb/v1/config_led.h b/keyboards/keychron/k4/rgb/v1/config_led.h
new file mode 100644
index 000000000..6073aa7b9
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2021 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (100)
diff --git a/keyboards/keychron/k4/rgb/v1/info.json b/keyboards/keychron/k4/rgb/v1/info.json
new file mode 100644
index 000000000..b8509415d
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "K4 Gateron RGB v1",
+ "url": "https://www.keychron.com/products/keychron-k4-wireless-mechanical-keyboard",
+ "maintainer": "dexter93",
+ "width": 19,
+ "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":"home", "x":13, "y":0}, {"label":"end", "x":14, "y":0}, {"label":"pgup", "x":15, "y":0}, {"label":"pgdn", "x":16, "y":0}, {"label":"del", "x":17, "y":0}, {"label":"rgb", "x":18, "y":0}, {"label":"` ~", "x":0, "y":1}, {"label":"1 !", "x":1, "y":1}, {"label":"2 @", "x":2, "y":1}, {"label":"3 #", "x":3, "y":1}, {"label":"4 $", "x":4, "y":1}, {"label":"5 %", "x":5, "y":1}, {"label":"6 ^", "x":6, "y":1}, {"label":"7 &", "x":7, "y":1}, {"label":"8 *", "x":8, "y":1}, {"label":"9 (", "x":9, "y":1}, {"label":"0 )", "x":10, "y":1}, {"label":"- _", "x":11, "y":1}, {"label":"= +", "x":12, "y":1}, {"label":"backspace", "x":13, "y":1, "w":2}, {"label":"num", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "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}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":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":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "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":"up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"enter", "x":18, "y":4, "h":2}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"cmd", "x":2.5, "y":5, "w":1.25}, {"label":"space", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn", "x":11, "y":5}, {"label":"control", "x":12, "y":5}, {"label":"left", "x":13, "y":5}, {"label":"down", "x":14, "y":5}, {"label":"right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ }
+ }
+}
diff --git a/keyboards/keychron/k4/rgb/v1/keymaps/default/config.h b/keyboards/keychron/k4/rgb/v1/keymaps/default/config.h
new file mode 100644
index 000000000..a8c399475
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/keymaps/default/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE06
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v1/keymaps/default/keymap.c b/keyboards/keychron/k4/rgb/v1/keymaps/default/keymap.c
new file mode 100644
index 000000000..50116ebef
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/keymaps/default/keymap.c
@@ -0,0 +1,104 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12|HOME|END|PGUP|PGDN| DEL| RGB|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |NLCK| / | * | - |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | |
+ +--------------------------------------------------------------------------+----|----|----| + +
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | 4 | 5 | 6 | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | UP | 1 | 2 | 3 | |
+ +--------------------------------------------------------------------------+----|----|----| ENT+
+ |LCTRL| LGUI| LALT| SPACE | RALT| FN|RCTRL| LFT| DWN| RGT| 0 | . | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_BASE] = { { 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_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, RGB_MOD },
+ { 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_NO, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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_NO, KC_P4, KC_P5, KC_P6, KC_NO },
+ { 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, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO }
+ },
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | |SLCK|PAUS| |BRLR|BRIN|MPRV| PLY|MNXT|MUTE|VLDN|VLUP| | |PSCR| | | SLP| TOG|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | HUE|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SPD+
+ | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SAT+
+ | | LALT| LGUI| | | | | | | | | | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_FL] = { { RESET, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_PSCR, _______, _______, KC_SLEP, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, RGB_SPI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, _______, _______, _______, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______, RGB_SAI },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, MO(_FL), _______, _______, _______, _______, _______, _______, KC_NO }
+ }
+
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k4/rgb/v1/keymaps/default/via_ansi.json b/keyboards/keychron/k4/rgb/v1/keymaps/default/via_ansi.json
new file mode 100644
index 000000000..a94e2333d
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/keymaps/default/via_ansi.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K4 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE06",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 19},
+ "layouts": {
+ "keymap": [
+ [ "0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15","0,16","0,17","0,18" ],
+ [ "1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w": 2},"1,13","1,15","1,16","1,17","1,18" ],
+ [{"w": 1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"w": 1.5},"2,13","2,15","2,16","2,17",{"h":2},"2,18" ],
+ [{"w": 1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11",{"w": 2.25},"3,13","3,15","3,16","3,17" ],
+ [{"w": 2.25},"4,0","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w": 1.75},"4,13","4,14","4,15","3,16","3,17",{"h":2},"3,18" ],
+ [{"w": 1.25},"5,0",{"w": 1.25},"5,1",{"w": 1.25},"5,2",{"w": 6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15","5,16","5,17" ]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k4/rgb/v1/optical/readme.md b/keyboards/keychron/k4/rgb/v1/optical/readme.md
new file mode 100644
index 000000000..ad2f5c835
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K4v1
+
+K4v1 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/rgb/v1/optical:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v1/optical/rules.mk b/keyboards/keychron/k4/rgb/v1/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k4/rgb/v1/optical_via/config.h b/keyboards/keychron/k4/rgb/v1/optical_via/config.h
new file mode 100644
index 000000000..ebcc46430
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/optical_via/config.h
@@ -0,0 +1,3 @@
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
diff --git a/keyboards/keychron/k4/rgb/v1/optical_via/readme.md b/keyboards/keychron/k4/rgb/v1/optical_via/readme.md
new file mode 100644
index 000000000..93bd074e2
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K4v1
+
+K4v1 Optical RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/rgb/v1/optical_via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v1/optical_via/rules.mk b/keyboards/keychron/k4/rgb/v1/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k4/rgb/v1/readme.md b/keyboards/keychron/k4/rgb/v1/readme.md
new file mode 100644
index 000000000..33ee6d58c
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/readme.md
@@ -0,0 +1,13 @@
+# Keychron K4
+
+Keychron K4 Gateron RGB V1
+
+Keyboard Maintainer: [Dimitris Mantzouranis](https://github.com/dexter93)
+Brought to you by: [SonixQMK](https://github.com/SonixQMK/qmk_firmware)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/rgb/v1:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v1/rules.mk b/keyboards/keychron/k4/rgb/v1/rules.mk
new file mode 100644
index 000000000..58c60bbd3
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/rules.mk
@@ -0,0 +1,20 @@
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v1/v1.c b/keyboards/keychron/k4/rgb/v1/v1.c
new file mode 100644
index 000000000..88f0ab50d
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/v1.c
@@ -0,0 +1,8 @@
+#include "v1.h"
+
+void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ if (host_keyboard_led_state().caps_lock)
+ RGB_MATRIX_INDICATOR_SET_COLOR(55, 255, 0, 0);
+ if (host_keyboard_led_state().num_lock)
+ RGB_MATRIX_INDICATOR_SET_COLOR(33, 255, 0, 0);
+}
diff --git a/keyboards/keychron/k4/rgb/v1/v1.h b/keyboards/keychron/k4/rgb/v1/v1.h
new file mode 100644
index 000000000..8e77ff750
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/v1.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, k1i, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2f, k2g, k2h, k2i, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3f, k3g, k3h, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, k4f, k4g, k4h, k4i, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g, k5h \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX, k1f, k1g, k1h, k1i}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f, k2g, k2h, k2i}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, k3f, k3g, k3h, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e, k4f, k4g, k4h, k4i}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f, k5g, k5h, XXX} \
+}
diff --git a/keyboards/keychron/k4/rgb/v1/via/config.h b/keyboards/keychron/k4/rgb/v1/via/config.h
new file mode 100644
index 000000000..ebcc46430
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/via/config.h
@@ -0,0 +1,3 @@
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
diff --git a/keyboards/keychron/k4/rgb/v1/via/readme.md b/keyboards/keychron/k4/rgb/v1/via/readme.md
new file mode 100644
index 000000000..32d08fc24
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K4v1
+
+K4v1 Gateron RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/v1/rgb/via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v1/via/rules.mk b/keyboards/keychron/k4/rgb/v1/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v1/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v2/config.h b/keyboards/keychron/k4/rgb/v2/config.h
new file mode 100644
index 000000000..204a38716
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/config.h
@@ -0,0 +1,23 @@
+ /* Copyright 2021 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#define MANUFACTURER Keychron
+#define PRODUCT K4v2 RGB
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B12
+#define LED_NUM_LOCK_PIN D4
+#define LED_PIN_ON_STATE 1 \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v2/info.json b/keyboards/keychron/k4/rgb/v2/info.json
new file mode 100644
index 000000000..e92dabfb4
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "K4 Gateron RGB v2",
+ "url": "https://www.keychron.com/products/keychron-k4-wireless-mechanical-keyboard-version-2",
+ "maintainer": "dexter93",
+ "width": 19,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_ansi": {
+ "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":"del", "x":13, "y":0}, {"label":"home", "x":14, "y":0}, {"label":"end", "x":15, "y":0}, {"label":"pgup", "x":16, "y":0}, {"label":"pgdn", "x":17, "y":0}, {"label":"rgb", "x":18, "y":0}, {"label":"` ~", "x":0, "y":1}, {"label":"1 !", "x":1, "y":1}, {"label":"2 @", "x":2, "y":1}, {"label":"3 #", "x":3, "y":1}, {"label":"4 $", "x":4, "y":1}, {"label":"5 %", "x":5, "y":1}, {"label":"6 ^", "x":6, "y":1}, {"label":"7 &", "x":7, "y":1}, {"label":"8 *", "x":8, "y":1}, {"label":"9 (", "x":9, "y":1}, {"label":"0 )", "x":10, "y":1}, {"label":"- _", "x":11, "y":1}, {"label":"= +", "x":12, "y":1}, {"label":"backspace", "x":13, "y":1, "w":2}, {"label":"num", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "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}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":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":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "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":"up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"enter", "x":18, "y":4, "h":2}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"cmd", "x":2.5, "y":5, "w":1.25}, {"label":"space", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn", "x":11, "y":5}, {"label":"control", "x":12, "y":5}, {"label":"left", "x":13, "y":5}, {"label":"down", "x":14, "y":5}, {"label":"right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ },
+ "LAYOUT_iso": {
+ "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":"del", "x":13, "y":0}, {"label":"home", "x":14, "y":0}, {"label":"end", "x":15, "y":0}, {"label":"pgup", "x":16, "y":0}, {"label":"pgdn", "x":17, "y":0}, {"label":"rgb", "x":18, "y":0}, {"label":"&sect; &plusmn;", "x":0, "y":1}, {"label":"1 !", "x":1, "y":1}, {"label":"2 @", "x":2, "y":1}, {"label":"3 #", "x":3, "y":1}, {"label":"4 $", "x":4, "y":1}, {"label":"5 %", "x":5, "y":1}, {"label":"6 ^", "x":6, "y":1}, {"label":"7 &", "x":7, "y":1}, {"label":"8 *", "x":8, "y":1}, {"label":"9 (", "x":9, "y":1}, {"label":"0 )", "x":10, "y":1}, {"label":"- _", "x":11, "y":1}, {"label":"= +", "x":12, "y":1}, {"label":"backspace", "x":13, "y":1, "w":2}, {"label":"num", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "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":"enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":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":"\\ |", "x":12.75, "y":3}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"shift", "x":0, "y":4, "w":1.25}, {"label":"`~", "x":1.25, "y":4}, {"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":"up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"enter", "x":18, "y":4, "h":2}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"cmd", "x":2.5, "y":5, "w":1.25}, {"label":"space", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn", "x":11, "y":5}, {"label":"control", "x":12, "y":5}, {"label":"left", "x":13, "y":5}, {"label":"down", "x":14, "y":5}, {"label":"right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ }
+ }
+}
diff --git a/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/config.h b/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/config.h
new file mode 100644
index 000000000..a8c399475
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE06
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/keymap.c b/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/keymap.c
new file mode 100644
index 000000000..31a455033
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/keymap.c
@@ -0,0 +1,104 @@
+/*
+Copyright 2021 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12|DEL|HOME| END|PGUP|PGDN| RGB|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |NLCK| / | * | - |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | |
+ +--------------------------------------------------------------------------+----|----|----| + +
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | 4 | 5 | 6 | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | UP | 1 | 2 | 3 | |
+ +--------------------------------------------------------------------------+----|----|----| ENT+
+ |LCTRL| LGUI| LALT| SPACE | RALT| FN|RCTRL| LFT| DWN| RGT| 0 | . | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_BASE] = { { 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_HOME, KC_END, KC_PGUP, KC_PGDN, RGB_MOD },
+ { 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_NO, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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_NO, KC_P4, KC_P5, KC_P6, KC_NO },
+ { 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, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO }
+ },
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | |SLCK|PAUS| |BRLR|BRIN|MPRV| PLY|MNXT|MUTE|VLDN|VLUP| | |PSCR| | | SLP| TOG|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | HUE|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SPD+
+ | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SAT+
+ | | LALT| LGUI| | | | | | | | | | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_FL] = { { RESET, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_PSCR, _______, _______, KC_SLEP, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, RGB_SPI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, _______, _______, _______, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______, RGB_SAI },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, MO(_FL), _______, _______, _______, _______, _______, _______, KC_NO }
+ }
+
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/via_ansi.json b/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/via_ansi.json
new file mode 100644
index 000000000..a94e2333d
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/keymaps/default_ansi/via_ansi.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K4 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE06",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 19},
+ "layouts": {
+ "keymap": [
+ [ "0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15","0,16","0,17","0,18" ],
+ [ "1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w": 2},"1,13","1,15","1,16","1,17","1,18" ],
+ [{"w": 1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"w": 1.5},"2,13","2,15","2,16","2,17",{"h":2},"2,18" ],
+ [{"w": 1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11",{"w": 2.25},"3,13","3,15","3,16","3,17" ],
+ [{"w": 2.25},"4,0","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w": 1.75},"4,13","4,14","4,15","3,16","3,17",{"h":2},"3,18" ],
+ [{"w": 1.25},"5,0",{"w": 1.25},"5,1",{"w": 1.25},"5,2",{"w": 6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15","5,16","5,17" ]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/config.h b/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/config.h
new file mode 100644
index 000000000..9f087ee12
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/config.h
@@ -0,0 +1,6 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE07
+#define DEVICE_VER 0x0001
+
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/keymap.c b/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/keymap.c
new file mode 100644
index 000000000..5bbf06ab4
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/keymap.c
@@ -0,0 +1,104 @@
+/*
+Copyright 2021 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10| F11| F12|DEL|HOME| END|PGUP|PGDN| RGB|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |NLCK| / | * | - |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | 7 | 8 | 9 | |
+ +-------------------------------------------------------------------- RET +----|----|----| + +
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | # | | 4 | 5 | 6 | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ |LSHFT| \ | Z | X | C | V | B | N | M | , | . | / | RSHIFT | UP | 1 | 2 | 3 | |
+ +--------------------------------------------------------------------------+----|----|----| ENT+
+ |LCTRL| LGUI| LALT| SPACE | RALT| FN|RCTRL| LFT| DWN| RGT| 0 | . | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_BASE] = { { 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_HOME, KC_END, KC_PGUP, KC_PGDN, RGB_MOD },
+ { 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_NO, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO },
+ { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO }
+ },
+
+/* +--------------------------------------------------------------------------+-------------------+
+ | |SLCK|PAUS| |BRLR|BRIN|MPRV| PLY|MNXT|MUTE|VLDN|VLUP| | |PSCR| | | SLP| TOG|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | HUE|
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | |
+ +-------------------------------------------------------------------- +----|----|----| SPD+
+ | | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----|----+
+ | | | | | | | | | | | | | | | | | | |
+ +--------------------------------------------------------------------------+----|----|----| SAT+
+ | | LALT| LGUI| | | | | | | | | | |
+ +--------------------------------------------------------------------------+-------------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */
+ [_FL] = { { RESET, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, KC_PSCR, _______, _______, KC_SLEP, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, RGB_SPI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, KC_NO },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______, RGB_SAI },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, MO(_FL), _______, _______, _______, _______, _______, _______, KC_NO }
+ }
+
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/via_iso.json b/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/via_iso.json
new file mode 100644
index 000000000..71c945fc4
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/keymaps/default_iso/via_iso.json
@@ -0,0 +1,16 @@
+{
+ "name": "Keychron K4 ISO",
+ "vendorId": "0x3434",
+ "productId": "0xFE07",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 19},
+ "layouts": {
+ "keymap": [
+ ["0,0","0,1","0,2","0,3","0,4","0,5","0,6","0,7","0,8","0,9","0,10","0,11","0,12","0,13","0,14","0,15","0,16","0,17","0,18"],
+ ["1,0","1,1","1,2","1,3","1,4","1,5","1,6","1,7","1,8","1,9","1,10","1,11","1,12",{"w":2},"1,13","1,15","1,16","1,17","1,18"],
+ [{"w":1.5},"2,0","2,1","2,2","2,3","2,4","2,5","2,6","2,7","2,8","2,9","2,10","2,11","2,12",{"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25},"3,13","2,15","2,16","2,17",{"h":2},"2,18"],
+ [{"w":1.75},"3,0","3,1","3,2","3,3","3,4","3,5","3,6","3,7","3,8","3,9","3,10","3,11","3,12",{"x":1.25},"3,15","3,16","3,17"],
+ [{"w":1.25},"4,0","4,1","4,2","4,3","4,4","4,5","4,6","4,7","4,8","4,9","4,10","4,11",{"w":1.75},"4,13","4,14","4,15","4,16","4,17",{"h":2},"4,18"],
+ [{"w":1.25},"5,0",{"w":1.25},"5,1",{"w":1.25},"5,2",{"w":6.25},"5,6","5,10","5,11","5,12","5,13","5,14","5,15","5,16","5,17"] ]
+ }
+}
diff --git a/keyboards/keychron/k4/rgb/v2/optical/readme.md b/keyboards/keychron/k4/rgb/v2/optical/readme.md
new file mode 100644
index 000000000..b6ba0c95e
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K4v2
+
+K4v2 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/rgb/v2/optical:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v2/optical/rules.mk b/keyboards/keychron/k4/rgb/v2/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k4/rgb/v2/optical_via/config.h b/keyboards/keychron/k4/rgb/v2/optical_via/config.h
new file mode 100644
index 000000000..ebcc46430
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/optical_via/config.h
@@ -0,0 +1,3 @@
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
diff --git a/keyboards/keychron/k4/rgb/v2/optical_via/readme.md b/keyboards/keychron/k4/rgb/v2/optical_via/readme.md
new file mode 100644
index 000000000..d963d7965
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K4v2
+
+K4v2 Optical RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/rgb/v2/optical_via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v2/optical_via/rules.mk b/keyboards/keychron/k4/rgb/v2/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k4/rgb/v2/readme.md b/keyboards/keychron/k4/rgb/v2/readme.md
new file mode 100644
index 000000000..7684c09ef
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/readme.md
@@ -0,0 +1,14 @@
+# Keychron K4
+
+Keychron K4 Gateron RGB V2
+
+Keyboard Maintainer: [Dimitris Mantzouranis](https://github.com/dexter93)
+Brought to you by: [SonixQMK](https://github.com/SonixQMK/qmk_firmware)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/rgb/v2:default_ansi
+ make keychron/k4/rgb/v2:default_iso
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v2/rules.mk b/keyboards/keychron/k4/rgb/v2/rules.mk
new file mode 100644
index 000000000..58c60bbd3
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/rules.mk
@@ -0,0 +1,20 @@
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k4/rgb/v2/v2.h b/keyboards/keychron/k4/rgb/v2/v2.h
new file mode 100644
index 000000000..4a3dc2f82
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/v2.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT_ansi( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, k1i, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2f, k2g, k2h, k2i, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3f, k3g, k3h, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, k4f, k4g, k4h, k4i, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g, k5h \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX, k1f, k1g, k1h, k1i}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f, k2g, k2h, k2i}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX, k3f, k3g, k3h, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e, k4f, k4g, k4h, k4i}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f, k5g, k5h, XXX} \
+}
+
+#define LAYOUT_iso( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, k1i, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3f, k3g, k3h, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, k4f, k4g, k4h, k4i, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g, k5h \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX, k1f, k1g, k1h, k1i}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, XXX, XXX, k2f, k2g, k2h, k2i}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX, k3f, k3g, k3h, XXX}, \
+ {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e, k4f, k4g, k4h, k4i}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f, k5g, k5h, XXX} \
+}
diff --git a/keyboards/keychron/k4/rgb/v2/via/config.h b/keyboards/keychron/k4/rgb/v2/via/config.h
new file mode 100644
index 000000000..ebcc46430
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/via/config.h
@@ -0,0 +1,3 @@
+#define LAYER_STATE_8BIT
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1200
diff --git a/keyboards/keychron/k4/rgb/v2/via/readme.md b/keyboards/keychron/k4/rgb/v2/via/readme.md
new file mode 100644
index 000000000..79c197f74
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K4v2
+
+K4v2 Gateron RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k4/v2/rgb/via:default
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k4/rgb/v2/via/rules.mk b/keyboards/keychron/k4/rgb/v2/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/keychron/k4/rgb/v2/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k6/keymaps/ansi/config.h b/keyboards/keychron/k6/keymaps/ansi/config.h
new file mode 100644
index 000000000..06b98996b
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/ansi/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0A
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k6/keymaps/ansi/keymap.c b/keyboards/keychron/k6/keymaps/ansi/keymap.c
new file mode 100644
index 000000000..e2fedf469
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/ansi/keymap.c
@@ -0,0 +1,81 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _WINDOWS,
+ _MAC,
+ _FN1,
+ _FN2,
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_WINDOWS] = { { 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_NO, RGB_MOD },
+ { 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_BSLASH, KC_NO, KC_HOME },
+ { 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_NO, KC_PGUP },
+ { 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, KC_UP, KC_PGDOWN },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RCTRL, MO(_FN1), MO(_FN2), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+ [_MAC] = { { 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_NO, RGB_MOD },
+ { 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_BSLASH, KC_NO, KC_HOME },
+ { 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_NO, KC_PGUP },
+ { 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, KC_UP, KC_PGDOWN },
+ { KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RCTRL, MO(_FN1), MO(_FN2), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+ [_FN1] = { { KC_GESC, KC_SLCK, KC_PAUS, KC_APP, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_T, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_INS, KC_DEL, KC_END, KC_NO, KC_NO, KC_PGDOWN },
+ { KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, KC_NO, KC_NO, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_MOD, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_PGDOWN },
+ { KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_VAD, RGB_HUI }
+ },
+ [_FN2] = { { KC_GESC, 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_NO, KC_PGUP },
+ { KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_T, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN },
+ { KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, KC_NO, KC_NO, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_MOD, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_PGDOWN },
+ { KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_VAD, RGB_HUI }
+ }
+};
+
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0: // macos/windows togggle
+ if(active){ //macos
+ layer_off(_WINDOWS);
+ layer_on(_MAC);
+ }
+ else{ //windows
+ layer_on(_WINDOWS);
+ layer_off(_MAC);
+ }
+ break;
+ }
+}
+
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ // debug_enable=true;
+ // debug_matrix=true;
+ // debug_keyboard=true;
+ // debug_mouse=true;
+}
diff --git a/keyboards/keychron/k6/keymaps/ansi/via_ansi.json b/keyboards/keychron/k6/keymaps/ansi/via_ansi.json
new file mode 100644
index 000000000..468399ae3
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/ansi/via_ansi.json
@@ -0,0 +1,16 @@
+{
+ "name": "Keychron K6 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE0A",
+ "lighting": "none",
+ "matrix": {"rows": 5, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0", "0,1", "0,2", "0,3", "0,4", "0,5", "0,6", "0,7", "0,8", "0,9", "0,10", "0,11", "0,12", {"w":2}, "0,13", "0,15"],
+ [{"w":1.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":1.5}, "1,13", "1,15"],
+ [{"w":1.75}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", {"w":2.25}, "2,13", "2,15"],
+ [{"w":2.25}, "3,0", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":1.75}, "3,13", "3,14", "3,15"],
+ [{"w":1.25}, "4,0", {"w":1.25}, "4,1", {"w":1.25}, "4,2", {"w":6.25}, "4,6", "4,10", "4,11", "4,12", "4,13", "4,14", "4,15"]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k6/keymaps/iso/config.h b/keyboards/keychron/k6/keymaps/iso/config.h
new file mode 100644
index 000000000..822b43757
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/iso/config.h
@@ -0,0 +1,6 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0B
+#define DEVICE_VER 0x0001
+
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/keychron/k6/keymaps/iso/keymap.c b/keyboards/keychron/k6/keymaps/iso/keymap.c
new file mode 100644
index 000000000..10063d712
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/iso/keymap.c
@@ -0,0 +1,115 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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 "keymap_swedish.h"
+#define _BL 0
+#define _FL 1
+#define _SL 2
+
+// 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.
+enum layer_names {
+ _BASE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* _BL
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ESC│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │       │PRT│
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │     │DEL│
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤
+ * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │    │PUP│
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │      │UP │PDN│
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │CTRL│ WIN│ALT │                        │ALT│FN1│FN2│LFT│DWN│RGT│
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
+ * Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_BL] = { { 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_NO, KC_PSCREEN },
+ { 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_NO, KC_DEL },
+ { 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, KC_NO, KC_PGUP },
+ { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_UP, KC_PGDN },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FL), MO(_SL), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+/* _FL
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ │HUD│HUI│ │  │VAD│VAI│PRV│PLY│NXT│MTE│VL+│VL-│     │MOD│
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤
+ * │      │   │   │ │   │   │   │   │   │   │   │   │   │    │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │    │   │   │   │   │   │   │   │   │   │   │   │      │SPI│ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ │  │  │                        │ │FN1│FN2│ │SPD│ │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */
+ [_FL] = { { KC_NO, RGB_HUD, RGB_HUI, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, 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, KC_END, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPI, 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, RGB_TOG, RGB_SPD, RGB_M_P }
+ },
+/* _SL
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ │ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│     │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤
+ * │      │   │   │ │   │   │   │   │   │   │   │   │   │    │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │    │   │   │   │   │   │   │   │   │   │   │   │      │  │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ │  │  │                        │ │FN1│FN2│ │ │ │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */
+ [_SL] = { { 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_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_END, 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, 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 }
+ }
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k6/keymaps/iso/via_iso.json b/keyboards/keychron/k6/keymaps/iso/via_iso.json
new file mode 100644
index 000000000..08594a7bd
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/iso/via_iso.json
@@ -0,0 +1,16 @@
+{
+ "name": "Keychron K6 ISO",
+ "vendorId": "0x3434",
+ "productId": "0xFE0B",
+ "lighting": "none",
+ "matrix": {"rows": 5, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0", "0,1", "0,2", "0,3", "0,4", "0,5", "0,6", "0,7", "0,8", "0,9", "0,10", "0,11", "0,12", {"w":2}, "0,13", "0,15"],
+ [{"w":1.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25}, "2,13", "1,15"],
+ [{"w":1.75}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"x": 1.25 }, "2,15"],
+ [{"w":1.25}, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":1.75}, "3,13", "3,14", "3,15"],
+ [{"w":1.25}, "4,0", {"w":1.25}, "4,1", {"w":1.25}, "4,2", {"w":6.25}, "4,6", "4,10", "4,11", "4,12", "4,13", "4,14", "4,15"]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k6/keymaps/stdvar/config.h b/keyboards/keychron/k6/keymaps/stdvar/config.h
new file mode 100644
index 000000000..94386a23d
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/stdvar/config.h
@@ -0,0 +1,24 @@
+//#define RGB_MATRIX_ENABLE 1
+//#define RGB_MATRIX_KEYPRESSES
+//#define RGB_MATRIX_LED_PROCESS_LIMIT 0
+//#define RGB_MATRIX_LED_FLUSH_LIMIT 0 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
+//#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
+#define RGB_MATRIX_STARTUP_HUE 127 // Sets the default hue value, if none has been set
+#define RGB_MATRIX_STARTUP_SAT 0 // Sets the default saturation value, if none has been set
+#define RGB_MATRIX_STARTUP_VAL 255 // Sets the default brightness value, if none has been set
+#define RGB_MATRIX_STARTUP_SPD 63
+#define RGB_MATRIX_SPD_STEP 16
+
+#define SLEEP_LED_MODE_ANIMATION RGB_MATRIX_BREATHING
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0B
+#define DEVICE_VER 0x0001
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define TAPPING_TERM 200
+#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */
+#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
+
+#define FORCE_NKRO
diff --git a/keyboards/keychron/k6/keymaps/stdvar/keymap.c b/keyboards/keychron/k6/keymaps/stdvar/keymap.c
new file mode 100644
index 000000000..0e72f0972
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/stdvar/keymap.c
@@ -0,0 +1,210 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+enum my_keycodes {
+ MAILFMT = SAFE_RANGE,
+ BTLDR,
+ BAR
+};
+
+typedef struct {
+ bool is_press_action;
+ uint8_t state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD,
+ DOUBLE_TAP,
+ DOUBLE_HOLD,
+ DOUBLE_SINGLE_TAP, // Send two single taps
+ TRIPLE_TAP,
+ TRIPLE_HOLD
+};
+
+// Tap dance enums
+enum {
+ X_CTL,
+ SOME_OTHER_DANCE
+};
+
+uint8_t cur_dance(qk_tap_dance_state_t *state);
+// For the x tap dance. Put it here so it can be used in any keymap
+void x_finished(qk_tap_dance_state_t *state, void *user_data);
+void x_reset(qk_tap_dance_state_t *state, void *user_data);
+
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN1,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
+ [_BASE] = { { 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_NO, 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_BSLASH, KC_NO, KC_END },
+ { KC_ENT, 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_NO, KC_INS },
+ { OSM(MOD_LSFT), KC_NO, KC_Z, TD(X_CTL), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, OSM(MOD_RSFT), KC_UP, KC_DEL },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RCTRL, KC_APP, MO(_FN1), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+ [_FN1] = { { KC_GESC, 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_NO, KC_PGUP },
+ { KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_T, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN },
+ { KC_NO, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, MAILFMT, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, KC_NO, BTLDR, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_MOD, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_PGDOWN },
+ { KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_VAD, RGB_HUI }
+ }
+};
+
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0: // macos/windows togggle
+ if(active){ //macos
+ //do something
+ //layer_off(_WINDOWS);
+ //layer_on(_MAC);
+ }
+ else{ //windows
+ //do something
+ //layer_on(_WINDOWS);
+ //layer_off(_MAC);
+ }
+ break;
+ }
+}
+
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ //debug_enable=true;
+ //debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MAILFMT:
+ if (record->event.pressed) {
+ // Do something when pressed
+ SEND_STRING(SS_TAP(X_LALT) SS_DELAY(100) "H" SS_DELAY(100) "F" SS_DELAY(100) "F" SS_DELAY(100) "Courier" SS_DELAY(100) SS_TAP(X_ENT));
+ SEND_STRING(SS_TAP(X_LALT) SS_DELAY(100) "H" SS_DELAY(100) "F" SS_DELAY(100) "S" SS_DELAY(100) "8" SS_DELAY(100) SS_TAP(X_ENT));
+ } else {
+ // Do something else when release
+ }
+ break;
+ case BTLDR:
+ bootloader_jump();
+ break;
+ }
+ return true;
+}
+
+/* Return an integer that corresponds to what kind of tap dance should be executed.
+ *
+ * How to figure out tap dance state: interrupted and pressed.
+ *
+ * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit
+ * under the tapping term. This is typically indicitive that you are trying to "tap" the key.
+ *
+ * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term
+ * has ended, but the key is still being pressed down. This generally means the key is being "held".
+ *
+ * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
+ * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters.
+ * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters.
+ *
+ * Good places to put an advanced tap dance:
+ * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon
+ *
+ * Criteria for "good placement" of a tap dance key:
+ * Not a key that is hit frequently in a sentence
+ * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or
+ * in a web form. So 'tab' would be a poor choice for a tap dance.
+ * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
+ * letter 'p', the word 'pepper' would be quite frustating to type.
+ *
+ * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
+ *
+ */
+uint8_t cur_dance(qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ // Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
+ else return SINGLE_HOLD;
+ } else if (state->count == 2) {
+ // DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
+ // action when hitting 'pp'. Suggested use case for this return value is when you want to send two
+ // keystrokes of the key, and not the 'double tap' action/macro.
+ //if (state->interrupted) return DOUBLE_SINGLE_TAP;
+ if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+
+ // Assumes no one is trying to type the same letter three times (at least not quickly).
+ // If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
+ // an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
+ if (state->count == 3) {
+ if (state->interrupted || !state->pressed) return TRIPLE_TAP;
+ else return TRIPLE_HOLD;
+ } else return 8; // Magic number. At some point this method will expand to work for more presses
+}
+
+// Create an instance of 'tap' for the 'x' tap dance.
+static tap xtap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+void x_finished(qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code(KC_X); break;
+ case SINGLE_HOLD: register_code(KC_LCTRL); break;
+ case DOUBLE_TAP:
+ register_mods(MOD_BIT(KC_LCTRL));
+ register_code(KC_X);
+ break;
+ case DOUBLE_HOLD: register_code(KC_LALT); break;
+ // Last case is for fast typing. Assuming your key is `f`:
+ // For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
+ // In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
+ case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
+ }
+}
+
+void x_reset(qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code(KC_X); break;
+ case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
+ case DOUBLE_TAP:
+ unregister_mods(MOD_BIT(KC_LCTRL));
+ unregister_code(KC_X);
+ break;
+ case DOUBLE_HOLD: unregister_code(KC_LALT);
+ case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
+ }
+ xtap_state.state = 0;
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)
+};
diff --git a/keyboards/keychron/k6/keymaps/stdvar/rules.mk b/keyboards/keychron/k6/keymaps/stdvar/rules.mk
new file mode 100644
index 000000000..e5ddcae8d
--- /dev/null
+++ b/keyboards/keychron/k6/keymaps/stdvar/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/keychron/k6/rgb/config.h b/keyboards/keychron/k6/rgb/config.h
new file mode 100644
index 000000000..c45c71728
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/config.h
@@ -0,0 +1,43 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+#define MANUFACTURER Keychron
+#define PRODUCT K6 RGB
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 16
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_ROW_PINS { D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D4 }
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B9
+#define LED_PIN_ON_STATE 1
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
diff --git a/keyboards/keychron/k6/rgb/config_led.c b/keyboards/keychron/k6/rgb/config_led.c
new file mode 100644
index 000000000..449c53a98
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/config_led.c
@@ -0,0 +1,67 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+#ifdef KEYMAP_ISO
+// readability
+#define NA NO_LED
+/* ISO keymap LEDs */
+/* Screenprint on the back of the pcb
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ 1 │ 6 │10 │15 │19 │23 │27 │32 │36 │40 │44 │49 │54 │  57   │64 │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │  2  │ 7 │11 │16 │20 │24 │28 │33 │37 │41 │45 │50 │55 │     │65 │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐59  ├───┤
+ * │  3   │ 8 │12 │17 │21 │25 │29 │34 │38 │42 │46 │51 │58 │    │66 │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │ 4  │69 │13 │18 │22 │26 │30 │35 │39 │43 │47 │52 │  60  │62 │67 │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ 5 │ 9 │ 14 │           31           │48 │53 │56 │61 │63 │68 │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
+ */
+led_config_t g_led_config = { {
+{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NA, 14 },
+{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NA, NA, 28 },
+{ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NA, 43 },
+{ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NA, 56, 57, 58 },
+{ 59, 60, 61, NA, NA, NA, 62, NA, NA, NA, 63, 64, 65, 66, 67, 68 }
+}, {
+ {1 , 0}, {14 , 0}, {29 , 0}, {44 , 0}, {59 , 0}, {74 , 0}, {89 , 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {224, 0},
+ {3 , 16}, {16 , 16}, {32 , 16}, {32 , 16}, {48 , 16}, {64 , 16}, {80 , 16}, {96 , 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {224, 16},
+ {5 , 32}, {19 , 48}, {34 , 48}, {48 , 48}, {63 , 48}, {78 , 48}, {92 , 48}, {107, 48}, {121, 48}, {136, 48}, {151, 48}, {165, 48}, {179, 32}, {194, 32}, {224, 32},
+ {2 , 48}, {17 , 32}, {32 , 32}, {47 , 32}, {61 , 32}, {76 , 32}, {91 , 32}, {106, 32}, {120, 32}, {135, 32}, {150, 32}, {165, 32}, {194, 48}, {209, 48}, {224, 48},
+ {2 , 64}, {16 , 64}, {29 , 64}, {80 , 64}, {149, 64}, {164, 64}, {179, 64}, {194, 64}, {209, 64}, {224, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+} };
+#else
+/* ANSI keymap LEDs */
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, 14 },
+ { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, NO_LED, 29 },
+ { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, NO_LED, 43 },
+ { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED, 55, 56, 57 },
+ { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 }
+ },
+ {
+ {8, 6}, {22, 6}, {35, 6}, {49, 6}, {63, 6}, {77, 6}, {91, 6}, {105, 6}, {119, 6}, {133, 6}, {146, 6}, {160, 6}, {174, 6}, {195, 6}, {216, 6},
+ {11, 19}, {29, 19}, {43, 19}, {56, 19}, {70, 19}, {84, 19}, {98, 19}, {112, 19}, {126, 19}, {140, 19}, {154, 19}, {168, 19}, {181, 19}, {199, 19}, {216, 19},
+ {13, 31}, {32, 31}, {46, 31}, {60, 31}, {73, 31}, {87, 31}, {101, 31}, {115, 31}, {129, 31}, {143, 31}, {157, 31}, {171, 31}, {194, 31}, {216, 31},
+ {17, 44}, {39, 44}, {53, 44}, {67, 44}, {81, 44}, {95, 44}, {108, 44}, {122, 44}, {136, 44}, {150, 44}, {164, 44}, {184, 44}, {202, 44}, {216, 44},
+ {9, 56}, {27, 56}, {44, 56}, {95, 56}, {147, 56}, {161, 56}, {175, 56}, {189, 56}, {202, 56}, {216, 56}
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+#endif
+#endif
diff --git a/keyboards/keychron/k6/rgb/config_led.h b/keyboards/keychron/k6/rgb/config_led.h
new file mode 100644
index 000000000..c83914df4
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/config_led.h
@@ -0,0 +1,39 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+#include <config.h>
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+//note how ROW pins are assined in the following sequence top down row1 RBG, row2 RBG and so on
+#define LED_MATRIX_ROW_PINS { C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifdef KEYMAP_ISO
+ #define DRIVER_LED_TOTAL (69)
+#else
+ #define DRIVER_LED_TOTAL (68)
+#endif
+
diff --git a/keyboards/keychron/k6/rgb/info.json b/keyboards/keychron/k6/rgb/info.json
new file mode 100644
index 000000000..1b0251a75
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "K6 Gateron RGB Nordic ISO",
+ "url": "https://www.keychron.com/collections/keychron-iso-keyboard-collection/products/keychron-k6-wireless-mechanical-keyboard-nordic-iso-layout",
+ "maintainer": "jedifindtrick",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"esc", "x":0, "y":0}, {"label":"1 !", "x":1, "y":0}, {"label":"2 @", "x":2, "y":0}, {"label":"3 #", "x":3, "y":0}, {"label":"4 $", "x":4, "y":0}, {"label":"5 %", "x":5, "y":0}, {"label":"6 &", "x":6, "y":0}, {"label":"7 /", "x":7, "y":0}, {"label":"8 (", "x":8, "y":0}, {"label":"9 )", "x":9, "y":0}, {"label":"0 =", "x":10, "y":0}, {"label":"+ ?", "x":11, "y":0}, {"label":"´ `", "x":12, "y":0}, {"label":"backspace", "x":13, "y":0, "w":2}, {"label":"rgb", "x":15, "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":"home", "x":15, "y":1}, {"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}, {"label":"enter", "x":13.75, "y":3, "w":2.25}, {"label":"page up", "x":15, "y":3}, {"label":"shift", "x":0, "y":4, "w":1.25}, {"label":"< >", "x":1.25, "y":4}, {"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":"up", "x":14, "y":4}, {"label":"page down", "x":15, "y":4}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"cmd", "x":2.5, "y":5, "w":1.25}, {"label":"space", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn1", "x":11, "y":5}, {"label":"fn2", "x":12, "y":5}, {"label":"left", "x":13, "y":5}, {"label":"down", "x":14, "y":5}, {"label":"right", "x":15, "y":5}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k6/rgb/optical/readme.md b/keyboards/keychron/k6/rgb/optical/readme.md
new file mode 100644
index 000000000..b86c2da00
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K6
+
+K6 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k6/rgb/optical:ansi
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k6/rgb/optical/rules.mk b/keyboards/keychron/k6/rgb/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k6/rgb/optical_via/readme.md b/keyboards/keychron/k6/rgb/optical_via/readme.md
new file mode 100644
index 000000000..82a46f645
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K6
+
+K6 Optical Hotswap RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k6/rgb/optical_via:ansi
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k6/rgb/optical_via/rules.mk b/keyboards/keychron/k6/rgb/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k6/rgb/readme.md b/keyboards/keychron/k6/rgb/readme.md
new file mode 100644
index 000000000..e09535da9
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/readme.md
@@ -0,0 +1,17 @@
+## Keychron K6
+
+Keychron K6 RGB (Sonix SN32F248B)
+
+Layout by:
+[ISO] [Alexander Frank](https://github.com/jedifindtrick)
+[ANSI] [rus] (https://github.com/stdvar)
+
+Based on Redragon K566 by: [Adam Honse](https://github.com/CalcProgrammer1), Kemove DK63 by: [Stephen Peery](https://github.com/smp4488) and Keychron K4 by: [Dimitris Mantzouranis](https://github.com/dexter93)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k6/rgb:iso
+ make keychron/k6/rgb:ansi
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k6/rgb/rgb.h b/keyboards/keychron/k6/rgb/rgb.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/rgb.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/keychron/k6/rgb/rules.mk b/keyboards/keychron/k6/rgb/rules.mk
new file mode 100644
index 000000000..a6be11d31
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/rules.mk
@@ -0,0 +1,32 @@
+# project specific files
+SRC = ../../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = yes
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k6/rgb/via/readme.md b/keyboards/keychron/k6/rgb/via/readme.md
new file mode 100644
index 000000000..4dea24e49
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/via/readme.md
@@ -0,0 +1,15 @@
+# Keychron K6
+
+K6 Gateron RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k6/rgb/via:ansi
+
+For default ISO:
+
+ make keychron/k6/rgb/via:iso
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k6/rgb/via/rules.mk b/keyboards/keychron/k6/rgb/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/keychron/k6/rgb/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k6/white/config.h b/keyboards/keychron/k6/white/config.h
new file mode 100644
index 000000000..115024779
--- /dev/null
+++ b/keyboards/keychron/k6/white/config.h
@@ -0,0 +1,83 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include <config.h>
+
+#define MANUFACTURER Keychron
+#define PRODUCT Keychron K6 White
+
+#define WAIT_FOR_USB
+#define USB_MAX_POWER_CONSUMPTION 100
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15 }
+#define MATRIX_ROW_PINS { C4, C5, C6, C7, C8 }
+
+/* LED matrix */
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 1
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C2, D4, C9 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifdef KEYMAP_ISO
+ #define DRIVER_LED_TOTAL (69)
+#else
+ #define DRIVER_LED_TOTAL (68)
+#endif
+
+/* Backlight configuration */
+#define RGB_MATRIX_VAL_STEP 32
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+
+/* Connects each switch in the dip switch to the GPIO pin of the MCU */
+#define DIP_SWITCH_PINS { D5, D6 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B3
+#define LED_PIN_ON_STATE 1
+
+/* Enable NKRO by default */
+#define FORCE_NKRO
+
+/* Disable the following animation because they are not interesting in monochrome */
+#define DISABLE_RGB_MATRIX_ALPHAS_MODS
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define DISABLE_RGB_MATRIX_BAND_SAT
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+#define DISABLE_RGB_MATRIX_CYCLE_ALL
+#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define DISABLE_RGB_MATRIX_DUAL_BEACON
+
+/* TODO: Disabled the following animation because they crash the keyboard. Probably due to a too small stack */
+#define DISABLE_RGB_MATRIX_RAINDROPS
+#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
diff --git a/keyboards/keychron/k6/white/config_led.c b/keyboards/keychron/k6/white/config_led.c
new file mode 100644
index 000000000..7f4906b18
--- /dev/null
+++ b/keyboards/keychron/k6/white/config_led.c
@@ -0,0 +1,74 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#ifdef KEYMAP_ISO
+// readability
+#define NA NO_LED
+/* ISO keymap LEDs */
+/* Screenprint on the back of the pcb
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ 1 │ 6 │10 │15 │19 │23 │27 │32 │36 │40 │44 │49 │54 │  57   │64 │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │  2  │ 7 │11 │16 │20 │24 │28 │33 │37 │41 │45 │50 │55 │     │65 │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐59  ├───┤
+ * │  3   │ 8 │12 │17 │21 │25 │29 │34 │38 │42 │46 │51 │58 │    │66 │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │ 4  │69 │13 │18 │22 │26 │30 │35 │39 │43 │47 │52 │  60  │62 │67 │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ 5 │ 9 │ 14 │           31           │48 │53 │56 │61 │63 │68 │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
+ */
+/// Force g_led_config into flash, because there is no space in RAM.
+/// This should be safe because g_led_config should never be written to.
+/// We cannot make g_led_config const, because rgb_matrix.h, exports it as mutable.
+__attribute__(( section(".rodata.g_led_config") ))
+led_config_t g_led_config = { {
+{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NA, 14 },
+{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NA, NA, 28 },
+{ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NA, 43 },
+{ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NA, 56, 57, 58 },
+{ 59, 60, 61, NA, NA, NA, 62, NA, NA, NA, 63, 64, 65, 66, 67, 68 }
+}, {
+ {1 , 0}, {14 , 0}, {29 , 0}, {44 , 0}, {59 , 0}, {74 , 0}, {89 , 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {224, 0},
+ {3 , 16}, {16 , 16}, {32 , 16}, {32 , 16}, {48 , 16}, {64 , 16}, {80 , 16}, {96 , 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {224, 16},
+ {5 , 32}, {19 , 48}, {34 , 48}, {48 , 48}, {63 , 48}, {78 , 48}, {92 , 48}, {107, 48}, {121, 48}, {136, 48}, {151, 48}, {165, 48}, {179, 32}, {194, 32}, {224, 32},
+ {2 , 48}, {17 , 32}, {32 , 32}, {47 , 32}, {61 , 32}, {76 , 32}, {91 , 32}, {106, 32}, {120, 32}, {135, 32}, {150, 32}, {165, 32}, {194, 48}, {209, 48}, {224, 48},
+ {2 , 64}, {16 , 64}, {29 , 64}, {80 , 64}, {149, 64}, {164, 64}, {179, 64}, {194, 64}, {209, 64}, {224, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+} };
+#else
+/* ANSI keymap LEDs */
+/// Force g_led_config into flash, because there is no space in RAM.
+/// This should be safe because g_led_config should never be written to.
+/// We cannot make g_led_config const, because rgb_matrix.h, exports it as mutable.
+__attribute__(( section(".rodata.g_led_config") ))
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, 14 },
+ { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, NO_LED, 29 },
+ { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, NO_LED, 43 },
+ { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED, 55, 56, 57 },
+ { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 }
+ },
+ {
+ {8, 6}, {22, 6}, {35, 6}, {49, 6}, {63, 6}, {77, 6}, {91, 6}, {105, 6}, {119, 6}, {133, 6}, {146, 6}, {160, 6}, {174, 6}, {195, 6}, {216, 6},
+ {11, 19}, {29, 19}, {43, 19}, {56, 19}, {70, 19}, {84, 19}, {98, 19}, {112, 19}, {126, 19}, {140, 19}, {154, 19}, {168, 19}, {181, 19}, {199, 19}, {216, 19},
+ {13, 31}, {32, 31}, {46, 31}, {60, 31}, {73, 31}, {87, 31}, {101, 31}, {115, 31}, {129, 31}, {143, 31}, {157, 31}, {171, 31}, {194, 31}, {216, 31},
+ {17, 44}, {39, 44}, {53, 44}, {67, 44}, {81, 44}, {95, 44}, {108, 44}, {122, 44}, {136, 44}, {150, 44}, {164, 44}, {184, 44}, {202, 44}, {216, 44},
+ {9, 56}, {27, 56}, {44, 56}, {95, 56}, {147, 56}, {161, 56}, {175, 56}, {189, 56}, {202, 56}, {216, 56}
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+#endif
+#endif
diff --git a/keyboards/keychron/k6/white/rand.c b/keyboards/keychron/k6/white/rand.c
new file mode 100644
index 000000000..a1096bbe2
--- /dev/null
+++ b/keyboards/keychron/k6/white/rand.c
@@ -0,0 +1,31 @@
+// Small rand() implementation
+//
+// The libc rand implementation takes to much flash space, so an smaller rand() function is used.
+#include "quantum.h"
+
+int rand(void)
+{
+ // static unsigned int z4;
+ unsigned int z1, z2, z3, z4;
+ int r;
+ unsigned int b;
+
+ z1 = timer_read32();
+ z2 = 12345;
+ z3 = 12345;
+ z4 = z1 << 8;
+
+ b = ((z1 << 6) ^ z1) >> 13;
+ z1 = ((z1 & 4294967294U) << 18) ^ b;
+ b = ((z2 << 2) ^ z2) >> 27;
+ z2 = ((z2 & 4294967288U) << 2) ^ b;
+ b = ((z3 << 13) ^ z3) >> 21;
+ z3 = ((z3 & 4294967280U) << 7) ^ b;
+ b = ((z4 << 3) ^ z4) >> 12;
+ z4 = ((z4 & 4294967168U) << 13) ^ b;
+
+ r = z1 ^ z2 ^ z3 ^ z4;
+ // z4 = r;
+
+ return r;
+}
diff --git a/keyboards/keychron/k6/white/readme.md b/keyboards/keychron/k6/white/readme.md
new file mode 100644
index 000000000..3ea140422
--- /dev/null
+++ b/keyboards/keychron/k6/white/readme.md
@@ -0,0 +1,11 @@
+# Keychron K6
+
+K4 Gateron White backlight v1
+
+Hardware Supported: SN32F260
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k6_white:ansi
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k6/white/rules.mk b/keyboards/keychron/k6/white/rules.mk
new file mode 100644
index 000000000..66c2444f1
--- /dev/null
+++ b/keyboards/keychron/k6/white/rules.mk
@@ -0,0 +1,29 @@
+# project specific files
+SRC += rand.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F268F
+
+# Build Options
+# comment out to disable the options.
+#
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+EXTRAKEY_ENABLE = yes # Audio control and System control
+NKRO_ENABLE = yes # USB Nkey Rollover
+DIP_SWITCH_ENABLE = yes
+
+# Custom Key and LED matrix handling
+CUSTOM_MATRIX = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F26x
+
+# process stack size of 0x1c0 crashes during SEND_STRING
+USE_EXCEPTIONS_STACKSIZE = 0x180
+USE_PROCESS_STACKSIZE = 0x210
+
+# Reduce code size
+USE_PROCESS_STACKSIZE = 0x1E0
+USE_EXCEPTIONS_STACKSIZE = 0xF0 \ No newline at end of file
diff --git a/keyboards/keychron/k6/white/white.c b/keyboards/keychron/k6/white/white.c
new file mode 100644
index 000000000..648e7c57c
--- /dev/null
+++ b/keyboards/keychron/k6/white/white.c
@@ -0,0 +1,33 @@
+/* Copyright 2021 IsaacDynamo
+ *
+ * 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 "white.h"
+
+void suspend_power_down_kb(void) {
+ // Suspend backlight
+ rgb_matrix_set_suspend_state(true);
+
+ suspend_power_down_user();
+}
+
+/// TODO: Clean-up workaround
+/// Currently the suspend_wakeup_init_kb() has issues. See https://github.com/SonixQMK/qmk_firmware/issues/80
+/// A workaround is to use housekeeping_task_kb() instead.
+void housekeeping_task_kb(void) {
+ // Restore backlight
+ rgb_matrix_set_suspend_state(false);
+
+ housekeeping_task_user();
+}
diff --git a/keyboards/keychron/k6/white/white.h b/keyboards/keychron/k6/white/white.h
new file mode 100644
index 000000000..99b0ccee2
--- /dev/null
+++ b/keyboards/keychron/k6/white/white.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/keychron/k7/keymaps/ansi/config.h b/keyboards/keychron/k7/keymaps/ansi/config.h
new file mode 100644
index 000000000..926692822
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/ansi/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0C
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k7/keymaps/ansi/keymap.c b/keyboards/keychron/k7/keymaps/ansi/keymap.c
new file mode 100644
index 000000000..add17ace4
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/ansi/keymap.c
@@ -0,0 +1,78 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN1,
+ _FN2,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
+ [_BASE] = { { 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, RGB_MOD },
+ { 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_BSLASH, KC_HOME },
+ { 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_PGUP },
+ { 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_UP, KC_PGDOWN },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCTRL, MO(_FN1), MO(_FN2), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+ [_FN1] = { { KC_GESC, KC_SLCK, KC_PAUS, KC_APP, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_PGUP },
+ { KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_T, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_INS, KC_DEL, KC_END, KC_NO, KC_PGDOWN },
+ { KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, KC_NO, KC_NO, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_MOD, KC_NO, KC_NO, RGB_VAI, KC_PGDOWN },
+ { KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_VAD, RGB_HUI }
+ },
+ [_FN2] = { { KC_GESC, 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_PGUP },
+ { KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_T, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN },
+ { KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, KC_NO, KC_NO, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_MOD, KC_NO, KC_NO, RGB_VAI, KC_PGDOWN },
+ { KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_VAD, RGB_HUI }
+ }
+};
+
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ //debug_enable=true;
+ //debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k7/keymaps/ansi/via_ansi.json b/keyboards/keychron/k7/keymaps/ansi/via_ansi.json
new file mode 100644
index 000000000..5e5590659
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/ansi/via_ansi.json
@@ -0,0 +1,16 @@
+{
+ "name": "Keychron K7 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE0C",
+ "lighting": "none",
+ "matrix": {"rows": 5, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0", "0,1", "0,2", "0,3", "0,4", "0,5", "0,6", "0,7", "0,8", "0,9", "0,10", "0,11", "0,12", {"w":2}, "0,13", "0,15"],
+ [{"w":1.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w":1.5}, "1,13", "1,15"],
+ [{"w":1.75}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", {"w":2.25}, "2,13", "2,15"],
+ [{"w":2.25}, "3,0", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":1.75}, "3,13", "3,14", "3,15"],
+ [{"w":1.25}, "4,0", {"w":1.25}, "4,1", {"w":1.25}, "4,2", {"w":6.25}, "4,6", "4,10", "4,11", "4,12", "4,13", "4,14", "4,15"]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k7/keymaps/iso/config.h b/keyboards/keychron/k7/keymaps/iso/config.h
new file mode 100644
index 000000000..942b3381a
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/iso/config.h
@@ -0,0 +1,6 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0D
+#define DEVICE_VER 0x0001
+
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/keychron/k7/keymaps/iso/keymap.c b/keyboards/keychron/k7/keymaps/iso/keymap.c
new file mode 100644
index 000000000..a59ae51aa
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/iso/keymap.c
@@ -0,0 +1,115 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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 "keymap_swedish.h"
+#define _BL 0
+#define _FL 1
+#define _SL 2
+
+// 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.
+enum layer_names {
+ _BASE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* _BL
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ESC│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ + │ ´ │       │PRT│
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Å │ ¨ │     │DEL│
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤
+ * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ ' │    │PUP│
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │      │UP │PDN│
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │CTRL│ WIN│ALT │                        │ALT│FN1│FN2│LFT│DWN│RGT│
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
+ * Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
+ [_BL] = { { 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_PSCREEN },
+ { 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_DEL },
+ { 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, KC_PGUP },
+ { KC_LSFT, KC_NUBS, 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_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, MO(_FL), MO(_SL), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+/* _FL
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ │HUD│HUI│ │  │VAD│VAI│PRV│PLY│NXT│MTE│VL+│VL-│     │MOD│
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤
+ * │      │   │   │ │   │   │   │   │   │   │   │   │   │    │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │    │   │   │   │   │   │   │   │   │   │   │   │      │SPI│ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ │  │  │                        │ │FN1│FN2│ │SPD│ │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */
+ [_FL] = { { KC_NO, RGB_HUD, RGB_HUI, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, 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, KC_END, 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, KC_NO, KC_NO, RGB_SPI, 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_SPD, RGB_M_P }
+ },
+/* _SL
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ │ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│     │ │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤
+ * │      │   │   │ │   │   │   │   │   │   │   │   │   │    │ │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │    │   │   │   │   │   │   │   │   │   │   │   │      │  │ │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ │  │  │                        │ │FN1│FN2│ │ │ │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */
+ [_SL] = { { 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_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_END, 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, 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 }
+ }
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k7/keymaps/iso/via_iso.json b/keyboards/keychron/k7/keymaps/iso/via_iso.json
new file mode 100644
index 000000000..9939187f4
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/iso/via_iso.json
@@ -0,0 +1,16 @@
+{
+ "name": "Keychron K7 ISO",
+ "vendorId": "0x3434",
+ "productId": "0xFE0D",
+ "lighting": "none",
+ "matrix": {"rows": 5, "cols": 16},
+ "layouts": {
+ "keymap": [
+ ["0,0", "0,1", "0,2", "0,3", "0,4", "0,5", "0,6", "0,7", "0,8", "0,9", "0,10", "0,11", "0,12", {"w":2}, "0,13", "0,15"],
+ [{"w":1.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25}, "2,13", "1,15"],
+ [{"w":1.75}, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"x": 1.25 }, "2,15"],
+ [{"w":1.25}, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", {"w":1.75}, "3,13", "3,14", "3,15"],
+ [{"w":1.25}, "4,0", {"w":1.25}, "4,1", {"w":1.25}, "4,2", {"w":6.25}, "4,6", "4,10", "4,11", "4,12", "4,13", "4,14", "4,15"]
+ ]
+ }
+}
diff --git a/keyboards/keychron/k7/keymaps/stdvar/config.h b/keyboards/keychron/k7/keymaps/stdvar/config.h
new file mode 100644
index 000000000..b4f083535
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/stdvar/config.h
@@ -0,0 +1,22 @@
+//#define RGB_MATRIX_ENABLE 1
+//#define RGB_MATRIX_KEYPRESSES
+//#define RGB_MATRIX_LED_PROCESS_LIMIT 0
+//#define RGB_MATRIX_LED_FLUSH_LIMIT 0 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
+//#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
+#define RGB_MATRIX_STARTUP_HUE 127 // Sets the default hue value, if none has been set
+#define RGB_MATRIX_STARTUP_SAT 0 // Sets the default saturation value, if none has been set
+#define RGB_MATRIX_STARTUP_VAL 255 // Sets the default brightness value, if none has been set
+#define RGB_MATRIX_STARTUP_SPD 63
+#define RGB_MATRIX_SPD_STEP 16
+
+#define SLEEP_LED_MODE_ANIMATION RGB_MATRIX_BREATHING
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0C
+#define DEVICE_VER 0x0001
+
+#define TAPPING_TERM 200
+#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */
+#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ \ No newline at end of file
diff --git a/keyboards/keychron/k7/keymaps/stdvar/keymap.c b/keyboards/keychron/k7/keymaps/stdvar/keymap.c
new file mode 100644
index 000000000..004de1f4c
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/stdvar/keymap.c
@@ -0,0 +1,213 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+enum my_keycodes {
+ MAILFMT = SAFE_RANGE,
+ BTLDR,
+ BAR
+};
+
+typedef struct {
+ bool is_press_action;
+ uint8_t state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD,
+ DOUBLE_TAP,
+ DOUBLE_HOLD,
+ DOUBLE_SINGLE_TAP, // Send two single taps
+ TRIPLE_TAP,
+ TRIPLE_HOLD
+};
+
+// Tap dance enums
+enum {
+ X_CTL,
+ SOME_OTHER_DANCE
+};
+
+uint8_t cur_dance(qk_tap_dance_state_t *state);
+// For the x tap dance. Put it here so it can be used in any keymap
+void x_finished(qk_tap_dance_state_t *state, void *user_data);
+void x_reset(qk_tap_dance_state_t *state, void *user_data);
+
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN1,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
+ [_BASE] = { { 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_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_BSLASH, KC_END },
+ { KC_ENT, 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_INS },
+ { KC_LSFT, KC_NO, KC_Z, TD(X_CTL), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), KC_UP, KC_DEL },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RCTRL, KC_APP, MO(_FN1), KC_LEFT, KC_DOWN, KC_RGHT }
+ },
+ [_FN1] = { { KC_GESC, 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_PGUP },
+ { KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_T, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN },
+ { KC_NO, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, MAILFMT, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_PGUP },
+ { KC_NO, KC_NO, BTLDR, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_RMOD, RGB_MOD, KC_NO, KC_NO, RGB_VAI, KC_PGDOWN },
+ { KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_VAD, RGB_HUI }
+ }
+};
+
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ //debug_enable=true;
+ //debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MAILFMT:
+ if (record->event.pressed) {
+ // Do something when pressed
+ SEND_STRING(SS_TAP(X_LALT) SS_DELAY(100) "H" SS_DELAY(100) "F" SS_DELAY(100) "F" SS_DELAY(100) "Courier" SS_DELAY(100) SS_TAP(X_ENT));
+ SEND_STRING(SS_TAP(X_LALT) SS_DELAY(100) "H" SS_DELAY(100) "F" SS_DELAY(100) "S" SS_DELAY(100) "8" SS_DELAY(100) SS_TAP(X_ENT));
+ } else {
+ // Do something else when release
+ }
+ break;
+ case BTLDR:
+ bootloader_jump();
+ break;
+ }
+ return true;
+}
+
+/* Return an integer that corresponds to what kind of tap dance should be executed.
+ *
+ * How to figure out tap dance state: interrupted and pressed.
+ *
+ * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit
+ * under the tapping term. This is typically indicitive that you are trying to "tap" the key.
+ *
+ * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term
+ * has ended, but the key is still being pressed down. This generally means the key is being "held".
+ *
+ * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
+ * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters.
+ * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters.
+ *
+ * Good places to put an advanced tap dance:
+ * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon
+ *
+ * Criteria for "good placement" of a tap dance key:
+ * Not a key that is hit frequently in a sentence
+ * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or
+ * in a web form. So 'tab' would be a poor choice for a tap dance.
+ * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
+ * letter 'p', the word 'pepper' would be quite frustating to type.
+ *
+ * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
+ *
+ */
+uint8_t cur_dance(qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) return SINGLE_TAP;
+ // Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
+ else return SINGLE_HOLD;
+ } else if (state->count == 2) {
+ // DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
+ // action when hitting 'pp'. Suggested use case for this return value is when you want to send two
+ // keystrokes of the key, and not the 'double tap' action/macro.
+ //if (state->interrupted) return DOUBLE_SINGLE_TAP;
+ if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+
+ // Assumes no one is trying to type the same letter three times (at least not quickly).
+ // If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add
+ // an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP'
+ if (state->count == 3) {
+ if (state->interrupted || !state->pressed) return TRIPLE_TAP;
+ else return TRIPLE_HOLD;
+ } else return 8; // Magic number. At some point this method will expand to work for more presses
+}
+
+// Create an instance of 'tap' for the 'x' tap dance.
+static tap xtap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+void x_finished(qk_tap_dance_state_t *state, void *user_data) {
+ xtap_state.state = cur_dance(state);
+ switch (xtap_state.state) {
+ case SINGLE_TAP: register_code(KC_X); break;
+ case SINGLE_HOLD: register_code(KC_LCTRL); break;
+ case DOUBLE_TAP:
+ register_mods(MOD_BIT(KC_LCTRL));
+ register_code(KC_X);
+ break;
+ case DOUBLE_HOLD: register_code(KC_LALT); break;
+ // Last case is for fast typing. Assuming your key is `f`:
+ // For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
+ // In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
+ case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X);
+ }
+}
+
+void x_reset(qk_tap_dance_state_t *state, void *user_data) {
+ switch (xtap_state.state) {
+ case SINGLE_TAP: unregister_code(KC_X); break;
+ case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
+ case DOUBLE_TAP:
+ unregister_mods(MOD_BIT(KC_LCTRL));
+ unregister_code(KC_X);
+ break;
+ case DOUBLE_HOLD: unregister_code(KC_LALT);
+ case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
+ }
+ xtap_state.state = 0;
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)
+};
diff --git a/keyboards/keychron/k7/keymaps/stdvar/rules.mk b/keyboards/keychron/k7/keymaps/stdvar/rules.mk
new file mode 100644
index 000000000..e5ddcae8d
--- /dev/null
+++ b/keyboards/keychron/k7/keymaps/stdvar/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/keychron/k7/rgb/config.h b/keyboards/keychron/k7/rgb/config.h
new file mode 100644
index 000000000..4478c8f92
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/config.h
@@ -0,0 +1,45 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+#define MANUFACTURER Keychron
+#define PRODUCT K7 RGB
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6 }
+#define MATRIX_ROW_PINS { D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D4 }
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B9
+#define LED_PIN_ON_STATE 1
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+#define FORCE_NKRO
diff --git a/keyboards/keychron/k7/rgb/config_led.c b/keyboards/keychron/k7/rgb/config_led.c
new file mode 100644
index 000000000..9919cbd91
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/config_led.c
@@ -0,0 +1,73 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+#ifdef KEYMAP_ISO
+/* ISO keymap LEDs */
+/* Screenprint on the back of the pcb
+ * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
+ * │ 1 │ 6 │10 │15 │19 │23 │27 │32 │36 │40 │44 │49 │54 │  57   │64 │
+ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
+ * │  2  │ 7 │11 │16 │20 │24 │28 │33 │37 │41 │45 │50 │55 │     │65 │
+ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐59  ├───┤
+ * │  3   │ 8 │12 │17 │21 │25 │29 │34 │38 │42 │46 │51 │58 │    │66 │
+ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤
+ * │ 4  │69 │13 │18 │22 │26 │30 │35 │39 │43 │47 │52 │  60  │62 │67 │
+ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
+ * │ 5 │ 9 │ 14 │           31           │48 │53 │56 │61 │63 │68 │
+ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
+ */
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
+ { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NO_LED, 28 },
+ { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 },
+ { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 },
+ { 59, 60, 61, NO_LED, NO_LED, NO_LED, 62, NO_LED, NO_LED, 63, 64, 65, 66, 67, 68 }
+ },
+ {
+ {1 , 0}, {14 , 0}, {29 , 0}, {44 , 0}, {59 , 0}, {74 , 0}, {89 , 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {194, 0}, {209, 0},
+ {3 , 16}, {16 , 16}, {32 , 16}, {32 , 16}, {48 , 16}, {64 , 16}, {80 , 16}, {96 , 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {209, 16},
+ {5 , 32}, {19 , 48}, {34 , 48}, {48 , 48}, {63 , 48}, {78 , 48}, {92 , 48}, {107, 48}, {121, 48}, {136, 48}, {151, 48}, {165, 48}, {179, 32}, {194, 32}, {209, 32},
+ {2 , 48}, {17 , 32}, {32 , 32}, {47 , 32}, {61 , 32}, {76 , 32}, {91 , 32}, {106, 32}, {120, 32}, {135, 32}, {150, 32}, {165, 32}, {179, 48}, {194, 48}, {209, 48},
+ {2 , 64}, {16 , 64}, {29 , 64}, {80 , 64}, {135, 64}, {164, 64}, {179, 64}, {179, 64}, {194, 64}, {209, 64}
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+
+#else
+/* ANSI keymap LEDs */
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
+ { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
+ { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
+ { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 }
+ },
+ {
+ {8, 6}, {22, 6}, {35, 6}, {49, 6}, {63, 6}, {77, 6}, {91, 6}, {105, 6}, {119, 6}, {133, 6}, {146, 6}, {160, 6}, {174, 6}, {195, 6}, {216, 6},
+ {11, 19}, {29, 19}, {43, 19}, {56, 19}, {70, 19}, {84, 19}, {98, 19}, {112, 19}, {126, 19}, {140, 19}, {154, 19}, {168, 19}, {181, 19}, {199, 19}, {216, 19},
+ {13, 31}, {32, 31}, {46, 31}, {60, 31}, {73, 31}, {87, 31}, {101, 31}, {115, 31}, {129, 31}, {143, 31}, {157, 31}, {171, 31}, {194, 31}, {216, 31},
+ {17, 44}, {39, 44}, {53, 44}, {67, 44}, {81, 44}, {95, 44}, {108, 44}, {122, 44}, {136, 44}, {150, 44}, {164, 44}, {184, 44}, {202, 44}, {216, 44},
+ {9, 56}, {27, 56}, {44, 56}, {95, 56}, {147, 56}, {161, 56}, {175, 56}, {189, 56}, {202, 56}, {216, 56}
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+
+#endif
+
+#endif
diff --git a/keyboards/keychron/k7/rgb/config_led.h b/keyboards/keychron/k7/rgb/config_led.h
new file mode 100644
index 000000000..782eb7a6a
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/config_led.h
@@ -0,0 +1,39 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+
+#include <config.h>
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+//note how ROW pins are assined in the following sequence top down row1 RBG, row2 RBG and so on
+#define LED_MATRIX_ROW_PINS { C4, C6, C5, C7, C9, C8, C10, C12, C11, C13, B13, C14, D3, B14, B15 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifdef KEYMAP_ISO
+ #define DRIVER_LED_TOTAL (69)
+#else
+ #define DRIVER_LED_TOTAL (68)
+#endif
diff --git a/keyboards/keychron/k7/rgb/info.json b/keyboards/keychron/k7/rgb/info.json
new file mode 100644
index 000000000..1e8d4299c
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "K7 RGB",
+ "url": "https://www.keychron.com/products/keychron-k7-ultra-slim-wireless-mechanical-keyboard",
+ "maintainer": "stdvar",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"esc", "x":0, "y":0}, {"label":"1 !", "x":1, "y":0}, {"label":"2 @", "x":2, "y":0}, {"label":"3 #", "x":3, "y":0}, {"label":"4 $", "x":4, "y":0}, {"label":"5 %", "x":5, "y":0}, {"label":"6 &", "x":6, "y":0}, {"label":"7 /", "x":7, "y":0}, {"label":"8 (", "x":8, "y":0}, {"label":"9 )", "x":9, "y":0}, {"label":"0 =", "x":10, "y":0}, {"label":"+ ?", "x":11, "y":0}, {"label":"´ `", "x":12, "y":0}, {"label":"backspace", "x":13, "y":0, "w":2}, {"label":"rgb", "x":15, "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":"home", "x":15, "y":1}, {"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}, {"label":"enter", "x":13.75, "y":3, "w":2.25}, {"label":"page up", "x":15, "y":3}, {"label":"shift", "x":0, "y":4, "w":1.25}, {"label":"< >", "x":1.25, "y":4}, {"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":"up", "x":14, "y":4}, {"label":"page down", "x":15, "y":4}, {"label":"control", "x":0, "y":5, "w":1.25}, {"label":"option", "x":1.25, "y":5, "w":1.25}, {"label":"cmd", "x":2.5, "y":5, "w":1.25}, {"label":"space", "x":3.75, "y":5, "w":6.25}, {"label":"cmd", "x":10, "y":5}, {"label":"fn1", "x":11, "y":5}, {"label":"fn2", "x":12, "y":5}, {"label":"left", "x":13, "y":5}, {"label":"down", "x":14, "y":5}, {"label":"right", "x":15, "y":5}]
+ }
+ }
+}
diff --git a/keyboards/keychron/k7/rgb/optical/readme.md b/keyboards/keychron/k7/rgb/optical/readme.md
new file mode 100644
index 000000000..c0545f03e
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/optical/readme.md
@@ -0,0 +1,11 @@
+# Keychron K7
+
+K7 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k7/rgb/optical:ansi
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k7/rgb/optical/rules.mk b/keyboards/keychron/k7/rgb/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k7/rgb/optical_via/readme.md b/keyboards/keychron/k7/rgb/optical_via/readme.md
new file mode 100644
index 000000000..4d2daaee2
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/optical_via/readme.md
@@ -0,0 +1,11 @@
+# Keychron K7
+
+K7 Optical RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k7/rgb/optical_via:ansi
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k7/rgb/optical_via/rules.mk b/keyboards/keychron/k7/rgb/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k7/rgb/readme.md b/keyboards/keychron/k7/rgb/readme.md
new file mode 100644
index 000000000..ea3563212
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/readme.md
@@ -0,0 +1,19 @@
+## Keychron K7
+
+Keychron K7 RGB (Sonix SN32F248B)
+
+Layout by:
+[ISO] [Alexander Frank](https://github.com/jedifindtrick)
+[ANSI] [rus] (https://github.com/stdvar)
+
+Based on Redragon K566 by: [Adam Honse](https://github.com/CalcProgrammer1), Kemove DK63 by: [Stephen Peery](https://github.com/smp4488) and Keychron K4 by: [Dimitris Mantzouranis](https://github.com/dexter93)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k7/rgb/optical:iso
+ make keychron/k7/rgb/optical:ansi
+ make keychron/k7/rgb:iso
+ make keychron/k7/rgb:ansi
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k7/rgb/rgb.h b/keyboards/keychron/k7/rgb/rgb.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/rgb.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/keychron/k7/rgb/rules.mk b/keyboards/keychron/k7/rgb/rules.mk
new file mode 100644
index 000000000..d6b5698c3
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/rules.mk
@@ -0,0 +1,32 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = yes
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = no
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k7/rgb/via/readme.md b/keyboards/keychron/k7/rgb/via/readme.md
new file mode 100644
index 000000000..8c6883066
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/via/readme.md
@@ -0,0 +1,15 @@
+# Keychron K7
+
+K7 Gateron RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k7/rgb/via:ansi
+
+For default ISO:
+
+ make keychron/k7/rgb/via:iso
+
+* * *
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k7/rgb/via/rules.mk b/keyboards/keychron/k7/rgb/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/keychron/k7/rgb/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keychron/k8/keymaps/ansi/config.h b/keyboards/keychron/k8/keymaps/ansi/config.h
new file mode 100644
index 000000000..7bc88c8f0
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/ansi/config.h
@@ -0,0 +1,4 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0E
+#define DEVICE_VER 0x0001 \ No newline at end of file
diff --git a/keyboards/keychron/k8/keymaps/ansi/k8_via_ansi.json b/keyboards/keychron/k8/keymaps/ansi/k8_via_ansi.json
new file mode 100644
index 000000000..13f5d15c6
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/ansi/k8_via_ansi.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K8 ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE0E",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 17},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x": 1}, "0,1", "0,2", "0,3", "0,4", {"x": 0.5}, "0,5", "0,6", "0,7", "0,8", {"x": 0.5}, "0,9", "0,10", "0,11", "0,12", {"x": 0.25}, "0,14", "0,15", "0,16"],
+ [{"y": 0.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w": 2}, "1,13", {"x": 0.25 }, "1,14", "1,15", "1,16"],
+ [{"w": 1.5 }, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"w": 1.5}, "2,13", { "x": 0.25 }, "2,14", "2,15", "2,16"],
+ [{"w": 1.75 }, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", { "w": 2.25 }, "3,13"],
+ [{"w": 2.25 }, "4,0", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", "4,11", {"w": 2.75 }, "4,13", {"x": 1.25 }, "4,15"],
+ [{"w": 1.25 }, "5,0", {"w": 1.25 }, "5,1", {"w": 1.25 }, "5,2", {"w": 6.25 }, "5,6", {"w": 1.25 }, "5,10", {"w": 1.25 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k8/keymaps/ansi/k8_via_ansi_optical.json b/keyboards/keychron/k8/keymaps/ansi/k8_via_ansi_optical.json
new file mode 100644
index 000000000..4df7303ce
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/ansi/k8_via_ansi_optical.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K8 Optical ANSI",
+ "vendorId": "0x3434",
+ "productId": "0xFE0E",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 17},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x": 1}, "0,2", "0,3", "0,4", "0,5", {"x": 0.5}, "0,6", "0,7", "0,8", "0,9", {"x": 0.5}, "0,10", "0,11", "0,12", "0,13", {"x": 0.25}, "0,14", "0,15", "0,16"],
+ [{"y": 0.5}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w": 2}, "1,13", {"x": 0.25 }, "1,14", "1,15", "1,16"],
+ [{"w": 1.5 }, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"w": 1.5}, "2,13", { "x": 0.25 }, "2,14", "2,15", "2,16"],
+ [{"w": 1.75 }, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", { "w": 2.25 }, "3,13"],
+ [{"w": 2.25 }, "4,0", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", "4,11", {"w": 2.75 }, "4,13", {"x": 1.25 }, "4,15"],
+ [{"w": 1.25 }, "5,0", {"w": 1.25 }, "5,1", {"w": 1.25 }, "5,2", {"w": 6.25 }, "5,6", {"w": 1.25 }, "5,10", {"w": 1.25 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k8/keymaps/ansi/keymap.c b/keyboards/keychron/k8/keymaps/ansi/keymap.c
new file mode 100644
index 000000000..9e5078cda
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/ansi/keymap.c
@@ -0,0 +1,117 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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
+
+// 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.
+enum layer_names {
+ _BASE = 0,
+ _FL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* +--------------------------------------------------------------------------+----------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|????|PAUS|
+ +--------------------------------------------------------------------------+------|----|----|
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|PGUP|
+ +--------------------------------------------------------------------------+------|----|----|
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | |DEL |END |PGDN|
+ +--------------------------------------------------------------------------+------|----|----|
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | |
+ +--------------------------------------------------------------------------+ |----| |
+ | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+------|----|----|
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +--------------------------------------------------------------------------+----------------+
+*/
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+#ifdef OPTICAL_MATRIX
+ [0] = { { KC_ESC, KC_NO, 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, TG(2), RGB_MODE_FORWARD},
+#else
+ [0] = { { 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_NO, KC_PSCR, TG(2), RGB_MODE_FORWARD},
+#endif
+ { 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_INS, KC_HOME, KC_PGUP},
+ { 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_DEL, KC_END, KC_PGDN},
+ { 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_NO, KC_NO, KC_NO},
+ { 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, KC_NO, KC_UP, KC_NO},
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT}
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+#ifdef OPTICAL_MATRIX
+ [1] = { { RESET, KC_NO, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, _______, _______, KC_PSCR, _______, RGB_TOG },
+#else
+ [1] = { { RESET, KC_SLCK, KC_PAUS, KC_APP, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, _______, _______, KC_NO, KC_PSCR, _______, RGB_TOG },
+#endif
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_SPI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO },
+ { _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_VOLU, KC_NO },
+ { _______, KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, RGB_MODE_REVERSE, KC_VOLD, RGB_MODE_FORWARD }
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [2] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, KC_P, KC_C, KC_E, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [3] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
+ }
+};
+
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ //debug_enable=true;
+ //debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
diff --git a/keyboards/keychron/k8/keymaps/ansi/rules.mk b/keyboards/keychron/k8/keymaps/ansi/rules.mk
new file mode 100644
index 000000000..cc1ba15f4
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/ansi/rules.mk
@@ -0,0 +1,14 @@
+# https://beta.docs.qmk.fm/developing-qmk/qmk-reference/getting_started_make_guide#rules-mk-options
+
+# AUTO_SHIFT_ENABLE = yes
+# MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes # Audio control and System control
+# MAGIC_ENABLE = yes
+# MAGIC_KEYCODE_ENABLE = yes
+
+# BOOTMAGIC_ENABLE = no # https://beta.docs.qmk.fm/using-qmk/hardware-features/feature_bootmagic
+# NKRO_ENABLE = no
+
+
+
+
diff --git a/keyboards/keychron/k8/keymaps/iso/config.h b/keyboards/keychron/k8/keymaps/iso/config.h
new file mode 100644
index 000000000..309d4c325
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/iso/config.h
@@ -0,0 +1,6 @@
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x3434
+#define PRODUCT_ID 0xFE0F
+#define DEVICE_VER 0x0001
+
+#define KEYMAP_ISO 1 \ No newline at end of file
diff --git a/keyboards/keychron/k8/keymaps/iso/k8_via_iso.json b/keyboards/keychron/k8/keymaps/iso/k8_via_iso.json
new file mode 100644
index 000000000..d0a0e4aef
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/iso/k8_via_iso.json
@@ -0,0 +1,17 @@
+{
+ "name": "Keychron K8 ISO",
+ "vendorId": "0x3434",
+ "productId": "0xFE0F",
+ "lighting": "none",
+ "matrix": {"rows": 6, "cols": 17},
+ "layouts": {
+ "keymap": [
+ ["0,0", {"x": 1}, "0,1", "0,2", "0,3", "0,4", {"x": 0.5}, "0,5", "0,6", "0,7", "0,8", {"x": 0.5}, "0,9", "0,10", "0,11", "0,12", {"x": 0.25}, "0,14", "0,15", "0,16"],
+ [{"y": 0.25}, "1,0", "1,1", "1,2", "1,3", "1,4", "1,5", "1,6", "1,7", "1,8", "1,9", "1,10", "1,11", "1,12", {"w": 2}, "1,13", {"x": 0.25 }, "1,14", "1,15", "1,16"],
+ [{"w": 1.5 }, "2,0", "2,1", "2,2", "2,3", "2,4", "2,5", "2,6", "2,7", "2,8", "2,9", "2,10", "2,11", "2,12", {"x":0.25,"w":1.25,"h":2,"w2":1.5,"h2":1,"x2":-0.25}, "3,13", { "x": 0.25 }, "2,14", "2,15", "2,16"],
+ [{"w": 1.75 }, "3,0", "3,1", "3,2", "3,3", "3,4", "3,5", "3,6", "3,7", "3,8", "3,9", "3,10", "3,11", "3,12"],
+ [{"w": 1.25 }, "4,0", "4,1", "4,2", "4,3", "4,4", "4,5", "4,6", "4,7", "4,8", "4,9", "4,10", "4,11", {"w": 2.75 }, "4,13", {"x": 1.25 }, "4,15"],
+ [{"w": 1.25 }, "5,0", {"w": 1.25 }, "5,1", {"w": 1.25 }, "5,2", {"w": 6.25 }, "5,6", {"w": 1.25 }, "5,10", {"w": 1.25 }, "5,11", {"w": 1.25 }, "5,12", {"w": 1.25 }, "5,13", {"x": 0.25 }, "5,14", "5,15", "5,16"]
+ ]
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k8/keymaps/iso/keymap.c b/keyboards/keychron/k8/keymaps/iso/keymap.c
new file mode 100644
index 000000000..b079212a5
--- /dev/null
+++ b/keyboards/keychron/k8/keymaps/iso/keymap.c
@@ -0,0 +1,97 @@
+/*
+Copyright 2020 Dimitris Mantzouranis
+
+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] = {
+
+
+/* +--------------------------------------------------------------------------+----------------+
+ | ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9| F10| F11| F12| | |PSCR|????|PAUS|
+ +--------------------------------------------------------------------------+------|----|----|
+ | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | |INS |SCRL|PGUP|
+ +--------------------------------------------------------------------------+------|----|----|
+ | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |DEL |END |PGDN|
+ +-------------------------------------------------------------------- RET |------|----|----|
+ | CAPSLCK | A | S | D | F | G | H | J | K | L | ; | ' | # | | |
+ +--------------------------------------------------------------------------+ |----| |
+ | LSHIFT | \ | Z | X | C | V | B | N | M | , | . | / | RSHIFT | | UP | |
+ +--------------------------------------------------------------------------+------|----|----|
+ |LCTRL| LGUI| LALT | SPACE | RALT| RGUI | FN | RCTRL | |LFT |DWN |RGT |
+ +--------------------------------------------------------------------------+----------------+
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [0] = { { 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_NO, KC_PSCR, KC_SLCK, KC__MUTE},
+ { 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_INS, KC_HOME, KC_PGUP},
+ { 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_DEL, KC_END, KC_PGDN},
+ { 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, KC_NO, KC_NO, KC_NO},
+ { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, KC_UP, KC_NO},
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT}
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [1] = { { RESET, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, KC_APP, KC_MY_COMPUTER, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, KC_VOLU, KC_VOLD, KC_NO, KC_PSCR, KC_SLEP, RGB_TOG },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_SAI, RGB_HUI },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAD, RGB_HUD },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, KC_VOLU, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, RGB_MODE_REVERSE, KC_VOLD, RGB_MODE_FORWARD }
+ },
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [2] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, _______, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______ }
+ },
+
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [3] = { { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_NO, _______, KC_NO },
+ { _______, _______, _______, KC_NO, KC_NO, KC_NO, _______, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______ }
+ }
+};
+void dip_switch_update_user(uint8_t index, bool active){
+ switch(index){
+ case 0:
+ if(active){ //BT mode
+// do stuff
+ }
+ else{ //Cable mode
+// do stuff
+ }
+ break;
+ case 1:
+ if(active){ // Win/Android mode
+// do stuff
+ }
+ else{ // Mac/iOS mode
+// do stuff
+ }
+ break;
+ }
+}
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ // debug_enable=true;
+ // debug_matrix=true;
+ // debug_keyboard=true;
+ // debug_mouse=true;
+}
diff --git a/keyboards/keychron/k8/rgb/config.h b/keyboards/keychron/k8/rgb/config.h
new file mode 100644
index 000000000..6ffbd1f7b
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/config.h
@@ -0,0 +1,45 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+ * Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+#define MANUFACTURER Keychron
+#define PRODUCT K8 RGB
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5, B6, B7, B8 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+// Connects each switch in the dip switch to the GPIO pin of the MCU
+#define DIP_SWITCH_PINS { D5, D6 }
+
+/* LED Status indicators */
+#define LED_CAPS_LOCK_PIN B12
+#define LED_PIN_ON_STATE 1
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+//#define FORCE_NKRO \ No newline at end of file
diff --git a/keyboards/keychron/k8/rgb/config_led.c b/keyboards/keychron/k8/rgb/config_led.c
new file mode 100644
index 000000000..ea0ab88bb
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/config_led.c
@@ -0,0 +1,56 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+#define XX NO_LED
+#ifdef KEYMAP_ISO
+/* ISO keymap LEDs */
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, XX, 13, 14, 15},
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32},
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49},
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, XX, XX, XX},
+ { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, XX, 76, XX, 77, XX},
+ { 78, 79, 80, XX, XX, XX, 81, XX, XX, XX, 82, 83, 84, 85, 86, 87, 88}
+}, {
+ {0 , 0}, {12 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {174, 0}, {187, 0}, {199, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {174, 13}, {187, 13}, {199, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {168, 26}, {174, 26}, {187, 26}, {199, 26},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {159, 38}, {166, 38},
+ {8 , 51}, {18 , 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {187, 51},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64}, {199, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+} };
+#else
+/* ANSI keymap LEDs */
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, XX, 13, 14, 15},
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32},
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49},
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, XX, 62, XX, XX, XX},
+ { 63, XX, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, XX, 74, XX, 75, XX},
+ { 76, 77, 78, XX, XX, XX, 79, XX, XX, XX, 80, 81, 82, 83, 84, 85, 86}
+}, {
+ {0 , 0}, {12 , 0}, {25 , 0}, {37 , 0}, {50 , 0}, {62 , 0}, {75 , 0}, {87 , 0}, {100, 0}, {112, 0}, {124, 0}, {137, 0}, {149, 0}, {174, 0}, {187, 0}, {199, 0},
+ {0 , 13}, {12 , 13}, {25 , 13}, {37 , 13}, {50 , 13}, {62 , 13}, {75 , 13}, {87 , 13}, {100, 13}, {112, 13}, {124, 13}, {137, 13}, {149, 13}, {168, 13}, {174, 13}, {187, 13}, {199, 13},
+ {3 , 26}, {19 , 26}, {31 , 26}, {44 , 26}, {56 , 26}, {68 , 26}, {81 , 26}, {93 , 26}, {106, 26}, {118, 26}, {131, 26}, {143, 26}, {156, 26}, {168, 26}, {174, 26}, {187, 26}, {199, 26},
+ {5 , 38}, {22 , 38}, {34 , 38}, {47 , 38}, {59 , 38}, {72 , 38}, {84 , 38}, {96 , 38}, {109, 38}, {121, 38}, {134, 38}, {146, 38}, {166, 38},
+ {8 , 51}, {28 , 51}, {40 , 51}, {53 , 51}, {65 , 51}, {78 , 51}, {90 , 51}, {103, 51}, {115, 51}, {128, 51}, {140, 51}, {157, 51}, {187, 51},
+ {2 , 64}, {17 , 64}, {33 , 64}, {79 , 64}, {124, 64}, {137, 64}, {149, 64}, {162, 64}, {174, 64}, {187, 64}, {199, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+} };
+#endif
+#endif
diff --git a/keyboards/keychron/k8/rgb/config_led.h b/keyboards/keychron/k8/rgb/config_led.h
new file mode 100644
index 000000000..3c2b5310b
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/config_led.h
@@ -0,0 +1,38 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@gmail.com>
+Copyright 2020 Dimitris Mantzouranis <d3xter93@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/>.
+*/
+
+#pragma once
+#include <config.h>
+
+// Backlight configuration
+
+//#define BACKLIGHT_LEVELS 17
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#ifdef KEYMAP_ISO
+#define DRIVER_LED_TOTAL (89)
+#else
+#define DRIVER_LED_TOTAL (87)
+#endif
diff --git a/keyboards/keychron/k8/rgb/info.json b/keyboards/keychron/k8/rgb/info.json
new file mode 100644
index 000000000..baca14e8d
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Keychron K8 Gateron RGB v1 ANSI",
+ "url": "https://www.keychron.com/products/keychron-k8-tenkeyless-wireless-mechanical-keyboard?variant=32018253021273",
+ "maintainer": "alex-dinh",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/keychron/k8/rgb/k8.h b/keyboards/keychron/k8/rgb/k8.h
new file mode 100644
index 000000000..e996bd32f
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/k8.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+// readability
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \
+ k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4f, \
+ k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g \
+) \
+{ \
+ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, XXX}, \
+ {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g}, \
+ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f, k2g}, \
+ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, XXX, XXX, XXX, XXX}, \
+ {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX}, \
+ {k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d k5e, k5f, k5g} \
+}
diff --git a/keyboards/keychron/k8/rgb/optical/readme.md b/keyboards/keychron/k8/rgb/optical/readme.md
new file mode 100644
index 000000000..db02a17cc
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/optical/readme.md
@@ -0,0 +1,12 @@
+# Keychron K8
+
+K8 Optical RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k8/rgb/optical:ansi
+
+* * *
+For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k8/rgb/optical/rules.mk b/keyboards/keychron/k8/rgb/optical/rules.mk
new file mode 100644
index 000000000..d33952600
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/optical/rules.mk
@@ -0,0 +1 @@
+OPT_DEFS += -DOPTICAL_MATRIX
diff --git a/keyboards/keychron/k8/rgb/optical_via/readme.md b/keyboards/keychron/k8/rgb/optical_via/readme.md
new file mode 100644
index 000000000..ea8ab5080
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/optical_via/readme.md
@@ -0,0 +1,12 @@
+# Keychron K8
+
+K8 Optical Hotswap RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k8/rgb/optical_via:ansi
+
+* * *
+For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k8/rgb/optical_via/rules.mk b/keyboards/keychron/k8/rgb/optical_via/rules.mk
new file mode 100644
index 000000000..8c67dc02e
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/optical_via/rules.mk
@@ -0,0 +1,2 @@
+OPT_DEFS += -DOPTICAL_MATRIX
+VIA_ENABLE = yes
diff --git a/keyboards/keychron/k8/rgb/readme.md b/keyboards/keychron/k8/rgb/readme.md
new file mode 100644
index 000000000..fb8e3c6ee
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/readme.md
@@ -0,0 +1,16 @@
+# Keychron K8
+
+K8 Gateron Hotswap RGB
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k8:ansi
+
+For default ISO:
+
+ make keychron/k8:iso
+
+* * *
+For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k8/rgb/rgb.h b/keyboards/keychron/k8/rgb/rgb.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/rgb.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/keychron/k8/rgb/rules.mk b/keyboards/keychron/k8/rgb/rules.mk
new file mode 100644
index 000000000..21e1449d6
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+DIP_SWITCH_ENABLE = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/keychron/k8/rgb/via/readme.md b/keyboards/keychron/k8/rgb/via/readme.md
new file mode 100644
index 000000000..598e174ec
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/via/readme.md
@@ -0,0 +1,16 @@
+# Keychron K8
+
+K8 Gateron Hotswap RGB with VIA support
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keychron/k8/via:ansi
+
+For default ISO:
+
+ make keychron/k8/rgb/via:iso
+
+* * *
+For more info and detailed flashing instructions, please visit https://github.com/alex-dinh/keychron-k8
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keychron/k8/rgb/via/rules.mk b/keyboards/keychron/k8/rgb/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/keychron/k8/rgb/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/marvo/kg938/boards/SN_SN32F240/board.c b/keyboards/marvo/kg938/boards/SN_SN32F240/board.c
new file mode 100644
index 000000000..a896aea21
--- /dev/null
+++ b/keyboards/marvo/kg938/boards/SN_SN32F240/board.c
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+ #if SN32_HAS_GPIOA
+ {VAL_GPIOA_MODE},
+ #endif
+ #if SN32_HAS_GPIOB
+ {VAL_GPIOB_MODE},
+ #endif
+ #if SN32_HAS_GPIOC
+ {VAL_GPIOC_MODE},
+ #endif
+ #if SN32_HAS_GPIOD
+ {VAL_GPIOD_MODE},
+ #endif
+};
+#endif
+
+static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
+
+extern void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ sn32_clock_init();
+}
+
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+// SN_GPIO0->MODE = 0xffff;
+// // setP0.0~P0.1, P0.6~P0.7, P0.10~P0.15 to input pull-up
+// SN_GPIO0->CFG = 0x000A0AA0;
+
+// // set P1.2~1.9, P1.12~P1.15 to input pull-up
+// SN_GPIO1->CFG = 0x00A0000A;
+
+// SN_GPIO2->MODE = 0xFFFF;
+// // set P2.4~P2.15 to input pull-up
+// SN_GPIO2->CFG = 0x000000AA;
+
+// // set P3.0~P3.1, P3.4~P3.8 to input pull-up
+// SN_GPIO3->CFG = 0xAAA800A0;
+
+ // Set led pins to output
+// SN_GPIO2->CFG = 0xFFFF;
+// SN_GPIO2->DATA = 0x0; // Set low
+
+ SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
+} \ No newline at end of file
diff --git a/keyboards/marvo/kg938/boards/SN_SN32F240/board.h b/keyboards/marvo/kg938/boards/SN_SN32F240/board.h
new file mode 100644
index 000000000..99a5982ef
--- /dev/null
+++ b/keyboards/marvo/kg938/boards/SN_SN32F240/board.h
@@ -0,0 +1,229 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Generic STM32_F303 Board
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_SN32_F240
+#define BOARD_NAME "SN32F240"
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define system_SN32F240
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_PIN0 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_PIN11 11U
+#define GPIOA_PIN12 12U
+#define GPIOA_PIN13 13U
+#define GPIOA_PIN14 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_PIN13 13U
+#define GPIOB_PIN14 14U
+#define GPIOB_PIN15 15U
+
+#define GPIOC_PIN0 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_PIN6 6U
+#define GPIOC_PIN7 7U
+#define GPIOC_PIN8 8U
+#define GPIOC_PIN9 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_PIN14 14U
+#define GPIOC_PIN15 15U
+
+// #define GPIOD_PIN0 0U
+// #define GPIOD_PIN1 1U
+// #define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+// #define GPIOD_PIN12 12U
+// #define GPIOD_PIN13 13U
+// #define GPIOD_PIN14 14U
+// #define GPIOD_PIN15 15U
+
+
+/*
+ * IO lines assignments.
+ */
+// #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
+// #define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+// #define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOD, 5U)
+#define LINE_SWCLK PAL_LINE(GPIOD, 6U)
+
+// #define LINE_PINB8 PAL_LINE(GPIOB, 8U)
+// #define LINE_PINB9 PAL_LINE(GPIOB, 9U)
+
+#define LINE_CAPS_LOCK PAL_LINE(GPIOC, 8U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the SN32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n)))
+#define PIN_MODE_OUTPUT(n) (1U << ((n)))
+#define PIN_MODE_PULLUP(n) (0U << ((n*2)))
+#define PIN_MODE_SCHMITT_EN(n) (10U << ((n*2)))
+#define PIN_MODE_SCHMITT_DIS(n) (11U << ((n*2)))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - PIN0 (input pullup).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA11 - PIN10 (input pullup).
+ * PA11 - PIN11 (input pullup).
+ * PA12 - PIN12 (input pullup).
+ * PA13 - PIN13 (input pullup).
+ * PA14 - PIN14 (input pullup).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODE (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_PIN11) | PIN_MODE_INPUT(GPIOA_PIN12) | PIN_MODE_INPUT(GPIOA_PIN13) | PIN_MODE_INPUT(GPIOA_PIN14) | PIN_MODE_INPUT(GPIOA_PIN15))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - PIN13 (input pullup).
+ * PB14 - PIN14 (input pullup).
+ * PB15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOB_MODE (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
+/*
+ * GPIOC setup:
+ *
+ * PC0 - PIN0 (input pullup).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - PIN6 (input pullup).
+ * PC7 - PIN7 (input pullup).
+ * PC8 - PIN8 (input pullup).
+ * PC9 - PIN9 (input pullup).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - PIN14 (input pullup).
+ * PC15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOC_MODE (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD11 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODE (PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11))
+
+#if !defined(_FROM_ASM_)
+# ifdef __cplusplus
+extern "C" {
+# endif
+void boardInit(void);
+# ifdef __cplusplus
+}
+# endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */ \ No newline at end of file
diff --git a/keyboards/marvo/kg938/boards/SN_SN32F240/board.mk b/keyboards/marvo/kg938/boards/SN_SN32F240/board.mk
new file mode 100644
index 000000000..e9bfc74b6
--- /dev/null
+++ b/keyboards/marvo/kg938/boards/SN_SN32F240/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/SN_SN32F240/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/SN_SN32F240 \ No newline at end of file
diff --git a/keyboards/marvo/kg938/chconf.h b/keyboards/marvo/kg938/chconf.h
new file mode 100644
index 000000000..2b863e582
--- /dev/null
+++ b/keyboards/marvo/kg938/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/marvo/kg938/config.h b/keyboards/marvo/kg938/config.h
new file mode 100644
index 000000000..ef5fae570
--- /dev/null
+++ b/keyboards/marvo/kg938/config.h
@@ -0,0 +1,53 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x8506
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Marvo
+#define PRODUCT KG938
+#define DESCRIPTION KG938
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11, B12, B13, B14, B15 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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 \ No newline at end of file
diff --git a/keyboards/marvo/kg938/config_led.c b/keyboards/marvo/kg938/config_led.c
new file mode 100644
index 000000000..659983c5e
--- /dev/null
+++ b/keyboards/marvo/kg938/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, NO_LED },
+ { 74, NO_LED, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, 86, NO_LED, 87, 88, 89, 90 },
+ { 91, 92, 93, 94, 95, 96, 97, NO_LED, 98, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 99, 100, 101, NO_LED, 102, 103, NO_LED }
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17}, {194, 17}, {204, 17}, {214, 17}, {224, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {139, 29}, {157, 29}, {167, 29}, {177, 29}, {194, 29}, {204, 29}, {214, 29}, {224, 35},
+ {5 , 41}, {19 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {136, 41}, {194, 41}, {204, 41}, {214, 41},
+ {8 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52}, {194, 52}, {204, 52}, {214, 52}, {224, 58},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64}, {199, 64}, {214, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/marvo/kg938/config_led.h b/keyboards/marvo/kg938/config_led.h
new file mode 100644
index 000000000..4c0128e90
--- /dev/null
+++ b/keyboards/marvo/kg938/config_led.h
@@ -0,0 +1,36 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS 6
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C14, C15, C5, C6, C7, C8, C9, C10, D0, D1, B6, B7, D2, D3 }
+
+#define LED_MATRIX_COLS 21
+#define LED_MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11, B12, B13, B14, B15 }
+
+#define DRIVER_LED_TOTAL 104
+
+#define LED_NUM_LOCK_PIN D5
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/marvo/kg938/halconf.h b/keyboards/marvo/kg938/halconf.h
new file mode 100644
index 000000000..8c25963fc
--- /dev/null
+++ b/keyboards/marvo/kg938/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/marvo/kg938/info.json b/keyboards/marvo/kg938/info.json
new file mode 100644
index 000000000..0fb8c5fe6
--- /dev/null
+++ b/keyboards/marvo/kg938/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "KG938",
+ "url": "https://www.marvo.ro/index.php?route=product/product&product_id=112",
+ "maintainer": "Pescu",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/marvo/kg938/keymaps/default/keymap.c b/keyboards/marvo/kg938/keymaps/default/keymap.c
new file mode 100644
index 000000000..ff53e4093
--- /dev/null
+++ b/keyboards/marvo/kg938/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = { { 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_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_NO, KC_NO },
+ { 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO },
+ { 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, KC_NO, KC_UP, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_NO, KC_RCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_P0, KC_PDOT, KC_NO }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, RGB_TOG, _______, _______, _______, KC_SLEP, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_MOD, RGB_RMOD, RGB_M_R, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______, _______, _______ }
+ }
+};
diff --git a/keyboards/marvo/kg938/keymaps/default/readme.md b/keyboards/marvo/kg938/keymaps/default/readme.md
new file mode 100644
index 000000000..d50480bf5
--- /dev/null
+++ b/keyboards/marvo/kg938/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# ANSI Layout
+
+This is ANSI Layout
+
+How to compile: `qmk compile -kb marvo/kg938 -km default`
diff --git a/keyboards/marvo/kg938/kg938.h b/keyboards/marvo/kg938/kg938.h
new file mode 100644
index 000000000..ef5b3f3e0
--- /dev/null
+++ b/keyboards/marvo/kg938/kg938.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "quantum.h"
diff --git a/keyboards/marvo/kg938/led_matrix.c b/keyboards/marvo/kg938/led_matrix.c
new file mode 100644
index 000000000..197a9fc34
--- /dev/null
+++ b/keyboards/marvo/kg938/led_matrix.c
@@ -0,0 +1,83 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = b;
+ led_state[corrected_index].b = g;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_NUM_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+} \ No newline at end of file
diff --git a/keyboards/marvo/kg938/matrix.c b/keyboards/marvo/kg938/matrix.c
new file mode 100644
index 000000000..f0b5ff34e
--- /dev/null
+++ b/keyboards/marvo/kg938/matrix.c
@@ -0,0 +1,578 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+#include "CT32.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clocks
+ SN_SYS1->AHBCLKEN_b.CT16B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B2CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B2CLKEN = 1;
+
+ // Set Timer Clock Prescalers
+ SN_SYS1->APBCP0_b.CT16B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT16B1PRE = 0x00;
+ SN_SYS1->APBCP1_b.CT16B2PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B1PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B2PRE = 0x00;
+
+ // PFPA Timer Mapping
+ // CT16B0 PWM0 P0.0 Col 0
+ // PWM1 P0.1 Col 1
+ // CT16B1 PWM1 P1.3 Col 13
+ // PWM2 P0.15 Col 9
+ // CT16B2 PWM0 P0.2 Col 2
+ // PWM1 P1.4 Col 14
+ // PWM2 P1.0 Col 10
+ // CT32B0 PWM0 P0.4 Col 4
+ // PWM1 P1.11 Col 16
+ // PWM3 P1.2 Col 12
+ // CT32B1 PWM1 P1.10 Col 15
+ // PWM2 P0.5 Col 5
+ // PWM3 P0.7 Col 7
+ // CT32B2 PWM0 P1.1 Col 11
+ // PWM1 P0.14 Col 8
+ // PWM2 P0.3 Col 3
+ // PWM3 P0.6 Col 6
+ SN_PFPA->CT16B0 = 0x00000;
+ SN_PFPA->CT16B1 = 0x02330;
+ SN_PFPA->CT16B2 = 0x02010;
+ SN_PFPA->CT32B0 = 0x00410;
+ SN_PFPA->CT32B1 = 0x21300;
+ SN_PFPA->CT32B2 = 0x00030;
+
+ // Set match interrupts and TC reset for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x28;
+ SN_CT16B1->PRE = 0x28;
+ SN_CT16B2->PRE = 0x28;
+ SN_CT32B0->PRE = 0x28;
+ SN_CT32B1->PRE = 0x28;
+ SN_CT32B2->PRE = 0x28;
+
+ // Enable PWM on all timers
+ SN_CT16B0->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B1->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B0->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B1->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+
+ // Enable IO
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+
+ // Clear match registers
+ SN_CT16B0->MR0 = 0x0;
+ SN_CT16B0->MR1 = 0x0;
+ SN_CT16B0->MR2 = 0x0;
+ SN_CT16B1->MR0 = 0x0;
+ SN_CT16B1->MR1 = 0x0;
+ SN_CT16B1->MR2 = 0x0;
+ SN_CT16B1->MR3 = 0x0;
+ SN_CT16B2->MR0 = 0x0;
+ SN_CT16B2->MR1 = 0x0;
+ SN_CT16B2->MR2 = 0x0;
+ SN_CT16B2->MR3 = 0x0;
+ SN_CT32B0->MR0 = 0x0;
+ SN_CT32B0->MR1 = 0x0;
+ SN_CT32B0->MR2 = 0x0;
+ SN_CT32B0->MR3 = 0x0;
+ SN_CT32B1->MR0 = 0x0;
+ SN_CT32B1->MR1 = 0x0;
+ SN_CT32B1->MR2 = 0x0;
+ SN_CT32B1->MR3 = 0x0;
+ SN_CT32B2->MR0 = 0x0;
+ SN_CT32B2->MR1 = 0x0;
+ SN_CT32B2->MR2 = 0x0;
+ SN_CT32B2->MR3 = 0x0;
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B0_IRQn);
+ nvicEnableVector(CT16B0_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+/**
+ * @brief MR1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B0_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B0->PWMCTRL = 0;
+ SN_CT16B1->PWMCTRL = 0;
+ SN_CT16B2->PWMCTRL = 0;
+ SN_CT32B0->PWMCTRL = 0;
+ SN_CT32B1->PWMCTRL = 0;
+ SN_CT32B2->PWMCTRL = 0;
+
+ SN_CT16B0->IC = mskCT16_MR3IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ // Read the key matrix
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Enable the column
+ writePinLow(col_pins[col_index]);
+
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ for (uint8_t delay_idx = 0; delay_idx < 20; delay_idx++)
+ {
+ writePinHigh(col_pins[col_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ if (current_row % 3 == 0)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].r;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].r;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].r;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].r;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].r;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].r;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].r;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].r;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].r;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].r;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].r;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].r;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].r;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].r;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].r;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].r;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].r;
+ }
+
+ if (current_row % 3 == 1)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].g;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].g;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].g;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].g;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].g;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].g;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].g;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].g;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].g;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].g;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].g;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].g;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].g;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].g;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].g;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].g;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].g;
+ }
+
+ if (current_row % 3 == 2)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].b;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].b;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].b;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].b;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].b;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].b;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].b;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].b;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].b;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].b;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].b;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].b;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].b;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].b;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].b;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].b;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].b;
+ }
+
+ // Enable PWM on all timers
+ if(SN_CT16B0->MR0 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT16B0->MR1 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR0 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT32B2->MR2 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B0->MR0 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B1->MR2 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR3 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B1->MR3 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B2->MR1 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT16B2->MR2 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR0 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR3 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR1 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT32B1->MR1 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT32B0->MR1 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B0->MR2 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B1->MR0 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR2 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT16B1->MR0 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+
+ // Set match interrupts and TC rest for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
+
+void HardFault_Handler(void) {
+ NVIC_SystemReset();
+} \ No newline at end of file
diff --git a/keyboards/marvo/kg938/mcuconf.h b/keyboards/marvo/kg938/mcuconf.h
new file mode 100644
index 000000000..2cb5fd2a1
--- /dev/null
+++ b/keyboards/marvo/kg938/mcuconf.h
@@ -0,0 +1,101 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_CT_IRQ_PRIORITY 2
+#define SN32_CT_USE_TIMER 2
+
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define SN32_USB_USE_USB1 TRUE
+#define SN32_USB_LOW_POWER_ON_SUSPEND TRUE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+#define CRT1_AREAS_NUMBER 1
+
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SN32_PWM_USE_TIM1 FALSE
+#define SN32_PWM_USE_TIM2 TRUE
+#define SN32_PWM_TIM1_IRQ_PRIORITY 3
+#define SN32_PWM_TIM2_IRQ_PRIORITY 3
+
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0x2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC 0
+#define ILRC 1
+#define EHSXTAL 2
+#define ELSXTAL 3
+#define PLL 4
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+#define __IHRC_FREQ (12000000UL)
+#define __ILRC_FREQ (32000UL)
+#define __ELS_XTAL_FREQ (32768UL)
+
+#if (SYS_CLOCK_SETUP)
+#define SYS0_PLLCTRL_VAL (PLL_ENABLE<<15) | (PLL_CLKIN<<12) | (PLL_FSEL<<8) | (PLL_PSEL<<5) | PLL_MSEL
+#endif
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */ \ No newline at end of file
diff --git a/keyboards/marvo/kg938/readme.md b/keyboards/marvo/kg938/readme.md
new file mode 100644
index 000000000..4d8c38f64
--- /dev/null
+++ b/keyboards/marvo/kg938/readme.md
@@ -0,0 +1,13 @@
+# Marvo KG938
+
+KG938
+
+Keyboard Maintainer: [pescu](https://github.com/Pescu123)
+Heavily based on SPCGear GK540 Magna by: [HorrorTroll](https://github.com/HorrorTroll)
+Hardware Supported: SN32F248F
+
+Make example for this keyboard (after setting up your build environment):
+
+ make marvo/kg938:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/marvo/kg938/rules.mk b/keyboards/marvo/kg938/rules.mk
new file mode 100644
index 000000000..a08b1e973
--- /dev/null
+++ b/keyboards/marvo/kg938/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248F
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom \ No newline at end of file
diff --git a/keyboards/redragon/k530/config.h b/keyboards/redragon/k530/config.h
new file mode 100644
index 000000000..2224e746a
--- /dev/null
+++ b/keyboards/redragon/k530/config.h
@@ -0,0 +1,50 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K530
+#define DESCRIPTION K530 Draconic
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { D7, D6, D5, D4, D3 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* Per-key tapping term, for use with Magic FN */
+#define TAPPING_TERM_PER_KEY
+
+/* 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
+
+#include "config_led.h"
diff --git a/keyboards/redragon/k530/config_led.c b/keyboards/redragon/k530/config_led.c
new file mode 100644
index 000000000..4c357d4af
--- /dev/null
+++ b/keyboards/redragon/k530/config_led.c
@@ -0,0 +1,26 @@
+#ifdef RGB_MATRIX_ENABLE
+
+# include "rgb_matrix.h"
+# include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40, },
+ { 41, NO_LED, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52, },
+ { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60, },
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 14*12, 0 },
+ { 1 *12, 1 }, { 2 *12, 1 }, { 3 *12, 1 }, { 4 *12, 1 }, { 5 *12, 1 }, { 6 *12, 1 }, { 7 *12, 1 }, { 8 *12, 1 }, { 9 *12, 1 }, { 10*12, 1 }, { 11*12, 1 }, { 12*12, 1 }, { 13*12, 1 }, { 14*12, 1 },
+ { 1 *12, 2 }, { 2 *12, 2 }, { 3 *12, 2 }, { 4 *12, 2 }, { 5 *12, 2 }, { 6 *12, 2 }, { 7 *12, 2 }, { 8 *12, 2 }, { 9 *12, 2 }, { 10*12, 2 }, { 11*12, 2 }, { 12*12, 2 }, { 14*12, 2 },
+ { 1 *12, 3 }, { 3 *12, 3 }, { 4 *12, 3 }, { 5 *12, 3 }, { 6 *12, 3 }, { 7 *12, 3 }, { 8 *12, 3 }, { 9 *12, 3 }, { 10*12, 3 }, { 11*12, 3 }, { 12*12, 3 }, { 14*12, 3 },
+ { 1 *12, 4 }, { 2 *12, 4 }, { 3 *12, 4 }, { 7 *12, 4 }, { 10*12, 4 }, { 11*12, 4 }, { 13*12, 4 }, { 14*12, 4 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/redragon/k530/config_led.h b/keyboards/redragon/k530/config_led.h
new file mode 100644
index 000000000..727b29a58
--- /dev/null
+++ b/keyboards/redragon/k530/config_led.h
@@ -0,0 +1,33 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS 5
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C15, C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 }
+
+#define LED_MATRIX_COLS 14
+#define LED_MATRIX_COL_PINS { A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 }
+
+#define DRIVER_LED_TOTAL (61)
+
+#define LED_PIN_ON_STATE 0
diff --git a/keyboards/redragon/k530/info.json b/keyboards/redragon/k530/info.json
new file mode 100644
index 000000000..795dcb9fc
--- /dev/null
+++ b/keyboards/redragon/k530/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K530",
+ "url": "https://www.redragonzone.com/products/redragonk530",
+ "maintainer": "CalcProgrammer1",
+ "width": 14,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/redragon/k530/k530.h b/keyboards/redragon/k530/k530.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/redragon/k530/k530.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/redragon/k530/keymaps/default/keymap.c b/keyboards/redragon/k530/keymaps/default/keymap.c
new file mode 100644
index 000000000..ec792e780
--- /dev/null
+++ b/keyboards/redragon/k530/keymaps/default/keymap.c
@@ -0,0 +1,51 @@
+/*
+Copyright 2021 Adam Honse
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_BASE] = { { 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, },
+ { LT(_FN,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, },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_RALT, MO(_FN), KC_NO, KC_APP, KC_RCTL, },
+ },
+ [_FN] = { { 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_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______, },
+ { _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, },
+ }
+};
+
+uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LT(_FN,KC_CAPS):
+ return 2000; // 2 seconds, same as stock firmware
+ default:
+ return TAPPING_TERM;
+ }
+} \ No newline at end of file
diff --git a/keyboards/redragon/k530/readme.md b/keyboards/redragon/k530/readme.md
new file mode 100644
index 000000000..28655ef8d
--- /dev/null
+++ b/keyboards/redragon/k530/readme.md
@@ -0,0 +1,15 @@
+# Redragon K530 Devarajas
+
+K530
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k530:default
+
+Flash `jumploader-redragon_k556.bin` first and only once.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k530/rules.mk b/keyboards/redragon/k530/rules.mk
new file mode 100644
index 000000000..97109e0f9
--- /dev/null
+++ b/keyboards/redragon/k530/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.c b/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.c
new file mode 100644
index 000000000..a896aea21
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.c
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+ #if SN32_HAS_GPIOA
+ {VAL_GPIOA_MODE},
+ #endif
+ #if SN32_HAS_GPIOB
+ {VAL_GPIOB_MODE},
+ #endif
+ #if SN32_HAS_GPIOC
+ {VAL_GPIOC_MODE},
+ #endif
+ #if SN32_HAS_GPIOD
+ {VAL_GPIOD_MODE},
+ #endif
+};
+#endif
+
+static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
+
+extern void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ sn32_clock_init();
+}
+
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+// SN_GPIO0->MODE = 0xffff;
+// // setP0.0~P0.1, P0.6~P0.7, P0.10~P0.15 to input pull-up
+// SN_GPIO0->CFG = 0x000A0AA0;
+
+// // set P1.2~1.9, P1.12~P1.15 to input pull-up
+// SN_GPIO1->CFG = 0x00A0000A;
+
+// SN_GPIO2->MODE = 0xFFFF;
+// // set P2.4~P2.15 to input pull-up
+// SN_GPIO2->CFG = 0x000000AA;
+
+// // set P3.0~P3.1, P3.4~P3.8 to input pull-up
+// SN_GPIO3->CFG = 0xAAA800A0;
+
+ // Set led pins to output
+// SN_GPIO2->CFG = 0xFFFF;
+// SN_GPIO2->DATA = 0x0; // Set low
+
+ SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
+} \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.h b/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.h
new file mode 100644
index 000000000..99a5982ef
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.h
@@ -0,0 +1,229 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Generic STM32_F303 Board
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_SN32_F240
+#define BOARD_NAME "SN32F240"
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define system_SN32F240
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_PIN0 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_PIN11 11U
+#define GPIOA_PIN12 12U
+#define GPIOA_PIN13 13U
+#define GPIOA_PIN14 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_PIN13 13U
+#define GPIOB_PIN14 14U
+#define GPIOB_PIN15 15U
+
+#define GPIOC_PIN0 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_PIN6 6U
+#define GPIOC_PIN7 7U
+#define GPIOC_PIN8 8U
+#define GPIOC_PIN9 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_PIN14 14U
+#define GPIOC_PIN15 15U
+
+// #define GPIOD_PIN0 0U
+// #define GPIOD_PIN1 1U
+// #define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+// #define GPIOD_PIN12 12U
+// #define GPIOD_PIN13 13U
+// #define GPIOD_PIN14 14U
+// #define GPIOD_PIN15 15U
+
+
+/*
+ * IO lines assignments.
+ */
+// #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
+// #define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+// #define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOD, 5U)
+#define LINE_SWCLK PAL_LINE(GPIOD, 6U)
+
+// #define LINE_PINB8 PAL_LINE(GPIOB, 8U)
+// #define LINE_PINB9 PAL_LINE(GPIOB, 9U)
+
+#define LINE_CAPS_LOCK PAL_LINE(GPIOC, 8U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the SN32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n)))
+#define PIN_MODE_OUTPUT(n) (1U << ((n)))
+#define PIN_MODE_PULLUP(n) (0U << ((n*2)))
+#define PIN_MODE_SCHMITT_EN(n) (10U << ((n*2)))
+#define PIN_MODE_SCHMITT_DIS(n) (11U << ((n*2)))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - PIN0 (input pullup).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA11 - PIN10 (input pullup).
+ * PA11 - PIN11 (input pullup).
+ * PA12 - PIN12 (input pullup).
+ * PA13 - PIN13 (input pullup).
+ * PA14 - PIN14 (input pullup).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODE (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_PIN11) | PIN_MODE_INPUT(GPIOA_PIN12) | PIN_MODE_INPUT(GPIOA_PIN13) | PIN_MODE_INPUT(GPIOA_PIN14) | PIN_MODE_INPUT(GPIOA_PIN15))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - PIN13 (input pullup).
+ * PB14 - PIN14 (input pullup).
+ * PB15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOB_MODE (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
+/*
+ * GPIOC setup:
+ *
+ * PC0 - PIN0 (input pullup).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - PIN6 (input pullup).
+ * PC7 - PIN7 (input pullup).
+ * PC8 - PIN8 (input pullup).
+ * PC9 - PIN9 (input pullup).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - PIN14 (input pullup).
+ * PC15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOC_MODE (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD11 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODE (PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11))
+
+#if !defined(_FROM_ASM_)
+# ifdef __cplusplus
+extern "C" {
+# endif
+void boardInit(void);
+# ifdef __cplusplus
+}
+# endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */ \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.mk b/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.mk
new file mode 100644
index 000000000..e9bfc74b6
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/boards/SN_SN32F240/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/SN_SN32F240/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/SN_SN32F240 \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/chconf.h b/keyboards/redragon/k552/rev1/chconf.h
new file mode 100644
index 000000000..2b863e582
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/halconf.h b/keyboards/redragon/k552/rev1/halconf.h
new file mode 100644
index 000000000..8c25963fc
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/info.json b/keyboards/redragon/k552/rev1/info.json
new file mode 100644
index 000000000..38357f812
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K552",
+ "url": "https://www.redragonzone.com/collections/keyboard/products/redragon-k552-kumara-87-key-led-rgb-backlit-mechanical-computer-illuminated-keyboard-with-blue-switches-for-pc-gaming-compact-abs-metal-design",
+ "maintainer": "HorrorTroll",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/redragon/k552/rev1/keymaps/abnt2/config.h b/keyboards/redragon/k552/rev1/keymaps/abnt2/config.h
new file mode 100644
index 000000000..a1c2df67b
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/abnt2/config.h
@@ -0,0 +1,57 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5104
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K552
+#define DESCRIPTION K552 Kumara
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.c b/keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.c
new file mode 100644
index 000000000..937b590d5
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, NO_LED, 46, 47, 48 },
+ { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED, NO_LED, NO_LED },
+ { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, NO_LED, 77, NO_LED },
+ { 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 86, 87, 88 }
+}, {
+ {0 , 0}, {26 , 0}, {39 , 0}, {52 , 0}, {65 , 0}, {84 , 0}, {97 , 0}, {110, 0}, {123, 0}, {143, 0}, {156, 0}, {169, 0}, {182, 0}, {198, 0}, {211, 0}, {224, 0},
+ {0 , 17}, {13 , 17}, {26 , 17}, {39 , 17}, {52 , 17}, {65 , 17}, {78 , 17}, {91 , 17}, {104, 17}, {117, 17}, {130, 17}, {143, 17}, {156, 17}, {175, 17}, {198, 17}, {211, 17}, {224, 17},
+ {3 , 29}, {19 , 29}, {32 , 29}, {45 , 29}, {58 , 29}, {71 , 29}, {84 , 29}, {97 , 29}, {110, 29}, {123, 29}, {136, 29}, {149, 29}, {162, 29}, {198, 29}, {211, 29}, {224, 29},
+ {5 , 41}, {23 , 41}, {36 , 41}, {49 , 41}, {62 , 41}, {75 , 41}, {88 , 41}, {101, 41}, {114, 41}, {127, 41}, {140, 41}, {153, 41}, {166, 41}, {182, 37},
+ {2 , 52}, {16 , 52}, {29 , 52}, {42 , 52}, {55 , 52}, {68 , 52}, {81 , 52}, {94 , 52}, {107, 52}, {120, 52}, {133, 52}, {146, 52}, {159, 52}, {176, 52}, {211, 52},
+ {2 , 64}, {18 , 64}, {34 , 64}, {83 , 64}, {131, 64}, {148, 64}, {164, 64}, {180, 64}, {198, 64}, {211, 64}, {224, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.h b/keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.h
new file mode 100644
index 000000000..d02ab505a
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/abnt2/config_led.h
@@ -0,0 +1,35 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C3, C1, C4, C15, C14, C5, C7, C6, C8, C10, C9, D0, B6, D1, B7, D3, D2 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (89)
+
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/abnt2/keymap.c b/keyboards/redragon/k552/rev1/keymaps/abnt2/keymap.c
new file mode 100644
index 000000000..5f41dce9c
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/abnt2/keymap.c
@@ -0,0 +1,177 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "rev1.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ' │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ ´ │ [ │     │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ç │ ~ │ ] │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤     ┌───┐
+ │LSft│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ ; │ / │ RShft│     │ ↑ │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ ┌───┼───┼───┐
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ " │ ! │ @ │ # │ $ │ % │ ¨ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ` │ { │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ └───┴───┴───┘
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ ^ │ } │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤     ┌───┐
+ │LSft│ | │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ : │ ? │ RShft│     │   │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ ┌───┼───┼───┐
+ │ │  │ │                  │ │  │ │ │ │   │   │   │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = LAYOUT_abnt2(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ' │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ ´ │ [ │     │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ç │ ~ │ ] │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤     ┌───┐
+ │LSft│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ ; │ / │ RShft│     │ ↑ │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ ┌───┼───┼───┐
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_GAME] = LAYOUT_abnt2(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP,
+ KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MeP│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤     ┌───┐
+ │  │  │   │   │   │   │   │   │   │   │   │   │   │ │     │Vai│
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ ┌───┼───┼───┐
+ │ │GAME│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_FL] = LAYOUT_abnt2(
+ RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, GAME, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MeP│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤     ┌───┐
+ │  │  │   │   │   │   │   │   │   │   │   │   │   │ │     │Vai│
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ ┌───┼───┼───┐
+ │ │BASE│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_CL] = LAYOUT_abnt2(
+ RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, BASE, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/abnt2/readme.md b/keyboards/redragon/k552/rev1/keymaps/abnt2/readme.md
new file mode 100644
index 000000000..831623f92
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/abnt2/readme.md
@@ -0,0 +1,5 @@
+# ISO - ABNT2 (Brazil) layout
+
+This is ISO - ABNT2 (Brazil) layout
+
+How to compile: `qmk compile -kb redragon/k552/rev1 -km abnt2`
diff --git a/keyboards/redragon/k552/rev1/keymaps/abnt2/rules.mk b/keyboards/redragon/k552/rev1/keymaps/abnt2/rules.mk
new file mode 100644
index 000000000..dc7840370
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/abnt2/rules.mk
@@ -0,0 +1,2 @@
+# project specific files
+SRC += config_led.c
diff --git a/keyboards/redragon/k552/rev1/keymaps/ansi/config.h b/keyboards/redragon/k552/rev1/keymaps/ansi/config.h
new file mode 100644
index 000000000..a1c2df67b
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/ansi/config.h
@@ -0,0 +1,57 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5104
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K552
+#define DESCRIPTION K552 Kumara
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/ansi/config_led.c b/keyboards/redragon/k552/rev1/keymaps/ansi/config_led.c
new file mode 100644
index 000000000..6ccfea184
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/ansi/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 },
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, NO_LED, 62, NO_LED, NO_LED, NO_LED },
+ { 63, NO_LED, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED, 74, NO_LED, 75, NO_LED },
+ { 76, 77, 78, 79, 80, 81, 82, NO_LED, 83, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 84, 85, 86 }
+}, {
+ {0 , 0}, {26 , 0}, {39 , 0}, {52 , 0}, {65 , 0}, {84 , 0}, {97 , 0}, {110, 0}, {123, 0}, {143, 0}, {156, 0}, {169, 0}, {182, 0}, {198, 0}, {211, 0}, {224, 0},
+ {0 , 17}, {13 , 17}, {26 , 17}, {39 , 17}, {52 , 17}, {65 , 17}, {78 , 17}, {91 , 17}, {104, 17}, {117, 17}, {130, 17}, {143, 17}, {156, 17}, {175, 17}, {198, 17}, {211, 17}, {224, 17},
+ {3 , 29}, {19 , 29}, {32 , 29}, {45 , 29}, {58 , 29}, {71 , 29}, {84 , 29}, {97 , 29}, {110, 29}, {123, 29}, {136, 29}, {149, 29}, {162, 29}, {179, 29}, {198, 29}, {211, 29}, {224, 29},
+ {5 , 41}, {23 , 41}, {36 , 41}, {49 , 41}, {62 , 41}, {75 , 41}, {88 , 41}, {101, 41}, {114, 41}, {127, 41}, {140, 41}, {153, 41}, {174, 41},
+ {8 , 52}, {29 , 52}, {42 , 52}, {55 , 52}, {68 , 52}, {81 , 52}, {94 , 52}, {107, 52}, {120, 52}, {133, 52}, {146, 52}, {170, 52}, {211, 52},
+ {2 , 64}, {18 , 64}, {34 , 64}, {83 , 64}, {131, 64}, {148, 64}, {164, 64}, {180, 64}, {198, 64}, {211, 64}, {224, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/ansi/config_led.h b/keyboards/redragon/k552/rev1/keymaps/ansi/config_led.h
new file mode 100644
index 000000000..59b6892bf
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/ansi/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C3, C1, C4, C15, C14, C5, C7, C6, C8, C10, C9, D0, B6, D1, B7, D3, D2 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (87) \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/ansi/keymap.c b/keyboards/redragon/k552/rev1/keymaps/ansi/keymap.c
new file mode 100644
index 000000000..243db8ed6
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/ansi/keymap.c
@@ -0,0 +1,177 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "rev1.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │  |  │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │    │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │   RShift │     │   │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │  │ │                  │ │  │ │ │ │   │   │   │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = LAYOUT_ansi(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_GAME] = LAYOUT_ansi(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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_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_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MeP│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │GAME│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_FL] = LAYOUT_ansi(
+ RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, GAME, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MeP│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │BASE│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_CL] = LAYOUT_ansi(
+ RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, BASE, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/ansi/readme.md b/keyboards/redragon/k552/rev1/keymaps/ansi/readme.md
new file mode 100644
index 000000000..43b1dd9a7
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/ansi/readme.md
@@ -0,0 +1,5 @@
+# ANSI Layout
+
+This is ANSI Layout
+
+How to compile: `qmk compile -kb redragon/k552/rev1 -km ansi`
diff --git a/keyboards/redragon/k552/rev1/keymaps/ansi/rules.mk b/keyboards/redragon/k552/rev1/keymaps/ansi/rules.mk
new file mode 100644
index 000000000..dc7840370
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/ansi/rules.mk
@@ -0,0 +1,2 @@
+# project specific files
+SRC += config_led.c
diff --git a/keyboards/redragon/k552/rev1/keymaps/iso/config.h b/keyboards/redragon/k552/rev1/keymaps/iso/config.h
new file mode 100644
index 000000000..a1c2df67b
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/iso/config.h
@@ -0,0 +1,57 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5104
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K552
+#define DESCRIPTION K552 Kumara
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/iso/config_led.c b/keyboards/redragon/k552/rev1/keymaps/iso/config_led.c
new file mode 100644
index 000000000..e086ade6a
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/iso/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, NO_LED, 46, 47, 48 },
+ { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED, NO_LED, NO_LED },
+ { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, NO_LED, 75, NO_LED, 76, NO_LED },
+ { 77, 78, 79, 80, 81, 82, 83, NO_LED, 84, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 85, 86, 87 }
+}, {
+ {0 , 0}, {26 , 0}, {39 , 0}, {52 , 0}, {65 , 0}, {84 , 0}, {97 , 0}, {110, 0}, {123, 0}, {143, 0}, {156, 0}, {169, 0}, {182, 0}, {198, 0}, {211, 0}, {224, 0},
+ {0 , 17}, {13 , 17}, {26 , 17}, {39 , 17}, {52 , 17}, {65 , 17}, {78 , 17}, {91 , 17}, {104, 17}, {117, 17}, {130, 17}, {143, 17}, {156, 17}, {175, 17}, {198, 17}, {211, 17}, {224, 17},
+ {3 , 29}, {19 , 29}, {32 , 29}, {45 , 29}, {58 , 29}, {71 , 29}, {84 , 29}, {97 , 29}, {110, 29}, {123, 29}, {136, 29}, {149, 29}, {162, 29}, {198, 29}, {211, 29}, {224, 29},
+ {5 , 41}, {23 , 41}, {36 , 41}, {49 , 41}, {62 , 41}, {75 , 41}, {88 , 41}, {101, 41}, {114, 41}, {127, 41}, {140, 41}, {153, 41}, {166, 41}, {182, 37},
+ {2 , 52}, {16 , 52}, {29 , 52}, {42 , 52}, {55 , 52}, {68 , 52}, {81 , 52}, {94 , 52}, {107, 52}, {120, 52}, {133, 52}, {146, 52}, {170, 52}, {211, 52},
+ {2 , 64}, {18 , 64}, {34 , 64}, {83 , 64}, {131, 64}, {148, 64}, {164, 64}, {180, 64}, {198, 64}, {211, 64}, {224, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/iso/config_led.h b/keyboards/redragon/k552/rev1/keymaps/iso/config_led.h
new file mode 100644
index 000000000..998d17d90
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/iso/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C3, C1, C4, C15, C14, C5, C7, C6, C8, C10, C9, D0, B6, D1, B7, D3, D2 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (88) \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/iso/keymap.c b/keyboards/redragon/k552/rev1/keymaps/iso/keymap.c
new file mode 100644
index 000000000..aaaa849ae
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/iso/keymap.c
@@ -0,0 +1,177 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "rev1.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │     │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ # │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐
+ │LSft│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ¬ │ ! │ " │ £ │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ └───┴───┴───┘
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ @ │ ~ │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐
+ │LSft│ | │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │   RShift │     │   │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │  │ │                  │ │  │ │ │ │   │   │   │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = LAYOUT_iso(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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,
+ KC_LSFT, KC_NUBS, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │     │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ # │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐
+ │LSft│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_GAME] = LAYOUT_iso(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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,
+ KC_LSFT, KC_NUBS, 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_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MeP│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐
+ │  │  │   │   │   │   │   │   │   │   │   │   │     │     │Vai│
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │GAME│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_FL] = LAYOUT_iso(
+ RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, GAME, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MeP│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐
+ │  │  │   │   │   │   │   │   │   │   │   │   │     │     │Vai│
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │BASE│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_CL] = LAYOUT_iso(
+ RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, BASE, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/keymaps/iso/readme.md b/keyboards/redragon/k552/rev1/keymaps/iso/readme.md
new file mode 100644
index 000000000..a771523c0
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/iso/readme.md
@@ -0,0 +1,5 @@
+# ISO layout
+
+This is ISO layout
+
+How to compile: `qmk compile -kb redragon/k552/rev1 -km iso`
diff --git a/keyboards/redragon/k552/rev1/keymaps/iso/rules.mk b/keyboards/redragon/k552/rev1/keymaps/iso/rules.mk
new file mode 100644
index 000000000..dc7840370
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/keymaps/iso/rules.mk
@@ -0,0 +1,2 @@
+# project specific files
+SRC += config_led.c
diff --git a/keyboards/redragon/k552/rev1/led_matrix.c b/keyboards/redragon/k552/rev1/led_matrix.c
new file mode 100644
index 000000000..62d5d9650
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/led_matrix.c
@@ -0,0 +1,82 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+} \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/matrix.c b/keyboards/redragon/k552/rev1/matrix.c
new file mode 100644
index 000000000..bd94440ae
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/matrix.c
@@ -0,0 +1,533 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+#include "CT32.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clocks
+ SN_SYS1->AHBCLKEN_b.CT16B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B2CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B2CLKEN = 1;
+
+ // Set Timer Clock Prescalers
+ SN_SYS1->APBCP0_b.CT16B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT16B1PRE = 0x00;
+ SN_SYS1->APBCP1_b.CT16B2PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B1PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B2PRE = 0x00;
+
+ // PFPA Timer Mapping
+ // CT16B0 PWM0 P0.0 Col 0
+ // PWM1 P0.1 Col 1
+ // CT16B1 PWM1 P1.3 Col 13
+ // PWM2 P0.15 Col 9
+ // CT16B2 PWM0 P0.2 Col 2
+ // PWM1 P1.4 Col 14
+ // PWM2 P1.0 Col 10
+ // CT32B0 PWM0 P0.4 Col 4
+ // PWM1 P1.11 Col 16
+ // PWM3 P1.2 Col 12
+ // CT32B1 PWM1 P1.10 Col 15
+ // PWM2 P0.5 Col 5
+ // PWM3 P0.7 Col 7
+ // CT32B2 PWM0 P1.1 Col 11
+ // PWM1 P0.14 Col 8
+ // PWM2 P0.3 Col 3
+ // PWM3 P0.6 Col 6
+ SN_PFPA->CT16B0 = 0x00000;
+ SN_PFPA->CT16B1 = 0x02330;
+ SN_PFPA->CT16B2 = 0x02010;
+ SN_PFPA->CT32B0 = 0x00410;
+ SN_PFPA->CT32B1 = 0x21300;
+ SN_PFPA->CT32B2 = 0x00030;
+
+ // Set match interrupts and TC reset for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x28;
+ SN_CT16B1->PRE = 0x28;
+ SN_CT16B2->PRE = 0x28;
+ SN_CT32B0->PRE = 0x28;
+ SN_CT32B1->PRE = 0x28;
+ SN_CT32B2->PRE = 0x28;
+
+ // Enable PWM on all timers
+ SN_CT16B0->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN);
+ SN_CT16B1->PWMCTRL =
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B2->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT32B0->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B1->PWMCTRL =
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+
+ // Enable IO
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+
+ // Clear match registers
+ SN_CT16B0->MR0 = 0x0;
+ SN_CT16B0->MR1 = 0x0;
+ SN_CT16B0->MR2 = 0x0;
+ SN_CT16B1->MR0 = 0x0;
+ SN_CT16B1->MR1 = 0x0;
+ SN_CT16B1->MR2 = 0x0;
+ SN_CT16B1->MR3 = 0x0;
+ SN_CT16B2->MR0 = 0x0;
+ SN_CT16B2->MR1 = 0x0;
+ SN_CT16B2->MR2 = 0x0;
+ SN_CT16B2->MR3 = 0x0;
+ SN_CT32B0->MR0 = 0x0;
+ SN_CT32B0->MR1 = 0x0;
+ SN_CT32B0->MR2 = 0x0;
+ SN_CT32B0->MR3 = 0x0;
+ SN_CT32B1->MR0 = 0x0;
+ SN_CT32B1->MR1 = 0x0;
+ SN_CT32B1->MR2 = 0x0;
+ SN_CT32B1->MR3 = 0x0;
+ SN_CT32B2->MR0 = 0x0;
+ SN_CT32B2->MR1 = 0x0;
+ SN_CT32B2->MR2 = 0x0;
+ SN_CT32B2->MR3 = 0x0;
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B0_IRQn);
+ nvicEnableVector(CT16B0_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+/**
+ * @brief MR1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B0_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B0->PWMCTRL = 0;
+ SN_CT16B1->PWMCTRL = 0;
+ SN_CT16B2->PWMCTRL = 0;
+ SN_CT32B0->PWMCTRL = 0;
+ SN_CT32B1->PWMCTRL = 0;
+ SN_CT32B2->PWMCTRL = 0;
+
+ SN_CT16B0->IC = mskCT16_MR3IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ // Read the key matrix
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Enable the column
+ writePinLow(col_pins[col_index]);
+
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ for (uint8_t delay_idx = 0; delay_idx < 20; delay_idx++)
+ {
+ writePinHigh(col_pins[col_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ if (current_row % 3 == 0)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].r;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].r;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].r;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].r;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].r;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].r;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].r;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].r;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].r;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].r;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].r;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].r;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].r;
+ }
+
+ if (current_row % 3 == 1)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].g;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].g;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].g;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].g;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].g;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].g;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].g;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].g;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].g;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].g;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].g;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].g;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].g;
+ }
+
+ if (current_row % 3 == 2)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].b;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].b;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].b;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].b;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].b;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].b;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].b;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].b;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].b;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].b;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].b;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].b;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].b;
+ }
+
+ // Enable PWM on all timers
+ if(SN_CT16B0->MR0 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT16B0->MR1 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR0 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT32B2->MR2 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B0->MR0 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B1->MR2 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR3 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B1->MR3 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B2->MR1 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT16B2->MR2 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR0 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR3 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR1 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT32B1->MR1 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT32B0->MR1 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+
+ // Set match interrupts and TC rest for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
+
+void HardFault_Handler(void) {
+ NVIC_SystemReset();
+} \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/mcuconf.h b/keyboards/redragon/k552/rev1/mcuconf.h
new file mode 100644
index 000000000..2cb5fd2a1
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/mcuconf.h
@@ -0,0 +1,101 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_CT_IRQ_PRIORITY 2
+#define SN32_CT_USE_TIMER 2
+
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define SN32_USB_USE_USB1 TRUE
+#define SN32_USB_LOW_POWER_ON_SUSPEND TRUE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+#define CRT1_AREAS_NUMBER 1
+
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SN32_PWM_USE_TIM1 FALSE
+#define SN32_PWM_USE_TIM2 TRUE
+#define SN32_PWM_TIM1_IRQ_PRIORITY 3
+#define SN32_PWM_TIM2_IRQ_PRIORITY 3
+
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0x2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC 0
+#define ILRC 1
+#define EHSXTAL 2
+#define ELSXTAL 3
+#define PLL 4
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+#define __IHRC_FREQ (12000000UL)
+#define __ILRC_FREQ (32000UL)
+#define __ELS_XTAL_FREQ (32768UL)
+
+#if (SYS_CLOCK_SETUP)
+#define SYS0_PLLCTRL_VAL (PLL_ENABLE<<15) | (PLL_CLKIN<<12) | (PLL_FSEL<<8) | (PLL_PSEL<<5) | PLL_MSEL
+#endif
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */ \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev1/readme.md b/keyboards/redragon/k552/rev1/readme.md
new file mode 100644
index 000000000..0f20033c9
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/readme.md
@@ -0,0 +1,13 @@
+# Redragon K552 Kumara
+
+K552
+
+Keyboard Maintainer: [HorrorTroll](https://github.com/HorrorTroll)
+Heavily based on Allreli K643 by: [flolbr](https://github.com/flolbr)
+Hardware Supported: SN32F248F
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k552/rev1:ansi
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k552/rev1/rev1.h b/keyboards/redragon/k552/rev1/rev1.h
new file mode 100644
index 000000000..a946d81ca
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/rev1.h
@@ -0,0 +1,69 @@
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, \
+ k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, \
+ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, \
+ k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76, k77, k78, \
+ k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15 }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32 }, \
+ { k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \
+ { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, XXX, XXX, XXX }, \
+ { k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76, k77, XXX, k78, XXX }, \
+ { k79, k80, k81, k82, k83, k84, k85, XXX, k86, XXX, XXX, XXX, XXX, XXX, k87, k88, k89 } \
+}
+
+#define LAYOUT_ansi( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, \
+ k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, \
+ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, \
+ k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, \
+ k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15 }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32 }, \
+ { k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \
+ { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, XXX, k62, XXX, XXX, XXX }, \
+ { k63, XXX, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, XXX, k74, XXX, k75, XXX }, \
+ { k76, k77, k78, k79, k80, k81, k82, XXX, k83, XXX, XXX, XXX, XXX, XXX, k84, k85, k86 } \
+}
+
+#define LAYOUT_abnt2( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, \
+ k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, \
+ k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, \
+ k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76, k77, \
+ k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15 }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32 }, \
+ { k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, XXX, k46, k47, k48 }, \
+ { k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, XXX, XXX, XXX }, \
+ { k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76, XXX, k77, XXX }, \
+ { k78, k79, k80, k81, k82, k83, k84, XXX, k85, XXX, XXX, XXX, XXX, XXX, k86, k87, k88 } \
+}
+
+#define LAYOUT_iso( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, \
+ k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, \
+ k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, \
+ k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76, \
+ k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, k87 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15 }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32 }, \
+ { k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, XXX, k46, k47, k48 }, \
+ { k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, XXX, XXX, XXX }, \
+ { k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, XXX, k75, XXX, k76, XXX }, \
+ { k77, k78, k79, k80, k81, k82, k83, XXX, k84, XXX, XXX, XXX, XXX, XXX, k85, k86, k87 } \
+}
diff --git a/keyboards/redragon/k552/rev1/rules.mk b/keyboards/redragon/k552/rev1/rules.mk
new file mode 100644
index 000000000..a04d7655b
--- /dev/null
+++ b/keyboards/redragon/k552/rev1/rules.mk
@@ -0,0 +1,30 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+
+# MCU name
+MCU = SN32F248F
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom \ No newline at end of file
diff --git a/keyboards/redragon/k552/rev2/config.h b/keyboards/redragon/k552/rev2/config.h
new file mode 100644
index 000000000..90b0e5b6c
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/config.h
@@ -0,0 +1,51 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K552
+#define DESCRIPTION K552 Kumara
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0, B1 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#define LED_CAPS_LOCK_PIN B14
+#define LED_SCROLL_LOCK_PIN B15
+#define LED_PIN_ON_STATE 0
+
+#include "config_led.h"
diff --git a/keyboards/redragon/k552/rev2/config_led.c b/keyboards/redragon/k552/rev2/config_led.c
new file mode 100644
index 000000000..a71c846c6
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 },
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, NO_LED, NO_LED, NO_LED },
+ { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, NO_LED, 78, NO_LED },
+ { 79, 80, 81, 82, 83, 84, 85, NO_LED, 86, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 87, 88, 89 }
+}, {
+ { 0 *14, 0 }, { 2 *14, 0 }, { 3 *14, 0 }, { 4 *14, 0 }, { 5 *14, 0 }, { 6.5 *14, 0 }, { 7.5 *14, 0 }, { 8.5 *14, 0 }, { 9.5 *14, 0 }, { 11 *14, 0 }, { 12 *14, 0 }, { 13 *14, 0 }, { 14 *14, 0 }, { 15 *14, 0 }, { 16 *14, 0 }, { 17 *14, 0 },
+ { 0 *14, 11 }, { 1 *14, 11 }, { 2 *14, 11 }, { 3 *14, 11 }, { 4 *14, 11 }, { 5 *14, 11 }, { 6 *14, 11 }, { 7 *14, 11 }, { 8 *14, 11 }, { 9 *14, 11 }, { 10 *14, 11 }, { 11 *14, 11 }, { 12 *14, 11 }, { 13.5*14, 11 }, { 15 *14, 11 }, { 16 *14, 11 }, { 17 *14, 11 },
+ { .2 *14, 22 }, { 1.5 *14, 22 }, { 2.5 *14, 22 }, { 3.5 *14, 22 }, { 4.5 *14, 22 }, { 5.5 *14, 22 }, { 6.5 *14, 22 }, { 7.5 *14, 22 }, { 8.5 *14, 22 }, { 9.5 *14, 22 }, { 10.5*14, 22 }, { 11.5*14, 22 }, { 12.5*14, 22 }, { 13.8*14, 22 }, { 15 *14, 22 }, { 16 *14, 22 }, { 17 *14, 22 },
+ { .25 *14, 33 }, { 1.8 *14, 33 }, { 2.8 *14, 33 }, { 3.8 *14, 33 }, { 4.8 *14, 33 }, { 5.8 *14, 33 }, { 6.8 *14, 33 }, { 7.8 *14, 33 }, { 8.8 *14, 33 }, { 9.8 *14, 33 }, { 10.8*14, 33 }, { 11.8*14, 33 }, { 12.8*14, 33 }, { 13.3*14, 33 },
+ { .5 *14, 44 }, { 1.1 *14, 44 }, { 2.1 *14, 44 }, { 3.1 *14, 44 }, { 4.1 *14, 44 }, { 5.1 *14, 44 }, { 6.1 *14, 44 }, { 7.1 *14, 44 }, { 8.1 *14, 44 }, { 9.1 *14, 44 }, { 10.1*14, 44 }, { 11.1*14, 44 }, { 12.5*14, 44 }, { 13.1*14, 44 }, { 16 *14, 44 },
+ { .1 *14, 64 }, { 1.2 *14, 64 }, { 2.6 *14, 64 }, { 6.3 *14, 64 }, { 10.1*14, 64 }, { 11.2*14, 64 }, { 12.8*14, 64 }, { 14 *14, 64 }, { 15 *14, 64 }, { 16 *14, 64 }, { 17 *14, 64 },
+}, {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+} };
+
+#endif
diff --git a/keyboards/redragon/k552/rev2/config_led.h b/keyboards/redragon/k552/rev2/config_led.h
new file mode 100644
index 000000000..0e707a57a
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (90)
diff --git a/keyboards/redragon/k552/rev2/info.json b/keyboards/redragon/k552/rev2/info.json
new file mode 100644
index 000000000..4c78ea3fb
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K552-2",
+ "url": "https://www.redragonzone.com/products/redragonk552",
+ "maintainer": "CalcProgrammer1",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/redragon/k552/rev2/keymaps/default/keymap.c b/keyboards/redragon/k552/rev2/keymaps/default/keymap.c
new file mode 100644
index 000000000..64c6df595
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = { { 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_NO, KC_PSCR, KC_SLCK, KC_PAUSE },
+ { 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_INS, KC_HOME, KC_PGUP },
+ { 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_DEL, KC_END, KC_PGDN },
+ { 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, KC_NO, KC_NO, KC_NO },
+ { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_NO, KC_UP, KC_NO },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_NO, KC_RCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, RGB_TOG, _______, _______, _______, KC_SLEP },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_M_P, RGB_M_B, RGB_M_R },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW, RGB_MOD, RGB_RMOD },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI }
+ }
+};
diff --git a/keyboards/redragon/k552/rev2/readme.md b/keyboards/redragon/k552/rev2/readme.md
new file mode 100644
index 000000000..f3895ae30
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/readme.md
@@ -0,0 +1,13 @@
+# Redragon K552-2 Kumara
+
+K552-2
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k552/rev2:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k552/rev2/rev2.h b/keyboards/redragon/k552/rev2/rev2.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/rev2.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/redragon/k552/rev2/rules.mk b/keyboards/redragon/k552/rev2/rules.mk
new file mode 100644
index 000000000..97109e0f9
--- /dev/null
+++ b/keyboards/redragon/k552/rev2/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/redragon/k556/config.h b/keyboards/redragon/k556/config.h
new file mode 100644
index 000000000..97d1c1706
--- /dev/null
+++ b/keyboards/redragon/k556/config.h
@@ -0,0 +1,55 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K556
+#define DESCRIPTION K556 Devarajas
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* Enable NKRO - Up to 248 keys at the same time. */
+#define FORCE_NKRO
+
+/* 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
+
+#define LED_NUM_LOCK_PIN B13
+#define LED_CAPS_LOCK_PIN B14
+#define LED_SCROLL_LOCK_PIN B15
+#define LED_PIN_ON_STATE 0
+
+#include "config_led.h"
diff --git a/keyboards/redragon/k556/config_led.c b/keyboards/redragon/k556/config_led.c
new file mode 100644
index 000000000..f9e6ce5a2
--- /dev/null
+++ b/keyboards/redragon/k556/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, NO_LED, NO_LED, NO_LED, 72, 73, 74, NO_LED },
+ { 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, NO_LED, 87, NO_LED, 88, NO_LED, 89, 90, 91, 92 },
+ { 93, 94, 95, 96, 97, 98, 99, NO_LED, 100, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 101, 102, 103, NO_LED, 104, 105, NO_LED }
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 15*12, 0 }, { 16*12, 0 }, { 17*12, 0 },
+ { 1 *12, 11 }, { 2 *12, 11 }, { 3 *12, 11 }, { 4 *12, 11 }, { 5 *12, 11 }, { 6 *12, 11 }, { 7 *12, 11 }, { 8 *12, 11 }, { 9 *12, 11 }, { 10*12, 11 }, { 11*12, 11 }, { 12*12, 11 }, { 13*12, 11 }, { 14*12, 11 }, { 15*12, 11 }, { 16*12, 11 }, { 17*12, 11 }, { 18*12, 11 }, { 19*12, 11 }, { 20*12, 11 }, { 21*12, 11 },
+ { 1 *12, 22 }, { 2 *12, 22 }, { 3 *12, 22 }, { 4 *12, 22 }, { 5 *12, 22 }, { 6 *12, 22 }, { 7 *12, 22 }, { 8 *12, 22 }, { 9 *12, 22 }, { 10*12, 22 }, { 11*12, 22 }, { 12*12, 22 }, { 13*12, 22 }, { 14*12, 22 }, { 15*12, 22 }, { 16*12, 22 }, { 17*12, 22 }, { 18*12, 22 }, { 19*12, 22 }, { 20*12, 22 }, { 21*12, 22 },
+ { 1 *12, 33 }, { 2 *12, 33 }, { 3 *12, 33 }, { 4 *12, 33 }, { 5 *12, 33 }, { 6 *12, 33 }, { 7 *12, 33 }, { 8 *12, 33 }, { 9 *12, 33 }, { 10*12, 33 }, { 11*12, 33 }, { 12*12, 33 }, { 13*12, 33 }, { 14*12, 33 }, { 18*12, 33 }, { 19*12, 33 }, { 20*12, 33 },
+ { 1 *12, 44 }, { 2 *12, 44 }, { 3 *12, 44 }, { 4 *12, 44 }, { 5 *12, 44 }, { 6 *12, 44 }, { 7 *12, 44 }, { 8 *12, 44 }, { 9 *12, 44 }, { 10*12, 44 }, { 11*12, 44 }, { 12*12, 44 }, { 14*12, 44 }, { 16*12, 44 }, { 18*12, 44 }, { 19*12, 44 }, { 20*12, 44 }, { 21*12, 44 },
+ { 1 *12, 64 }, { 2 *12, 64 }, { 3 *12, 64 }, { 6 *12, 64 }, { 11 *12, 64 }, { 12 *12, 64 }, { 13 *12, 64 }, { 14 *12, 64 }, { 15*12, 64 }, { 16*12, 64 }, { 17*12, 64 }, { 19*12, 64 }, { 20*12, 64 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/redragon/k556/config_led.h b/keyboards/redragon/k556/config_led.h
new file mode 100644
index 000000000..c8e2b6c78
--- /dev/null
+++ b/keyboards/redragon/k556/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (106)
diff --git a/keyboards/redragon/k556/info.json b/keyboards/redragon/k556/info.json
new file mode 100644
index 000000000..f3f6bb982
--- /dev/null
+++ b/keyboards/redragon/k556/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K556",
+ "url": "https://www.redragonzone.com/products/redragonk556",
+ "maintainer": "CalcProgrammer1",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/redragon/k556/k556.h b/keyboards/redragon/k556/k556.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/redragon/k556/k556.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/redragon/k556/keymaps/default/keymap.c b/keyboards/redragon/k556/keymaps/default/keymap.c
new file mode 100644
index 000000000..8f11916ac
--- /dev/null
+++ b/keyboards/redragon/k556/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = { { 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_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_NO, KC_NO },
+ { 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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, KC_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO },
+ { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, KC_UP, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_NO, KC_RCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_P0, KC_PDOT, KC_NO }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, RGB_TOG, _______, _______, _______, KC_SLEP, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_M_P, RGB_M_B, RGB_M_R, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW, RGB_MOD, RGB_RMOD, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, KC_BRIU, KC_BRID, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______ }
+ }
+};
diff --git a/keyboards/redragon/k556/readme.md b/keyboards/redragon/k556/readme.md
new file mode 100644
index 000000000..987b24fc1
--- /dev/null
+++ b/keyboards/redragon/k556/readme.md
@@ -0,0 +1,13 @@
+# Redragon K556 Devarajas
+
+K556
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k556:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k556/rules.mk b/keyboards/redragon/k556/rules.mk
new file mode 100644
index 000000000..3c977140d
--- /dev/null
+++ b/keyboards/redragon/k556/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/redragon/k580/config.h b/keyboards/redragon/k580/config.h
new file mode 100755
index 000000000..58b22a3e4
--- /dev/null
+++ b/keyboards/redragon/k580/config.h
@@ -0,0 +1,68 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K580
+#define DESCRIPTION K580 VATA
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+/*Encoder support with correct pins*/
+#define ENCODERS_PAD_A { D4 }
+#define ENCODERS_PAD_B { D3 }
+#define ENCODER_DIRECTION_FLIP
+#define ENCODER_RESOLUTION 2
+#define QMK_KEYS_PER_SCAN 4
+
+// wait DELAY ms before unregistering media keys
+#define TAP_CODE_DELAY 5
+
+// Enable NKRO and set polling to 1ms
+#undef FORCE_NKRO
+#define FORCE_NKRO
+#define USB_POLLING_INTERVAL_MS 1
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#define LED_NUM_LOCK_PIN B13
+#define LED_CAPS_LOCK_PIN B14
+#define LED_SCROLL_LOCK_PIN B15
+#define LED_PIN_ON_STATE 0
+
+#include "config_led.h"
diff --git a/keyboards/redragon/k580/config_led.c b/keyboards/redragon/k580/config_led.c
new file mode 100755
index 000000000..3e3b878d4
--- /dev/null
+++ b/keyboards/redragon/k580/config_led.c
@@ -0,0 +1,31 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, NO_LED },
+ { 74, NO_LED, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, 86, NO_LED, 87, 88, 89, 90 },
+ { 91, 92, 93, 94, 95, 96, 97, NO_LED, 98, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 99, 100, 101, NO_LED, 102, 103, NO_LED },
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 15*12, 0 }, { 16*12, 0 }, { 17*12, 0 },
+ { 1 *12, 10 }, { 2 *12, 10 }, { 3 *12, 10 }, { 4 *12, 10 }, { 5 *12, 10 }, { 6 *12, 10 }, { 7 *12, 10 }, { 8 *12, 10 }, { 9 *12, 10 }, { 10*12, 10 }, { 11*12, 10 }, { 12*12, 10 }, { 13*12, 10 }, { 14*12, 10 }, { 15*12, 10 }, { 16*12, 10 }, { 17*12, 10 }, { 18*12, 10 }, { 19*12, 10 }, { 20*12, 10 }, { 21*12, 10 },
+ { 1 *12, 20 }, { 2 *12, 20 }, { 3 *12, 20 }, { 4 *12, 20 }, { 5 *12, 20 }, { 6 *12, 20 }, { 7 *12, 20 }, { 8 *12, 20 }, { 9 *12, 20 }, { 10*12, 20 }, { 11*12, 20 }, { 12*12, 20 }, { 13*12, 20 }, { 14*12, 20 }, { 15*12, 20 }, { 16*12, 20 }, { 17*12, 20 }, { 18*12, 20 }, { 19*12, 20 }, { 20*12, 20 }, { 21*12, 20 },
+ { 1 *12, 30 }, { 2 *12, 30 }, { 3 *12, 30 }, { 4 *12, 30 }, { 5 *12, 30 }, { 6 *12, 30 }, { 7 *12, 30 }, { 8 *12, 30 }, { 9 *12, 30 }, { 10*12, 30 }, { 11*12, 30 }, { 12*12, 30 }, { 14*12, 30 }, { 18*12, 30 }, { 19*12, 30 }, { 20*12, 30 },
+ { 1 *12, 40 }, { 3 *12, 40 }, { 4 *12, 40 }, { 5 *12, 40 }, { 6 *12, 40 }, { 7 *12, 40 }, { 8 *12, 40 }, { 9 *12, 40 }, { 10*12, 40 }, { 11*12, 40 }, { 12*12, 40 }, { 14*12, 40 }, { 16*12, 40 }, { 18*12, 40 }, { 19*12, 40 }, { 20*12, 40 }, { 21*12, 40 },
+ { 1 *12, 50 }, { 2 *12, 50 }, { 3 *12, 50 }, { 4 *12, 50 }, { 11 *12, 50 }, { 12 *12, 50 }, { 13 *12, 50 }, { 14 *12, 50 }, { 15*12, 50 }, { 16*12, 50 }, { 17*12, 50 }, { 19*12, 50 }, { 20*12, 50 },
+ { 0 , 10 }, { 0 , 15 }, { 0 , 20 }, { 0 , 25 }, { 0 , 30 }, { 0 , 35 }, { 0 , 40 }, { 254 , 10 }, { 254 , 15 }, { 254 , 20 }, { 254 , 25 }, { 254 , 30 }, { 254 , 35 }, { 254 , 40 }
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+} };
+
+#endif
diff --git a/keyboards/redragon/k580/config_led.h b/keyboards/redragon/k580/config_led.h
new file mode 100755
index 000000000..6f1f5f3db
--- /dev/null
+++ b/keyboards/redragon/k580/config_led.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define UNDERGLOW_LEDS 14
+#define UNDERGLOW_IDX { 13, 112, 114, 115, 116, 117, 118, 17, 18, 19, 20, 79, 100, 98 }
+
+#define DRIVER_LED_TOTAL (118)
diff --git a/keyboards/redragon/k580/info.json b/keyboards/redragon/k580/info.json
new file mode 100755
index 000000000..67c7905d7
--- /dev/null
+++ b/keyboards/redragon/k580/info.json
@@ -0,0 +1,82 @@
+{
+ "keyboard_name": "K580",
+ "url": "https://www.redragonzone.com/collections/keyboard/products/redragon-k580-gaming-keyboard",
+ "maintainer": "tkon99",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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 },
+ { "x": 15, "y": 1 },
+ { "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 },
+ { "x": 15, "y": 2 },
+ { "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 },
+ { "x": 15, "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": "Ctrl", "x": 11.25, "y": 4, "w": 1.25 },
+ { "x": 13, "y": 4 },
+ { "x": 14, "y": 4 },
+ { "x": 15, "y": 4 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/redragon/k580/k580.h b/keyboards/redragon/k580/k580.h
new file mode 100755
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/redragon/k580/k580.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/redragon/k580/keymaps/default/keymap.c b/keyboards/redragon/k580/keymaps/default/keymap.c
new file mode 100755
index 000000000..22856a6a0
--- /dev/null
+++ b/keyboards/redragon/k580/keymaps/default/keymap.c
@@ -0,0 +1,163 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+// K580 Media Keys
+// 1,20 1,19 6,20 4,20
+// Vol/Brightness Media prev. Play/Pause Media next
+
+// K580 Macro Keys
+// 5,16 5,14 4,16 4,15 4,14 1,13
+// G1 G2 G3 G4 G5 Rec
+
+// Macro Keys (for default keymap)
+enum {
+ U_G1 = SAFE_RANGE,
+ U_G2,
+ U_G3,
+ U_G4,
+ U_G5,
+ U_REC,
+ U_VOLBRI // Volume/Brightness toggle
+};
+bool BRI = false; // Keep track of volume/brightness for the encoder
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = { { 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, U_REC, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_MPRV, U_VOLBRI},
+ { 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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, U_G5, U_G4, U_G3, KC_P4, KC_P5, KC_P6, KC_MNXT },
+ { 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, U_G2, KC_UP, U_G1, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_B, KC_RCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_H, KC_P0, KC_PDOT, KC_MPLY }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, RGB_TOG, _______, _______, _______, KC_SLEP, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_M_P, RGB_M_B, RGB_M_R, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, KC_BRIU, KC_BRID, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______ }
+ }
+};
+
+
+/* Macro LED support
+ {G1, G2, G3, G4, G5, REC} */
+int macro_state[] = {0, 0, 0, 0, 0, 0 };
+
+// Map Macro state to RGB channels of LED indices 77 and 78
+void set_macro_leds(int state[]) {
+ rgb_matrix_set_color(118, state[2]*255, state[1]*255, state[0]*255);
+ rgb_matrix_set_color(119, state[5]*255, state[4]*255, state[3]*255);
+}
+
+void macro_led_toggle(int i) {
+ macro_state[i] = 1-macro_state[i];
+ set_macro_leds(macro_state);
+}
+
+void macro_led_on(int i) {
+ macro_state[i] = 1;
+ set_macro_leds(macro_state);
+}
+
+void macro_led_off(int i) {
+ macro_state[i] = 0;
+ set_macro_leds(macro_state);
+}
+
+void macro_led_clear(void) {
+ for (int i = 0; i < 6; i++){
+ macro_state[i] = 0;
+ }
+ set_macro_leds(macro_state);
+}
+
+
+// Macro support (for default keymap)
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case U_VOLBRI:
+ if (record->event.pressed) {
+ // switch volume/brightness for encoder
+ BRI = !BRI;
+ } else {
+ // on release
+ }
+ break;
+ case U_G1:
+ if (record->event.pressed) {
+ macro_led_toggle(0);
+ }
+ break;
+ case U_G2:
+ if (record->event.pressed) {
+ macro_led_toggle(1);
+ }
+ break;
+ case U_G3:
+ if (record->event.pressed) {
+ macro_led_toggle(2);
+ }
+ break;
+ case U_G4:
+ if (record->event.pressed) {
+ macro_led_toggle(3);
+ }
+ break;
+ case U_G5:
+ if (record->event.pressed) {
+ macro_led_toggle(4);
+ }
+ break;
+ case U_REC:
+ if (record->event.pressed) {
+ macro_led_toggle(5);
+ }
+ break;
+ }
+ return true;
+};
+
+
+//encoder support
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ if(BRI){
+ rgblight_increase_val_noeeprom();
+ }else{
+ tap_code(KC_VOLU);
+ }
+ } else {
+ if(BRI){
+ rgblight_decrease_val_noeeprom();
+ }else{
+ tap_code(KC_VOLD);
+ }
+ }
+ }
+}
diff --git a/keyboards/redragon/k580/keymaps/tkon99/config.h b/keyboards/redragon/k580/keymaps/tkon99/config.h
new file mode 100644
index 000000000..9ee811f87
--- /dev/null
+++ b/keyboards/redragon/k580/keymaps/tkon99/config.h
@@ -0,0 +1,38 @@
+// Disable all RGB effects
+#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define DISABLE_RGB_MATRIX_ALPHAS_MODS
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_BREATHING
+#define DISABLE_RGB_MATRIX_BAND_SAT
+#define DISABLE_RGB_MATRIX_BAND_VAL
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define DISABLE_RGB_MATRIX_CYCLE_ALL
+#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define DISABLE_RGB_MATRIX_DUAL_BEACON
+#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
+#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
+#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#define DISABLE_RGB_MATRIX_RAINDROPS
+#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+#define DISABLE_RGB_MATRIX_TYPING_HEATMAP
+#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+#define DISABLE_RGB_MATRIX_SPLASH
+#define DISABLE_RGB_MATRIX_MULTISPLASH
+#define DISABLE_RGB_MATRIX_SOLID_SPLASH
+#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH \ No newline at end of file
diff --git a/keyboards/redragon/k580/keymaps/tkon99/keymap.c b/keyboards/redragon/k580/keymaps/tkon99/keymap.c
new file mode 100644
index 000000000..7c0174de1
--- /dev/null
+++ b/keyboards/redragon/k580/keymaps/tkon99/keymap.c
@@ -0,0 +1,164 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+// K580 Media Keys
+// 1,20 1,19 6,20 4,20
+// Vol/Brightness Media prev. Play/Pause Media next
+
+// K580 Macro Keys
+// 5,16 5,14 4,16 4,15 4,14 1,13
+// G1 G2 G3 G4 G5 Rec
+
+// Macro Keys (for default keymap)
+enum {
+ U_G1 = SAFE_RANGE,
+ U_G2,
+ U_G3,
+ U_G4,
+ U_G5,
+ U_VOLBRI // Volume/Brightness toggle
+};
+bool BRI = false; // Keep track of volume/brightness for the encoder
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = { { 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, DM_REC1, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_MPRV, U_VOLBRI},
+ { 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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, U_G5, U_G4, U_G3, KC_P4, KC_P5, KC_P6, KC_MNXT },
+ { 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, U_G2, KC_UP, U_G1, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_B, KC_RCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_H, KC_P0, KC_PDOT, KC_MPLY }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, DM_PLY1, _______, _______, _______, KC_SLEP, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, KC_BRIU, KC_BRID, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______, _______, _______, _______, _______ }
+ }
+};
+
+
+/* Macro LED support
+ {G1, G2, G3, G4, G5, REC} */
+int macro_state[] = {0, 0, 0, 0, 0, 0 };
+
+// Map Macro state to RGB channels of LED indices 77 and 78
+void set_macro_leds(int state[]) {
+ rgb_matrix_set_color(118, state[2]*255, state[1]*255, state[0]*255);
+ rgb_matrix_set_color(119, state[5]*255, state[4]*255, state[3]*255);
+}
+
+void macro_led_toggle(int i) {
+ macro_state[i] = 1-macro_state[i];
+ set_macro_leds(macro_state);
+}
+
+void macro_led_on(int i) {
+ macro_state[i] = 1;
+ set_macro_leds(macro_state);
+}
+
+void macro_led_off(int i) {
+ macro_state[i] = 0;
+ set_macro_leds(macro_state);
+}
+
+void macro_led_clear(void) {
+ for (int i = 0; i < 6; i++){
+ macro_state[i] = 0;
+ }
+ set_macro_leds(macro_state);
+}
+
+// Macro support (for default keymap)
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case U_VOLBRI:
+ if (record->event.pressed) {
+ // switch volume/brightness for encoder
+ BRI = !BRI;
+ } else {
+ // on release
+ }
+ break;
+ case U_G1:
+ if (record->event.pressed) {
+ macro_led_toggle(0);
+ }
+ break;
+ case U_G2:
+ if (record->event.pressed) {
+ macro_led_toggle(1);
+ }
+ break;
+ case U_G3:
+ if (record->event.pressed) {
+ macro_led_toggle(2);
+ }
+ break;
+ case U_G4:
+ if (record->event.pressed) {
+ macro_led_toggle(3);
+ }
+ break;
+ case U_G5:
+ if (record->event.pressed) {
+ macro_led_toggle(4);
+ }
+ break;
+ case DM_REC1:
+ macro_led_toggle(5);
+ break;
+ }
+ return true;
+};
+
+//encoder support
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ if(BRI){
+ rgblight_increase_val_noeeprom();
+ }else{
+ tap_code(KC_VOLU);
+ }
+ } else {
+ if(BRI){
+ rgblight_decrease_val_noeeprom();
+ }else{
+ tap_code(KC_VOLD);
+ }
+ }
+ }
+}
+
+// Customize Keyboard - tkon99
+void keyboard_post_init_user(void) {
+ //rgb_matrix_set_color_all(255,255,255);
+ rgb_matrix_sethsv_noeeprom(0, 0, 200);
+}
diff --git a/keyboards/redragon/k580/keymaps/tkon99/rules.mk b/keyboards/redragon/k580/keymaps/tkon99/rules.mk
new file mode 100755
index 000000000..ae4a16811
--- /dev/null
+++ b/keyboards/redragon/k580/keymaps/tkon99/rules.mk
@@ -0,0 +1,68 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+## chip/board settings
+# - the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = SN32
+MCU_SERIES = SN32F240B
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = SN32F240B
+
+# Startup code to use
+# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = sn32f24xb
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = SN_SN32F240B
+
+# Cortex version
+MCU = cortex-m0
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+
+# BOOTLOADER = flash
+SN32_BOOTLOADER_ADDRESS = 0x1FFF0301
+
+OPT_DEFS = -O2
+
+# Options to pass to dfu-util when flashing
+# DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+# DFU_SUFFIX_ARGS = -p DF11 -v 0483
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# ENCODER
+ENCODER_ENABLE =yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
+
+DYNAMIC_MACRO_ENABLE = yes
diff --git a/keyboards/redragon/k580/led_matrix.c b/keyboards/redragon/k580/led_matrix.c
new file mode 100755
index 000000000..020eeac57
--- /dev/null
+++ b/keyboards/redragon/k580/led_matrix.c
@@ -0,0 +1,104 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL + 2];
+#ifdef UNDERGLOW_IDX
+static const unsigned int underglow_led_idx[UNDERGLOW_LEDS] = UNDERGLOW_IDX;
+#endif
+
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+ led_pos[DRIVER_LED_TOTAL] = 77;
+ led_pos[DRIVER_LED_TOTAL + 1] = 78;
+#ifdef UNDERGLOW_IDX
+ i = 0;
+ for (unsigned int x = DRIVER_LED_TOTAL - UNDERGLOW_LEDS; x < DRIVER_LED_TOTAL; x++) {
+ led_pos[x] = underglow_led_idx[i];
+ i++;
+ }
+#endif
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ for (unsigned int i = 0; i < UNDERGLOW_LEDS; i++) {
+ if (corrected_index == underglow_led_idx[i]) {
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = b;
+ led_state[corrected_index].b = g;
+ return;
+ }
+ }
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_NUM_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+}
diff --git a/keyboards/redragon/k580/readme.md b/keyboards/redragon/k580/readme.md
new file mode 100755
index 000000000..3ce1f94a9
--- /dev/null
+++ b/keyboards/redragon/k580/readme.md
@@ -0,0 +1,14 @@
+# Redragon K580 VATA
+
+K580
+
+Keyboard Maintainer: [Thomas Konings](https://github.com/tkon99)
+Based on Redragon K556 by: [Adam Honse](https://github.com/CalcProgrammer1)
+Special thanks to: [HorrorTroll](https://github.com/HorrorTroll) & Saw (A Boot) for figuring out the MCU pins
+Hardware Supported: SN32F240B
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k580:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k580/rules.mk b/keyboards/redragon/k580/rules.mk
new file mode 100755
index 000000000..49ea6aeb3
--- /dev/null
+++ b/keyboards/redragon/k580/rules.mk
@@ -0,0 +1,35 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# ENCODER
+ENCODER_ENABLE =yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
diff --git a/keyboards/redragon/k582/config.h b/keyboards/redragon/k582/config.h
new file mode 100644
index 000000000..bce23b168
--- /dev/null
+++ b/keyboards/redragon/k582/config.h
@@ -0,0 +1,52 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K582
+#define DESCRIPTION K582 Surara
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 10
+
+/* 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
+
+#define LED_NUM_LOCK_PIN B13
+#define LED_CAPS_LOCK_PIN B14
+#define LED_SCROLL_LOCK_PIN B15
+#define LED_PIN_ON_STATE 0
+
+#include "config_led.h"
diff --git a/keyboards/redragon/k582/config_led.c b/keyboards/redragon/k582/config_led.c
new file mode 100644
index 000000000..836a8fe4a
--- /dev/null
+++ b/keyboards/redragon/k582/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, NO_LED },
+ { 74, NO_LED, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, 86, NO_LED, 87, 88, 89, 90 },
+ { 91, 92, 93, 94, 95, 96, 97, NO_LED, 98, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 99, 100, 101, NO_LED, 102, 103, NO_LED }
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 15*12, 0 }, { 16*12, 0 }, { 17*12, 0 },
+ { 1 *12, 1 }, { 2 *12, 1 }, { 3 *12, 1 }, { 4 *12, 1 }, { 5 *12, 1 }, { 6 *12, 1 }, { 7 *12, 1 }, { 8 *12, 1 }, { 9 *12, 1 }, { 10*12, 1 }, { 11*12, 1 }, { 12*12, 1 }, { 13*12, 1 }, { 14*12, 1 }, { 15*12, 1 }, { 16*12, 1 }, { 17*12, 1 }, { 18*12, 1 }, { 19*12, 1 }, { 20*12, 1 }, { 21*12, 1 },
+ { 1 *12, 2 }, { 2 *12, 2 }, { 3 *12, 2 }, { 4 *12, 2 }, { 5 *12, 2 }, { 6 *12, 2 }, { 7 *12, 2 }, { 8 *12, 2 }, { 9 *12, 2 }, { 10*12, 2 }, { 11*12, 2 }, { 12*12, 2 }, { 13*12, 2 }, { 14*12, 2 }, { 15*12, 2 }, { 16*12, 2 }, { 17*12, 2 }, { 18*12, 2 }, { 19*12, 2 }, { 20*12, 2 }, { 21*12, 2 },
+ { 1 *12, 3 }, { 2 *12, 3 }, { 3 *12, 3 }, { 4 *12, 3 }, { 5 *12, 3 }, { 6 *12, 3 }, { 7 *12, 3 }, { 8 *12, 3 }, { 9 *12, 3 }, { 10*12, 3 }, { 11*12, 3 }, { 12*12, 3 }, { 14*12, 3 }, { 18*12, 3 }, { 19*12, 3 }, { 20*12, 3 },
+ { 1 *12, 4 }, { 3 *12, 4 }, { 4 *12, 4 }, { 5 *12, 4 }, { 6 *12, 4 }, { 7 *12, 4 }, { 8 *12, 4 }, { 9 *12, 4 }, { 10*12, 4 }, { 11*12, 4 }, { 12*12, 4 }, { 14*12, 4 }, { 16*12, 4 }, { 18*12, 4 }, { 19*12, 4 }, { 20*12, 4 }, { 21*12, 4 },
+ { 1 *12, 5 }, { 2 *12, 5 }, { 3 *12, 5 }, { 4 *12, 5 }, { 11 *12, 5 }, { 12 *12, 5 }, { 13 *12, 5 }, { 14 *12, 5 }, { 15*12, 5 }, { 16*12, 5 }, { 17*12, 5 }, { 19*12, 5 }, { 20*12, 5 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/redragon/k582/config_led.h b/keyboards/redragon/k582/config_led.h
new file mode 100644
index 000000000..27f3a0e95
--- /dev/null
+++ b/keyboards/redragon/k582/config_led.h
@@ -0,0 +1,31 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (104)
diff --git a/keyboards/redragon/k582/info.json b/keyboards/redragon/k582/info.json
new file mode 100644
index 000000000..051332178
--- /dev/null
+++ b/keyboards/redragon/k582/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K582",
+ "url": "https://redragonshop.com/products/surara-k582",
+ "maintainer": "Krutonium",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/redragon/k582/k582.h b/keyboards/redragon/k582/k582.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/redragon/k582/k582.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/redragon/k582/keymaps/default/keymap.c b/keyboards/redragon/k582/keymaps/default/keymap.c
new file mode 100644
index 000000000..a399af78c
--- /dev/null
+++ b/keyboards/redragon/k582/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = { { 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_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_NO, KC_NO },
+ { 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS },
+ { 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS },
+ { 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_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO },
+ { 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, KC_NO, KC_UP, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_NO, KC_RCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_P0, KC_PDOT, KC_NO }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, RGB_TOG, _______, _______, _______, KC_SLEP, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_M_P, RGB_M_B, RGB_M_R, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, KC_BRIU, KC_BRID, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______ }
+ }
+};
diff --git a/keyboards/redragon/k582/readme.md b/keyboards/redragon/k582/readme.md
new file mode 100644
index 000000000..987b24fc1
--- /dev/null
+++ b/keyboards/redragon/k582/readme.md
@@ -0,0 +1,13 @@
+# Redragon K556 Devarajas
+
+K556
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k556:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k582/rules.mk b/keyboards/redragon/k582/rules.mk
new file mode 100644
index 000000000..97109e0f9
--- /dev/null
+++ b/keyboards/redragon/k582/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/redragon/k630/config.h b/keyboards/redragon/k630/config.h
new file mode 100644
index 000000000..6ad18f191
--- /dev/null
+++ b/keyboards/redragon/k630/config.h
@@ -0,0 +1,47 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x5004
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Redragon
+#define PRODUCT K630
+#define DESCRIPTION K630 Dragonborn
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13 }
+#define MATRIX_ROW_PINS { D11, D10, D9, D8, D7 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#include "config_led.h"
diff --git a/keyboards/redragon/k630/config_led.c b/keyboards/redragon/k630/config_led.c
new file mode 100644
index 000000000..20534deb6
--- /dev/null
+++ b/keyboards/redragon/k630/config_led.c
@@ -0,0 +1,26 @@
+#ifdef RGB_MATRIX_ENABLE
+
+# include "rgb_matrix.h"
+# include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40, },
+ { 41, NO_LED, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52, },
+ { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, 59, 60, },
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 14*12, 0 },
+ { 1 *12, 1 }, { 2 *12, 1 }, { 3 *12, 1 }, { 4 *12, 1 }, { 5 *12, 1 }, { 6 *12, 1 }, { 7 *12, 1 }, { 8 *12, 1 }, { 9 *12, 1 }, { 10*12, 1 }, { 11*12, 1 }, { 12*12, 1 }, { 13*12, 1 }, { 14*12, 1 },
+ { 1 *12, 2 }, { 2 *12, 2 }, { 3 *12, 2 }, { 4 *12, 2 }, { 5 *12, 2 }, { 6 *12, 2 }, { 7 *12, 2 }, { 8 *12, 2 }, { 9 *12, 2 }, { 10*12, 2 }, { 11*12, 2 }, { 12*12, 2 }, { 14*12, 2 },
+ { 1 *12, 3 }, { 3 *12, 3 }, { 4 *12, 3 }, { 5 *12, 3 }, { 6 *12, 3 }, { 7 *12, 3 }, { 8 *12, 3 }, { 9 *12, 3 }, { 10*12, 3 }, { 11*12, 3 }, { 12*12, 3 }, { 14*12, 3 },
+ { 1 *12, 4 }, { 2 *12, 4 }, { 3 *12, 4 }, { 7 *12, 4 }, { 11*12, 4 }, { 12*12, 4 }, { 13*12, 4 }, { 14*12, 4 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/redragon/k630/config_led.h b/keyboards/redragon/k630/config_led.h
new file mode 100644
index 000000000..88e075f5b
--- /dev/null
+++ b/keyboards/redragon/k630/config_led.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (61)
+
+#define LED_CAPS_LOCK_PIN B14
+#define LED_PIN_ON_STATE 0
diff --git a/keyboards/redragon/k630/info.json b/keyboards/redragon/k630/info.json
new file mode 100644
index 000000000..81c85f8fe
--- /dev/null
+++ b/keyboards/redragon/k630/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K630",
+ "url": "https://www.redragonzone.com/products/redragonk630",
+ "maintainer": "RobertoSale",
+ "width": 14,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/redragon/k630/k630.h b/keyboards/redragon/k630/k630.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/redragon/k630/k630.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/redragon/k630/keymaps/default/keymap.c b/keyboards/redragon/k630/keymaps/default/keymap.c
new file mode 100644
index 000000000..39a3b3236
--- /dev/null
+++ b/keyboards/redragon/k630/keymaps/default/keymap.c
@@ -0,0 +1,50 @@
+/*
+Copyright 2021 Adam Honse
+
+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
+
+// 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 al so skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE,
+ _FN,
+ _FN2
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [_BASE] = { { 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_NO, RSFT_T(KC_UP), },
+ { KC_LCTL, KC_LGUI, LALT_T(KC_DEL), KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, LT(_FN,KC_LEFT), LT(_FN2,KC_DOWN), RCTL_T(KC_RIGHT), },
+ },
+ [_FN] = { { 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_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______, },
+ { _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, },
+ },
+ [_FN2] = { { KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, RGB_RMOD, RGB_MOD, RGB_TOG, RGB_VAD, RGB_VAI, _______, },
+ { _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______, },
+ { _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______, _______, },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, },
+ },
+
+};
diff --git a/keyboards/redragon/k630/readme.md b/keyboards/redragon/k630/readme.md
new file mode 100644
index 000000000..08b2b572f
--- /dev/null
+++ b/keyboards/redragon/k630/readme.md
@@ -0,0 +1,13 @@
+# Redragon K630 Dragonborn
+
+K630
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k630:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/redragon/k630/rules.mk b/keyboards/redragon/k630/rules.mk
new file mode 100644
index 000000000..97109e0f9
--- /dev/null
+++ b/keyboards/redragon/k630/rules.mk
@@ -0,0 +1,31 @@
+# project specific files
+SRC = ../../../drivers/sn32/matrix_sn32f24xx.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = SN32F248B
diff --git a/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.c b/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.c
new file mode 100644
index 000000000..a896aea21
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.c
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+ #if SN32_HAS_GPIOA
+ {VAL_GPIOA_MODE},
+ #endif
+ #if SN32_HAS_GPIOB
+ {VAL_GPIOB_MODE},
+ #endif
+ #if SN32_HAS_GPIOC
+ {VAL_GPIOC_MODE},
+ #endif
+ #if SN32_HAS_GPIOD
+ {VAL_GPIOD_MODE},
+ #endif
+};
+#endif
+
+static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
+
+extern void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ sn32_clock_init();
+}
+
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+// SN_GPIO0->MODE = 0xffff;
+// // setP0.0~P0.1, P0.6~P0.7, P0.10~P0.15 to input pull-up
+// SN_GPIO0->CFG = 0x000A0AA0;
+
+// // set P1.2~1.9, P1.12~P1.15 to input pull-up
+// SN_GPIO1->CFG = 0x00A0000A;
+
+// SN_GPIO2->MODE = 0xFFFF;
+// // set P2.4~P2.15 to input pull-up
+// SN_GPIO2->CFG = 0x000000AA;
+
+// // set P3.0~P3.1, P3.4~P3.8 to input pull-up
+// SN_GPIO3->CFG = 0xAAA800A0;
+
+ // Set led pins to output
+// SN_GPIO2->CFG = 0xFFFF;
+// SN_GPIO2->DATA = 0x0; // Set low
+
+ SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
+} \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.h b/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.h
new file mode 100644
index 000000000..99a5982ef
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.h
@@ -0,0 +1,229 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Generic STM32_F303 Board
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_SN32_F240
+#define BOARD_NAME "SN32F240"
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define system_SN32F240
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_PIN0 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_PIN11 11U
+#define GPIOA_PIN12 12U
+#define GPIOA_PIN13 13U
+#define GPIOA_PIN14 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_PIN13 13U
+#define GPIOB_PIN14 14U
+#define GPIOB_PIN15 15U
+
+#define GPIOC_PIN0 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_PIN6 6U
+#define GPIOC_PIN7 7U
+#define GPIOC_PIN8 8U
+#define GPIOC_PIN9 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_PIN14 14U
+#define GPIOC_PIN15 15U
+
+// #define GPIOD_PIN0 0U
+// #define GPIOD_PIN1 1U
+// #define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+// #define GPIOD_PIN12 12U
+// #define GPIOD_PIN13 13U
+// #define GPIOD_PIN14 14U
+// #define GPIOD_PIN15 15U
+
+
+/*
+ * IO lines assignments.
+ */
+// #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
+// #define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+// #define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOD, 5U)
+#define LINE_SWCLK PAL_LINE(GPIOD, 6U)
+
+// #define LINE_PINB8 PAL_LINE(GPIOB, 8U)
+// #define LINE_PINB9 PAL_LINE(GPIOB, 9U)
+
+#define LINE_CAPS_LOCK PAL_LINE(GPIOC, 8U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the SN32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n)))
+#define PIN_MODE_OUTPUT(n) (1U << ((n)))
+#define PIN_MODE_PULLUP(n) (0U << ((n*2)))
+#define PIN_MODE_SCHMITT_EN(n) (10U << ((n*2)))
+#define PIN_MODE_SCHMITT_DIS(n) (11U << ((n*2)))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - PIN0 (input pullup).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA11 - PIN10 (input pullup).
+ * PA11 - PIN11 (input pullup).
+ * PA12 - PIN12 (input pullup).
+ * PA13 - PIN13 (input pullup).
+ * PA14 - PIN14 (input pullup).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODE (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_PIN11) | PIN_MODE_INPUT(GPIOA_PIN12) | PIN_MODE_INPUT(GPIOA_PIN13) | PIN_MODE_INPUT(GPIOA_PIN14) | PIN_MODE_INPUT(GPIOA_PIN15))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - PIN13 (input pullup).
+ * PB14 - PIN14 (input pullup).
+ * PB15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOB_MODE (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
+/*
+ * GPIOC setup:
+ *
+ * PC0 - PIN0 (input pullup).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - PIN6 (input pullup).
+ * PC7 - PIN7 (input pullup).
+ * PC8 - PIN8 (input pullup).
+ * PC9 - PIN9 (input pullup).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - PIN14 (input pullup).
+ * PC15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOC_MODE (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD11 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODE (PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11))
+
+#if !defined(_FROM_ASM_)
+# ifdef __cplusplus
+extern "C" {
+# endif
+void boardInit(void);
+# ifdef __cplusplus
+}
+# endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */ \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.mk b/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.mk
new file mode 100644
index 000000000..e9bfc74b6
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/boards/SN_SN32F240/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/SN_SN32F240/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/SN_SN32F240 \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/chconf.h b/keyboards/sharkoon/sgk3/chconf.h
new file mode 100644
index 000000000..2b863e582
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/halconf.h b/keyboards/sharkoon/sgk3/halconf.h
new file mode 100644
index 000000000..8c25963fc
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/info.json b/keyboards/sharkoon/sgk3/info.json
new file mode 100644
index 000000000..78bc96bbd
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "SKILLER MECH SGK3",
+ "url": "https://en.sharkoon.com/product/SKILLER+MECH+SGK3",
+ "maintainer": "HorrorTroll",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/sharkoon/sgk3/keymaps/ansi/config.h b/keyboards/sharkoon/sgk3/keymaps/ansi/config.h
new file mode 100644
index 000000000..ee4532d93
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/ansi/config.h
@@ -0,0 +1,53 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x8513
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Sharkoon
+#define PRODUCT SGK3
+#define DESCRIPTION SKILLER MECH SGK3
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11, B12, B13, B14, B15 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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 \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/ansi/config_led.c b/keyboards/sharkoon/sgk3/keymaps/ansi/config_led.c
new file mode 100644
index 000000000..659983c5e
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/ansi/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, NO_LED },
+ { 74, NO_LED, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, 86, NO_LED, 87, 88, 89, 90 },
+ { 91, 92, 93, 94, 95, 96, 97, NO_LED, 98, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 99, 100, 101, NO_LED, 102, 103, NO_LED }
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17}, {194, 17}, {204, 17}, {214, 17}, {224, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {139, 29}, {157, 29}, {167, 29}, {177, 29}, {194, 29}, {204, 29}, {214, 29}, {224, 35},
+ {5 , 41}, {19 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {136, 41}, {194, 41}, {204, 41}, {214, 41},
+ {8 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52}, {194, 52}, {204, 52}, {214, 52}, {224, 58},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64}, {199, 64}, {214, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/sharkoon/sgk3/keymaps/ansi/config_led.h b/keyboards/sharkoon/sgk3/keymaps/ansi/config_led.h
new file mode 100644
index 000000000..43100ecc6
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/ansi/config_led.h
@@ -0,0 +1,36 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C3, C1, C4, C15, C14, C5, C7, C6, C8, C10, C9, D0, B6, D1, B7, D3, D2 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (104)
+
+#define LED_NUM_LOCK_PIN D5
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/ansi/keymap.c b/keyboards/sharkoon/sgk3/keymaps/ansi/keymap.c
new file mode 100644
index 000000000..c5b52a3d7
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/ansi/keymap.c
@@ -0,0 +1,178 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "sgk3.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │ │ 4 │ 5 │ 6 │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │ │ 1 │ 2 │ 3 │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │ │ 0 │ , │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │  |  │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │   RShift │     │   │ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │  │ │                  │ │  │ │ │ │   │   │   │ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = LAYOUT_ansi(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │ │ 4 │ 5 │ 6 │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │ │ 1 │ 2 │ 3 │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │ │ 0 │ , │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_GAME] = LAYOUT_ansi(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MyC│Hom│Cal│MeP│ │Prv│Nxt│Ply│Stp│ │Mut│VoD│VoU│ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Hud│Hui│  │ │Mod│Rod│Tog│ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │GAME│ │                  │ │ Fn │ │ │ │Spd│Vad│Spi│ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_FL] = LAYOUT_ansi(
+ RESET, KC_WHOM, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
+ _______, GAME, _______, _______, _______, MO(_FL), _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MyC│Hom│Cal│MeP│ │Prv│Nxt│Ply│Stp│ │Mut│VoD│VoU│ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Hud│Hui│  │ │Mod│Rod│Tog│ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │BASE│ │                  │ │ Fn │ │ │ │Spd│Vad│Spi│ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_CL] = LAYOUT_ansi(
+ RESET, KC_WHOM, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
+ _______, BASE, _______, _______, _______, MO(_CL), _______, _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D5);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/ansi/readme.md b/keyboards/sharkoon/sgk3/keymaps/ansi/readme.md
new file mode 100644
index 000000000..72af889fb
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/ansi/readme.md
@@ -0,0 +1,5 @@
+# ANSI Layout
+
+This is ANSI Layout
+
+How to compile: `qmk compile -kb sharkoon/sgk3 -km ansi` \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/ansi/rules.mk b/keyboards/sharkoon/sgk3/keymaps/ansi/rules.mk
new file mode 100644
index 000000000..dc7840370
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/ansi/rules.mk
@@ -0,0 +1,2 @@
+# project specific files
+SRC += config_led.c
diff --git a/keyboards/sharkoon/sgk3/keymaps/iso/config.h b/keyboards/sharkoon/sgk3/keymaps/iso/config.h
new file mode 100644
index 000000000..ee4532d93
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/iso/config.h
@@ -0,0 +1,53 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x8513
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Sharkoon
+#define PRODUCT SGK3
+#define DESCRIPTION SKILLER MECH SGK3
+
+/* Additional options */
+#define RGB_MATRIX_ENABLE 1
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_STARTUP_SPD 32
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11, B12, B13, B14, B15 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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 \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/iso/config_led.c b/keyboards/sharkoon/sgk3/keymaps/iso/config_led.c
new file mode 100644
index 000000000..52b9e7ec1
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/iso/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, NO_LED },
+ { 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, NO_LED, 86, NO_LED, 87, NO_LED, 88, 89, 90, 91 },
+ { 92, 93, 94, 95, 96, 97, 98, NO_LED, 99, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 100, 101, 102, NO_LED, 103, 104, NO_LED }
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17}, {194, 17}, {204, 17}, {214, 17}, {224, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {129, 41}, {157, 29}, {167, 29}, {177, 29}, {194, 29}, {204, 29}, {214, 29}, {224, 35},
+ {5 , 41}, {19 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {141, 37}, {194, 41}, {204, 41}, {214, 41},
+ {2 , 52}, {12 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52}, {194, 52}, {204, 52}, {214, 52}, {224, 58},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64}, {199, 64}, {214, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/sharkoon/sgk3/keymaps/iso/config_led.h b/keyboards/sharkoon/sgk3/keymaps/iso/config_led.h
new file mode 100644
index 000000000..3197be428
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/iso/config_led.h
@@ -0,0 +1,36 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C3, C1, C4, C15, C14, C5, C7, C6, C8, C10, C9, D0, B6, D1, B7, D3, D2 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (105)
+
+#define LED_NUM_LOCK_PIN D5
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/iso/keymap.c b/keyboards/sharkoon/sgk3/keymaps/iso/keymap.c
new file mode 100644
index 000000000..932c6dc6d
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/iso/keymap.c
@@ -0,0 +1,178 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "sgk3.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │     │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ # │ │ │ 4 │ 5 │ 6 │ │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐ ├───┼───┼───┼───┤
+ │LSft│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │ │ 1 │ 2 │ 3 │  │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ @ │ ~ │ │ │ │ │ │ │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐ ├───┼───┼───┼───┤
+ │LSft│ | │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │ RShift │     │   │ │  │  │  │  │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │  │ │                  │ │  │ │ │ │   │   │   │ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = LAYOUT_iso(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ 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_NUHS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │     │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ # │ │ │ 4 │ 5 │ 6 │ │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐ ├───┼───┼───┼───┤
+ │LSft│ \ │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │ │ 1 │ 2 │ 3 │  │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_GAME] = LAYOUT_iso(
+ 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_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ 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_NUHS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │Hom│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │
+ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐ ├───┼───┼───┼───┤
+ │  │  │   │   │   │   │   │   │   │   │   │   │     │     │Vai│ │  │  │  │  │
+ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │GAME│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_FL] = LAYOUT_iso(
+ RESET, KC_WHOM, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
+ _______, GAME, _______, _______, _______, MO(_FL), _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │Hom│VoD│VoU│Mut│ │Stp│Prv│Ply│Nxt│ │Mai│Hom│Cal│Sch│ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Spd│Spi│  │ │Mod│Rod│Tog│ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │BASE│ │                  │ │ Fn │ │ │ │Hud│Vad│Hui│ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_CL] = LAYOUT_iso(
+ RESET, KC_WHOM, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_MOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
+ _______, BASE, _______, _______, _______, MO(_CL), _______, _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D5);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/iso/readme.md b/keyboards/sharkoon/sgk3/keymaps/iso/readme.md
new file mode 100644
index 000000000..8d3358e7d
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/iso/readme.md
@@ -0,0 +1,5 @@
+# ISO layout
+
+This is ISO layout
+
+How to compile: `qmk compile -kb sharkoon/sgk3 -km iso` \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/keymaps/iso/rules.mk b/keyboards/sharkoon/sgk3/keymaps/iso/rules.mk
new file mode 100644
index 000000000..dc7840370
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/keymaps/iso/rules.mk
@@ -0,0 +1,2 @@
+# project specific files
+SRC += config_led.c
diff --git a/keyboards/sharkoon/sgk3/led_matrix.c b/keyboards/sharkoon/sgk3/led_matrix.c
new file mode 100644
index 000000000..daae2680f
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/led_matrix.c
@@ -0,0 +1,83 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_NUM_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+} \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/matrix.c b/keyboards/sharkoon/sgk3/matrix.c
new file mode 100644
index 000000000..f0b5ff34e
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/matrix.c
@@ -0,0 +1,578 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+#include "CT32.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clocks
+ SN_SYS1->AHBCLKEN_b.CT16B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B2CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B2CLKEN = 1;
+
+ // Set Timer Clock Prescalers
+ SN_SYS1->APBCP0_b.CT16B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT16B1PRE = 0x00;
+ SN_SYS1->APBCP1_b.CT16B2PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B1PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B2PRE = 0x00;
+
+ // PFPA Timer Mapping
+ // CT16B0 PWM0 P0.0 Col 0
+ // PWM1 P0.1 Col 1
+ // CT16B1 PWM1 P1.3 Col 13
+ // PWM2 P0.15 Col 9
+ // CT16B2 PWM0 P0.2 Col 2
+ // PWM1 P1.4 Col 14
+ // PWM2 P1.0 Col 10
+ // CT32B0 PWM0 P0.4 Col 4
+ // PWM1 P1.11 Col 16
+ // PWM3 P1.2 Col 12
+ // CT32B1 PWM1 P1.10 Col 15
+ // PWM2 P0.5 Col 5
+ // PWM3 P0.7 Col 7
+ // CT32B2 PWM0 P1.1 Col 11
+ // PWM1 P0.14 Col 8
+ // PWM2 P0.3 Col 3
+ // PWM3 P0.6 Col 6
+ SN_PFPA->CT16B0 = 0x00000;
+ SN_PFPA->CT16B1 = 0x02330;
+ SN_PFPA->CT16B2 = 0x02010;
+ SN_PFPA->CT32B0 = 0x00410;
+ SN_PFPA->CT32B1 = 0x21300;
+ SN_PFPA->CT32B2 = 0x00030;
+
+ // Set match interrupts and TC reset for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x28;
+ SN_CT16B1->PRE = 0x28;
+ SN_CT16B2->PRE = 0x28;
+ SN_CT32B0->PRE = 0x28;
+ SN_CT32B1->PRE = 0x28;
+ SN_CT32B2->PRE = 0x28;
+
+ // Enable PWM on all timers
+ SN_CT16B0->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B1->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B0->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B1->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+
+ // Enable IO
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+
+ // Clear match registers
+ SN_CT16B0->MR0 = 0x0;
+ SN_CT16B0->MR1 = 0x0;
+ SN_CT16B0->MR2 = 0x0;
+ SN_CT16B1->MR0 = 0x0;
+ SN_CT16B1->MR1 = 0x0;
+ SN_CT16B1->MR2 = 0x0;
+ SN_CT16B1->MR3 = 0x0;
+ SN_CT16B2->MR0 = 0x0;
+ SN_CT16B2->MR1 = 0x0;
+ SN_CT16B2->MR2 = 0x0;
+ SN_CT16B2->MR3 = 0x0;
+ SN_CT32B0->MR0 = 0x0;
+ SN_CT32B0->MR1 = 0x0;
+ SN_CT32B0->MR2 = 0x0;
+ SN_CT32B0->MR3 = 0x0;
+ SN_CT32B1->MR0 = 0x0;
+ SN_CT32B1->MR1 = 0x0;
+ SN_CT32B1->MR2 = 0x0;
+ SN_CT32B1->MR3 = 0x0;
+ SN_CT32B2->MR0 = 0x0;
+ SN_CT32B2->MR1 = 0x0;
+ SN_CT32B2->MR2 = 0x0;
+ SN_CT32B2->MR3 = 0x0;
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B0_IRQn);
+ nvicEnableVector(CT16B0_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+/**
+ * @brief MR1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B0_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B0->PWMCTRL = 0;
+ SN_CT16B1->PWMCTRL = 0;
+ SN_CT16B2->PWMCTRL = 0;
+ SN_CT32B0->PWMCTRL = 0;
+ SN_CT32B1->PWMCTRL = 0;
+ SN_CT32B2->PWMCTRL = 0;
+
+ SN_CT16B0->IC = mskCT16_MR3IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ // Read the key matrix
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Enable the column
+ writePinLow(col_pins[col_index]);
+
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ for (uint8_t delay_idx = 0; delay_idx < 20; delay_idx++)
+ {
+ writePinHigh(col_pins[col_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ if (current_row % 3 == 0)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].r;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].r;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].r;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].r;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].r;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].r;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].r;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].r;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].r;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].r;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].r;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].r;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].r;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].r;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].r;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].r;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].r;
+ }
+
+ if (current_row % 3 == 1)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].g;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].g;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].g;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].g;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].g;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].g;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].g;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].g;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].g;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].g;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].g;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].g;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].g;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].g;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].g;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].g;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].g;
+ }
+
+ if (current_row % 3 == 2)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].b;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].b;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].b;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].b;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].b;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].b;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].b;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].b;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].b;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].b;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].b;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].b;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].b;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].b;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].b;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].b;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].b;
+ }
+
+ // Enable PWM on all timers
+ if(SN_CT16B0->MR0 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT16B0->MR1 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR0 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT32B2->MR2 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B0->MR0 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B1->MR2 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR3 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B1->MR3 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B2->MR1 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT16B2->MR2 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR0 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR3 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR1 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT32B1->MR1 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT32B0->MR1 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B0->MR2 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B1->MR0 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR2 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT16B1->MR0 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+
+ // Set match interrupts and TC rest for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
+
+void HardFault_Handler(void) {
+ NVIC_SystemReset();
+} \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/mcuconf.h b/keyboards/sharkoon/sgk3/mcuconf.h
new file mode 100644
index 000000000..2cb5fd2a1
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/mcuconf.h
@@ -0,0 +1,101 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_CT_IRQ_PRIORITY 2
+#define SN32_CT_USE_TIMER 2
+
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define SN32_USB_USE_USB1 TRUE
+#define SN32_USB_LOW_POWER_ON_SUSPEND TRUE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+#define CRT1_AREAS_NUMBER 1
+
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SN32_PWM_USE_TIM1 FALSE
+#define SN32_PWM_USE_TIM2 TRUE
+#define SN32_PWM_TIM1_IRQ_PRIORITY 3
+#define SN32_PWM_TIM2_IRQ_PRIORITY 3
+
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0x2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC 0
+#define ILRC 1
+#define EHSXTAL 2
+#define ELSXTAL 3
+#define PLL 4
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+#define __IHRC_FREQ (12000000UL)
+#define __ILRC_FREQ (32000UL)
+#define __ELS_XTAL_FREQ (32768UL)
+
+#if (SYS_CLOCK_SETUP)
+#define SYS0_PLLCTRL_VAL (PLL_ENABLE<<15) | (PLL_CLKIN<<12) | (PLL_FSEL<<8) | (PLL_PSEL<<5) | PLL_MSEL
+#endif
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */ \ No newline at end of file
diff --git a/keyboards/sharkoon/sgk3/readme.md b/keyboards/sharkoon/sgk3/readme.md
new file mode 100644
index 000000000..39765cd9a
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/readme.md
@@ -0,0 +1,13 @@
+# Sharkoon SKILLER MECH SGK3
+
+SKILLER MECH SGK3
+
+Keyboard Maintainer: [HorrorTroll](https://github.com/HorrorTroll)
+Heavily based on Redragon K552-1 by: [HorrorTroll](https://github.com/HorrorTroll)
+Hardware Supported: SN32F248F
+
+Make example for this keyboard (after setting up your build environment):
+
+ make sharkoon/sgk3:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/sharkoon/sgk3/rules.mk b/keyboards/sharkoon/sgk3/rules.mk
new file mode 100644
index 000000000..fa7198768
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/rules.mk
@@ -0,0 +1,30 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+
+# MCU name
+MCU = SN32F248F
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
diff --git a/keyboards/sharkoon/sgk3/sgk3.h b/keyboards/sharkoon/sgk3/sgk3.h
new file mode 100644
index 000000000..f93b76455
--- /dev/null
+++ b/keyboards/sharkoon/sgk3/sgk3.h
@@ -0,0 +1,53 @@
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, \
+ k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \
+ k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, \
+ k74, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k90, k91, \
+ k92, k93, k94, k95, k96, k97, k98, k99, k100, k101, k102, k103, k104 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15, XXX, XXX, XXX, XXX }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36 }, \
+ { k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57 }, \
+ { k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, XXX, XXX, XXX, k72, k73, k74, XXX }, \
+ { k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, XXX, k87, XXX, k88, XXX, k89, k90, k91, k92 }, \
+ { k93, k94, k95, k96, k97, k98, k99, XXX, k100, XXX, XXX, XXX, XXX, XXX, k101, k102, k103, XXX, k104, k105, XXX } \
+}
+
+#define LAYOUT_ansi( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, \
+ k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \
+ k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, \
+ k74, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k90, \
+ k91, k92, k93, k94, k95, k96, k97, k98, k99, k100, k101, k102, k103 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15, XXX, XXX, XXX, XXX }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36 }, \
+ { k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57 }, \
+ { k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, k70, XXX, XXX, XXX, k71, k72, k73, XXX }, \
+ { k74, XXX, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, XXX, k85, XXX, k86, XXX, k87, k88, k89, k90 }, \
+ { k91, k92, k93, k94, k95, k96, k97, XXX, k98, XXX, XXX, XXX, XXX, XXX, k99, k100, k101, XXX, k102, k103, XXX } \
+}
+
+#define LAYOUT_iso( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, \
+ k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, \
+ k57, k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, \
+ k74, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k90, k91, \
+ k92, k93, k94, k95, k96, k97, k98, k99, k100, k101, k102, k103, k104 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15, XXX, XXX, XXX, XXX }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36 }, \
+ { k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57 }, \
+ { k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, k70, XXX, XXX, XXX, k71, k72, k73, XXX }, \
+ { k74, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, XXX, k86, XXX, k87, XXX, k88, k89, k90, k91 }, \
+ { k92, k93, k94, k95, k96, k97, k98, XXX, k99, XXX, XXX, XXX, XXX, XXX, k100, k101, k102, XXX, k103, k104, XXX } \
+}
diff --git a/keyboards/smartduck/xs61/config.h b/keyboards/smartduck/xs61/config.h
new file mode 100644
index 000000000..e245dd72d
--- /dev/null
+++ b/keyboards/smartduck/xs61/config.h
@@ -0,0 +1,47 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x320F
+#define PRODUCT_ID 0x5019
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Smart Duck
+#define PRODUCT XS61
+#define DESCRIPTION XS61 Smart Duck
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS {A8, A9, A10, A11, A12, A13, A14, A15, B0, B1, B2, B3, B4, B5 }
+#define MATRIX_ROW_PINS { D7, D6, D5, D4, D3 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#include "config_led.h"
diff --git a/keyboards/smartduck/xs61/config_led.c b/keyboards/smartduck/xs61/config_led.c
new file mode 100644
index 000000000..7f34cd502
--- /dev/null
+++ b/keyboards/smartduck/xs61/config_led.c
@@ -0,0 +1,27 @@
+
+#ifdef RGB_MATRIX_ENABLE
+
+# include "rgb_matrix.h"
+# include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40, },
+ { 41, NO_LED, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52, },
+ { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, 59, 60, },
+}, {
+ { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 14*12, 0 },
+ { 1 *12, 1 }, { 2 *12, 1 }, { 3 *12, 1 }, { 4 *12, 1 }, { 5 *12, 1 }, { 6 *12, 1 }, { 7 *12, 1 }, { 8 *12, 1 }, { 9 *12, 1 }, { 10*12, 1 }, { 11*12, 1 }, { 12*12, 1 }, { 13*12, 1 }, { 14*12, 1 },
+ { 1 *12, 2 }, { 2 *12, 2 }, { 3 *12, 2 }, { 4 *12, 2 }, { 5 *12, 2 }, { 6 *12, 2 }, { 7 *12, 2 }, { 8 *12, 2 }, { 9 *12, 2 }, { 10*12, 2 }, { 11*12, 2 }, { 12*12, 2 }, { 14*12, 2 },
+ { 1 *12, 3 }, { 3 *12, 3 }, { 4 *12, 3 }, { 5 *12, 3 }, { 6 *12, 3 }, { 7 *12, 3 }, { 8 *12, 3 }, { 9 *12, 3 }, { 10*12, 3 }, { 11*12, 3 }, { 12*12, 3 }, { 14*12, 3 },
+ { 1 *12, 4 }, { 2 *12, 4 }, { 3 *12, 4 }, { 7 *12, 4 }, { 11*12, 4 }, { 12*12, 4 }, { 13*12, 4 }, { 14*12, 4 },
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif \ No newline at end of file
diff --git a/keyboards/smartduck/xs61/config_led.h b/keyboards/smartduck/xs61/config_led.h
new file mode 100644
index 000000000..5a6fa5bf4
--- /dev/null
+++ b/keyboards/smartduck/xs61/config_led.h
@@ -0,0 +1,31 @@
+/*
+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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS {C15, C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14}
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (61)
+
+#define LED_PIN_ON_STATE 0
diff --git a/keyboards/smartduck/xs61/info.json b/keyboards/smartduck/xs61/info.json
new file mode 100644
index 000000000..ff10c5955
--- /dev/null
+++ b/keyboards/smartduck/xs61/info.json
@@ -0,0 +1,74 @@
+{
+ "keyboard_name": "RK61 Mechanical keyboard",
+ "url": "http://www.rkgaming.com/en-US/article.php?id=54",
+ "maintainer": "qmk",
+ "width": 14,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"ESC", "x":0, "y":0},
+ {"label":"1", "x":1, "y":0},
+ {"label":"2", "x":2, "y":0},
+ {"label":"3", "x":3, "y":0},
+ {"label":"4", "x":4, "y":0},
+ {"label":"5", "x":5, "y":0},
+ {"label":"6", "x":6, "y":0},
+ {"label":"7", "x":7, "y":0},
+ {"label":"8", "x":8, "y":0},
+ {"label":"9", "x":9, "y":0},
+ {"label":"0", "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":"Menu", "x":11.25, "y":4, "w":1.25},
+ {"label":"Ctrl", "x":12.5, "y":4, "w":1.25},
+ {"label":"FN", "x":13.75, "y":4}
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/smartduck/xs61/keymaps/default/keymap.c b/keyboards/smartduck/xs61/keymaps/default/keymap.c
new file mode 100644
index 000000000..9693e6d20
--- /dev/null
+++ b/keyboards/smartduck/xs61/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 */
+ [0] = {
+ { 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_NO, KC_RSFT, },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, KC_APP, KC_RCTL, MO(1),}
+ },
+ [1] = {
+ { 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_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RGB_MODE_FORWARD, KC_TRNS, RGB_HUI, RGB_SAI, BL_TOGG, },
+ { RESET, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, KC_TRNS, KC_TRNS, },
+ { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, },
+ { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, }
+ }
+}; \ No newline at end of file
diff --git a/keyboards/smartduck/xs61/led_matrix.c b/keyboards/smartduck/xs61/led_matrix.c
new file mode 100644
index 000000000..1eeeb6c4e
--- /dev/null
+++ b/keyboards/smartduck/xs61/led_matrix.c
@@ -0,0 +1,77 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+} \ No newline at end of file
diff --git a/keyboards/smartduck/xs61/matrix.c b/keyboards/smartduck/xs61/matrix.c
new file mode 100644
index 000000000..64cc00ffc
--- /dev/null
+++ b/keyboards/smartduck/xs61/matrix.c
@@ -0,0 +1,362 @@
+/*
+Copyright 2011 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/>.
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240B.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinOutput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clock
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+
+ // PFPA - Map all PWM outputs to their PWM A pins
+ SN_PFPA->CT16B1 = 0x00000000;
+
+ // Enable PWM function, IOs and select the PWM modes
+ // Enable PWM0-PWM3, PWM8-PWM20 function (except PWM10)
+ SN_CT16B1->PWMENB = (mskCT16_PWM8EN_EN \
+ |mskCT16_PWM9EN_EN \
+ |mskCT16_PWM10EN_EN \
+ |mskCT16_PWM11EN_EN \
+ |mskCT16_PWM12EN_EN \
+ |mskCT16_PWM13EN_EN \
+ |mskCT16_PWM14EN_EN \
+ |mskCT16_PWM15EN_EN \
+ |mskCT16_PWM16EN_EN \
+ |mskCT16_PWM17EN_EN \
+ |mskCT16_PWM18EN_EN \
+ |mskCT16_PWM19EN_EN \
+ |mskCT16_PWM20EN_EN \
+ |mskCT16_PWM21EN_EN);
+
+ // Enable PWM0-PWM3, PWM8-PWM20 IO (except PWM10)
+ SN_CT16B1->PWMIOENB = (mskCT16_PWM8EN_EN \
+ |mskCT16_PWM9EN_EN \
+ |mskCT16_PWM10EN_EN \
+ |mskCT16_PWM11EN_EN \
+ |mskCT16_PWM12EN_EN \
+ |mskCT16_PWM13EN_EN \
+ |mskCT16_PWM14EN_EN \
+ |mskCT16_PWM15EN_EN \
+ |mskCT16_PWM16EN_EN \
+ |mskCT16_PWM17EN_EN \
+ |mskCT16_PWM18EN_EN \
+ |mskCT16_PWM19EN_EN \
+ |mskCT16_PWM20EN_EN \
+ |mskCT16_PWM21EN_EN);
+
+ // Set match interrupts and TC rest
+ SN_CT16B1->MCTRL3 = (mskCT16_MR22IE_EN | mskCT16_MR22STOP_EN);
+
+ // COL match register
+ SN_CT16B1->MR22 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B1->PRE = 0x02;
+
+ //Set CT16B1 as the up-counting mode.
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+
+ // Wait until timer reset done.
+ while (SN_CT16B1->TMRCTRL & mskCT16_CRST);
+
+ // Let TC start counting.
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B1_IRQn);
+ nvicEnableVector(CT16B1_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[15] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4 };
+/**
+ * @brief CT16B1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B1_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B1->PWMIOENB = 0;
+
+ SN_CT16B1->IC = mskCT16_MR22IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ if(current_row == 0)
+ {
+ // Set all column pins input high
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ setPinInputHigh(col_pins[col_index]);
+ }
+
+ // Read the key matrix
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Enable the row
+ writePinLow(row_pins[row_index]);
+
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Check row pin state
+ if (readPin(col_pins[col_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the row
+ writePinHigh(row_pins[row_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set CT16B1 as the up-counting mode.
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+
+ // Wait until timer reset done.
+ while (SN_CT16B1->TMRCTRL & mskCT16_CRST);
+
+ if(current_row % 3 == 0)
+ {
+ SN_CT16B1->MR8 = led_state[row_ofst + 0 ].r;
+ SN_CT16B1->MR9 = led_state[row_ofst + 1 ].r;
+ SN_CT16B1->MR10 = led_state[row_ofst + 2 ].r;
+ SN_CT16B1->MR11 = led_state[row_ofst + 3 ].r;
+ SN_CT16B1->MR12 = led_state[row_ofst + 4 ].r;
+ SN_CT16B1->MR13 = led_state[row_ofst + 5 ].r;
+ SN_CT16B1->MR14 = led_state[row_ofst + 6 ].r;
+ SN_CT16B1->MR15 = led_state[row_ofst + 7 ].r;
+ SN_CT16B1->MR16 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR17 = led_state[row_ofst + 9 ].r;
+ SN_CT16B1->MR18 = led_state[row_ofst + 10].r;
+ SN_CT16B1->MR19 = led_state[row_ofst + 11].r;
+ SN_CT16B1->MR20 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR21 = led_state[row_ofst + 13].r;
+ }
+
+ if(current_row % 3 == 1)
+ {
+ SN_CT16B1->MR8 = led_state[row_ofst + 0 ].b;
+ SN_CT16B1->MR9 = led_state[row_ofst + 1 ].b;
+ SN_CT16B1->MR10 = led_state[row_ofst + 2 ].b;
+ SN_CT16B1->MR11 = led_state[row_ofst + 3 ].b;
+ SN_CT16B1->MR12 = led_state[row_ofst + 4 ].b;
+ SN_CT16B1->MR13 = led_state[row_ofst + 5 ].b;
+ SN_CT16B1->MR14 = led_state[row_ofst + 6 ].b;
+ SN_CT16B1->MR15 = led_state[row_ofst + 7 ].b;
+ SN_CT16B1->MR16 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR17 = led_state[row_ofst + 9 ].b;
+ SN_CT16B1->MR18 = led_state[row_ofst + 10].b;
+ SN_CT16B1->MR19 = led_state[row_ofst + 11].b;
+ SN_CT16B1->MR20 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR21 = led_state[row_ofst + 13].b;
+ }
+
+ if(current_row % 3 == 2)
+ {
+ SN_CT16B1->MR8 = led_state[row_ofst + 0 ].g;
+ SN_CT16B1->MR9 = led_state[row_ofst + 1 ].g;
+ SN_CT16B1->MR10 = led_state[row_ofst + 2 ].g;
+ SN_CT16B1->MR11 = led_state[row_ofst + 3 ].g;
+ SN_CT16B1->MR12 = led_state[row_ofst + 4 ].g;
+ SN_CT16B1->MR13 = led_state[row_ofst + 5 ].g;
+ SN_CT16B1->MR14 = led_state[row_ofst + 6 ].g;
+ SN_CT16B1->MR15 = led_state[row_ofst + 7 ].g;
+ SN_CT16B1->MR16 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR17 = led_state[row_ofst + 9 ].g;
+ SN_CT16B1->MR18 = led_state[row_ofst + 10].g;
+ SN_CT16B1->MR19 = led_state[row_ofst + 11].g;
+ SN_CT16B1->MR20 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR21 = led_state[row_ofst + 13].g;
+ }
+
+ // Enable PWM outputs on column pins
+ //SN_CT16B1->PWMIOENB = 0;
+
+ if(SN_CT16B1->MR7 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM7EN_EN;
+ }
+ if(SN_CT16B1->MR8 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM8EN_EN;
+ }
+ if(SN_CT16B1->MR9 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM9EN_EN;
+ }
+ if(SN_CT16B1->MR10 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM10EN_EN;
+ }
+ if(SN_CT16B1->MR11 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM11EN_EN;
+ }
+ if(SN_CT16B1->MR12 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM12EN_EN;
+ }
+ if(SN_CT16B1->MR13 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM13EN_EN;
+ }
+ if(SN_CT16B1->MR14 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM14EN_EN;
+ }
+ if(SN_CT16B1->MR15 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM15EN_EN;
+ }
+ if(SN_CT16B1->MR16 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM16EN_EN;
+ }
+ if(SN_CT16B1->MR17 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM17EN_EN;
+ }
+ if(SN_CT16B1->MR18 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM18EN_EN;
+ }
+ if(SN_CT16B1->MR19 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM19EN_EN;
+ }
+ if(SN_CT16B1->MR20 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM20EN_EN;
+ }
+ if(SN_CT16B1->MR21 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM21EN_EN;
+ }
+
+ // Set match interrupts and TC rest
+ SN_CT16B1->MCTRL3 = (mskCT16_MR22IE_EN | mskCT16_MR22STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting.
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+} \ No newline at end of file
diff --git a/keyboards/smartduck/xs61/readme.md b/keyboards/smartduck/xs61/readme.md
new file mode 100644
index 000000000..1e473232f
--- /dev/null
+++ b/keyboards/smartduck/xs61/readme.md
@@ -0,0 +1,12 @@
+# SmartDuck xs61
+
+xs61
+
+Keyboard Maintainer:
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make smartduck/xs61:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/smartduck/xs61/rules.mk b/keyboards/smartduck/xs61/rules.mk
new file mode 100644
index 000000000..ba30bb481
--- /dev/null
+++ b/keyboards/smartduck/xs61/rules.mk
@@ -0,0 +1,32 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom \ No newline at end of file
diff --git a/keyboards/smartduck/xs61/xs61.h b/keyboards/smartduck/xs61/xs61.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/smartduck/xs61/xs61.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/spcgear/gk530/boards/SN_SN32F240/board.c b/keyboards/spcgear/gk530/boards/SN_SN32F240/board.c
new file mode 100644
index 000000000..a896aea21
--- /dev/null
+++ b/keyboards/spcgear/gk530/boards/SN_SN32F240/board.c
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+ #if SN32_HAS_GPIOA
+ {VAL_GPIOA_MODE},
+ #endif
+ #if SN32_HAS_GPIOB
+ {VAL_GPIOB_MODE},
+ #endif
+ #if SN32_HAS_GPIOC
+ {VAL_GPIOC_MODE},
+ #endif
+ #if SN32_HAS_GPIOD
+ {VAL_GPIOD_MODE},
+ #endif
+};
+#endif
+
+static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
+
+extern void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ sn32_clock_init();
+}
+
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+// SN_GPIO0->MODE = 0xffff;
+// // setP0.0~P0.1, P0.6~P0.7, P0.10~P0.15 to input pull-up
+// SN_GPIO0->CFG = 0x000A0AA0;
+
+// // set P1.2~1.9, P1.12~P1.15 to input pull-up
+// SN_GPIO1->CFG = 0x00A0000A;
+
+// SN_GPIO2->MODE = 0xFFFF;
+// // set P2.4~P2.15 to input pull-up
+// SN_GPIO2->CFG = 0x000000AA;
+
+// // set P3.0~P3.1, P3.4~P3.8 to input pull-up
+// SN_GPIO3->CFG = 0xAAA800A0;
+
+ // Set led pins to output
+// SN_GPIO2->CFG = 0xFFFF;
+// SN_GPIO2->DATA = 0x0; // Set low
+
+ SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/boards/SN_SN32F240/board.h b/keyboards/spcgear/gk530/boards/SN_SN32F240/board.h
new file mode 100644
index 000000000..99a5982ef
--- /dev/null
+++ b/keyboards/spcgear/gk530/boards/SN_SN32F240/board.h
@@ -0,0 +1,229 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Generic STM32_F303 Board
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_SN32_F240
+#define BOARD_NAME "SN32F240"
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define system_SN32F240
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_PIN0 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_PIN11 11U
+#define GPIOA_PIN12 12U
+#define GPIOA_PIN13 13U
+#define GPIOA_PIN14 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_PIN13 13U
+#define GPIOB_PIN14 14U
+#define GPIOB_PIN15 15U
+
+#define GPIOC_PIN0 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_PIN6 6U
+#define GPIOC_PIN7 7U
+#define GPIOC_PIN8 8U
+#define GPIOC_PIN9 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_PIN14 14U
+#define GPIOC_PIN15 15U
+
+// #define GPIOD_PIN0 0U
+// #define GPIOD_PIN1 1U
+// #define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+// #define GPIOD_PIN12 12U
+// #define GPIOD_PIN13 13U
+// #define GPIOD_PIN14 14U
+// #define GPIOD_PIN15 15U
+
+
+/*
+ * IO lines assignments.
+ */
+// #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
+// #define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+// #define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOD, 5U)
+#define LINE_SWCLK PAL_LINE(GPIOD, 6U)
+
+// #define LINE_PINB8 PAL_LINE(GPIOB, 8U)
+// #define LINE_PINB9 PAL_LINE(GPIOB, 9U)
+
+#define LINE_CAPS_LOCK PAL_LINE(GPIOC, 8U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the SN32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n)))
+#define PIN_MODE_OUTPUT(n) (1U << ((n)))
+#define PIN_MODE_PULLUP(n) (0U << ((n*2)))
+#define PIN_MODE_SCHMITT_EN(n) (10U << ((n*2)))
+#define PIN_MODE_SCHMITT_DIS(n) (11U << ((n*2)))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - PIN0 (input pullup).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA11 - PIN10 (input pullup).
+ * PA11 - PIN11 (input pullup).
+ * PA12 - PIN12 (input pullup).
+ * PA13 - PIN13 (input pullup).
+ * PA14 - PIN14 (input pullup).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODE (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_PIN11) | PIN_MODE_INPUT(GPIOA_PIN12) | PIN_MODE_INPUT(GPIOA_PIN13) | PIN_MODE_INPUT(GPIOA_PIN14) | PIN_MODE_INPUT(GPIOA_PIN15))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - PIN13 (input pullup).
+ * PB14 - PIN14 (input pullup).
+ * PB15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOB_MODE (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
+/*
+ * GPIOC setup:
+ *
+ * PC0 - PIN0 (input pullup).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - PIN6 (input pullup).
+ * PC7 - PIN7 (input pullup).
+ * PC8 - PIN8 (input pullup).
+ * PC9 - PIN9 (input pullup).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - PIN14 (input pullup).
+ * PC15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOC_MODE (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD11 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODE (PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11))
+
+#if !defined(_FROM_ASM_)
+# ifdef __cplusplus
+extern "C" {
+# endif
+void boardInit(void);
+# ifdef __cplusplus
+}
+# endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/boards/SN_SN32F240/board.mk b/keyboards/spcgear/gk530/boards/SN_SN32F240/board.mk
new file mode 100644
index 000000000..e9bfc74b6
--- /dev/null
+++ b/keyboards/spcgear/gk530/boards/SN_SN32F240/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/SN_SN32F240/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/SN_SN32F240 \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/chconf.h b/keyboards/spcgear/gk530/chconf.h
new file mode 100644
index 000000000..2b863e582
--- /dev/null
+++ b/keyboards/spcgear/gk530/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/config.h b/keyboards/spcgear/gk530/config.h
new file mode 100644
index 000000000..9bd0e0e70
--- /dev/null
+++ b/keyboards/spcgear/gk530/config.h
@@ -0,0 +1,41 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x8508
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER SPCGear
+#define PRODUCT GK530
+#define DESCRIPTION GK530 Tournament
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
diff --git a/keyboards/spcgear/gk530/config_led.c b/keyboards/spcgear/gk530/config_led.c
new file mode 100644
index 000000000..6ccfea184
--- /dev/null
+++ b/keyboards/spcgear/gk530/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 },
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, NO_LED, 62, NO_LED, NO_LED, NO_LED },
+ { 63, NO_LED, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED, 74, NO_LED, 75, NO_LED },
+ { 76, 77, 78, 79, 80, 81, 82, NO_LED, 83, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 84, 85, 86 }
+}, {
+ {0 , 0}, {26 , 0}, {39 , 0}, {52 , 0}, {65 , 0}, {84 , 0}, {97 , 0}, {110, 0}, {123, 0}, {143, 0}, {156, 0}, {169, 0}, {182, 0}, {198, 0}, {211, 0}, {224, 0},
+ {0 , 17}, {13 , 17}, {26 , 17}, {39 , 17}, {52 , 17}, {65 , 17}, {78 , 17}, {91 , 17}, {104, 17}, {117, 17}, {130, 17}, {143, 17}, {156, 17}, {175, 17}, {198, 17}, {211, 17}, {224, 17},
+ {3 , 29}, {19 , 29}, {32 , 29}, {45 , 29}, {58 , 29}, {71 , 29}, {84 , 29}, {97 , 29}, {110, 29}, {123, 29}, {136, 29}, {149, 29}, {162, 29}, {179, 29}, {198, 29}, {211, 29}, {224, 29},
+ {5 , 41}, {23 , 41}, {36 , 41}, {49 , 41}, {62 , 41}, {75 , 41}, {88 , 41}, {101, 41}, {114, 41}, {127, 41}, {140, 41}, {153, 41}, {174, 41},
+ {8 , 52}, {29 , 52}, {42 , 52}, {55 , 52}, {68 , 52}, {81 , 52}, {94 , 52}, {107, 52}, {120, 52}, {133, 52}, {146, 52}, {170, 52}, {211, 52},
+ {2 , 64}, {18 , 64}, {34 , 64}, {83 , 64}, {131, 64}, {148, 64}, {164, 64}, {180, 64}, {198, 64}, {211, 64}, {224, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/config_led.h b/keyboards/spcgear/gk530/config_led.h
new file mode 100644
index 000000000..90d7a6284
--- /dev/null
+++ b/keyboards/spcgear/gk530/config_led.h
@@ -0,0 +1,35 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C14, C15, C5, C6, C7, C8, C9, C10, D0, D1, B6, B7, D2, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (87)
+
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/gk530.h b/keyboards/spcgear/gk530/gk530.h
new file mode 100644
index 000000000..0baddef68
--- /dev/null
+++ b/keyboards/spcgear/gk530/gk530.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, \
+ k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, \
+ k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, \
+ k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, \
+ k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15 }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32 }, \
+ { k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \
+ { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, XXX, k62, XXX, XXX, XXX }, \
+ { k63, XXX, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, XXX, k74, XXX, k75, XXX }, \
+ { k76, k77, k78, k79, k80, k81, k82, XXX, k83, XXX, XXX, XXX, XXX, XXX, k84, k85, k86 } \
+}
diff --git a/keyboards/spcgear/gk530/halconf.h b/keyboards/spcgear/gk530/halconf.h
new file mode 100644
index 000000000..8c25963fc
--- /dev/null
+++ b/keyboards/spcgear/gk530/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/info.json b/keyboards/spcgear/gk530/info.json
new file mode 100644
index 000000000..794672e81
--- /dev/null
+++ b/keyboards/spcgear/gk530/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "GK530",
+ "url": "https://spcgear.com/en/product/gk530-tournament-kailh-blue-rgb-2/",
+ "maintainer": "HorrorTroll",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/spcgear/gk530/keymaps/default/keymap.c b/keyboards/spcgear/gk530/keymaps/default/keymap.c
new file mode 100644
index 000000000..4f9ca98cb
--- /dev/null
+++ b/keyboards/spcgear/gk530/keymaps/default/keymap.c
@@ -0,0 +1,177 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "gk530.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │  |  │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │    │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │   RShift │     │   │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │  │ │                  │ │  │ │ │ │   │   │   │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = 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_PSCR, KC_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_GAME] = 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_PSCR, KC_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP,
+ 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_DEL, KC_END, KC_PGDN,
+ 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_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_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MyC│Hom│Cal│MeP│ │Prv│Nxt│Ply│Stp│ │Mut│VoD│VoU│ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Hud│Hui│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │GAME│ │                  │ │ Fn │ │ │ │Spd│Vad│Spi│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_FL] = LAYOUT_all(
+ RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, GAME, _______, _______, _______, MO(_FL), _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MyC│Hom│Cal│MeP│ │Prv│Nxt│Ply│Stp│ │Mut│VoD│VoU│ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Hud│Hui│  │ │Mod│Rod│Tog│
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
+ │ │BASE│ │                  │ │ Fn │ │ │ │Spd│Vad│Spi│
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_CL] = LAYOUT_all(
+ RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
+ _______, BASE, _______, _______, _______, MO(_CL), _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/keymaps/default/readme.md b/keyboards/spcgear/gk530/keymaps/default/readme.md
new file mode 100644
index 000000000..7977aaa27
--- /dev/null
+++ b/keyboards/spcgear/gk530/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# ANSI Layout
+
+This is ANSI Layout
+
+How to compile: `qmk compile -kb spcgear/gk530 -km default` \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/led_matrix.c b/keyboards/spcgear/gk530/led_matrix.c
new file mode 100644
index 000000000..62d5d9650
--- /dev/null
+++ b/keyboards/spcgear/gk530/led_matrix.c
@@ -0,0 +1,82 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/matrix.c b/keyboards/spcgear/gk530/matrix.c
new file mode 100644
index 000000000..98b881278
--- /dev/null
+++ b/keyboards/spcgear/gk530/matrix.c
@@ -0,0 +1,533 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+#include "CT32.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clocks
+ SN_SYS1->AHBCLKEN_b.CT16B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B2CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B2CLKEN = 1;
+
+ // Set Timer Clock Prescalers
+ SN_SYS1->APBCP0_b.CT16B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT16B1PRE = 0x00;
+ SN_SYS1->APBCP1_b.CT16B2PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B1PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B2PRE = 0x00;
+
+ // PFPA Timer Mapping
+ // CT16B0 PWM0 P0.0 Col 0
+ // PWM1 P0.1 Col 1
+ // CT16B1 PWM1 P1.3 Col 13
+ // PWM2 P0.15 Col 9
+ // CT16B2 PWM0 P0.2 Col 2
+ // PWM1 P1.4 Col 14
+ // PWM2 P1.0 Col 10
+ // CT32B0 PWM0 P0.4 Col 4
+ // PWM1 P1.11 Col 16
+ // PWM3 P1.2 Col 12
+ // CT32B1 PWM1 P1.10 Col 15
+ // PWM2 P0.5 Col 5
+ // PWM3 P0.7 Col 7
+ // CT32B2 PWM0 P1.1 Col 11
+ // PWM1 P0.14 Col 8
+ // PWM2 P0.3 Col 3
+ // PWM3 P0.6 Col 6
+ SN_PFPA->CT16B0 = 0x00000;
+ SN_PFPA->CT16B1 = 0x02330;
+ SN_PFPA->CT16B2 = 0x02010;
+ SN_PFPA->CT32B0 = 0x00410;
+ SN_PFPA->CT32B1 = 0x21300;
+ SN_PFPA->CT32B2 = 0x00030;
+
+ // Set match interrupts and TC reset for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x28;
+ SN_CT16B1->PRE = 0x28;
+ SN_CT16B2->PRE = 0x28;
+ SN_CT32B0->PRE = 0x28;
+ SN_CT32B1->PRE = 0x28;
+ SN_CT32B2->PRE = 0x28;
+
+ // Enable PWM on all timers
+ SN_CT16B0->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN);
+ SN_CT16B1->PWMCTRL =
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B2->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT32B0->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B1->PWMCTRL =
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+
+ // Enable IO
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+
+ // Clear match registers
+ SN_CT16B0->MR0 = 0x0;
+ SN_CT16B0->MR1 = 0x0;
+ SN_CT16B0->MR2 = 0x0;
+ SN_CT16B1->MR0 = 0x0;
+ SN_CT16B1->MR1 = 0x0;
+ SN_CT16B1->MR2 = 0x0;
+ SN_CT16B1->MR3 = 0x0;
+ SN_CT16B2->MR0 = 0x0;
+ SN_CT16B2->MR1 = 0x0;
+ SN_CT16B2->MR2 = 0x0;
+ SN_CT16B2->MR3 = 0x0;
+ SN_CT32B0->MR0 = 0x0;
+ SN_CT32B0->MR1 = 0x0;
+ SN_CT32B0->MR2 = 0x0;
+ SN_CT32B0->MR3 = 0x0;
+ SN_CT32B1->MR0 = 0x0;
+ SN_CT32B1->MR1 = 0x0;
+ SN_CT32B1->MR2 = 0x0;
+ SN_CT32B1->MR3 = 0x0;
+ SN_CT32B2->MR0 = 0x0;
+ SN_CT32B2->MR1 = 0x0;
+ SN_CT32B2->MR2 = 0x0;
+ SN_CT32B2->MR3 = 0x0;
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B0_IRQn);
+ nvicEnableVector(CT16B0_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+/**
+ * @brief MR1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B0_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B0->PWMCTRL = 0;
+ SN_CT16B1->PWMCTRL = 0;
+ SN_CT16B2->PWMCTRL = 0;
+ SN_CT32B0->PWMCTRL = 0;
+ SN_CT32B1->PWMCTRL = 0;
+ SN_CT32B2->PWMCTRL = 0;
+
+ SN_CT16B0->IC = mskCT16_MR3IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ // Read the key matrix
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Enable the column
+ writePinLow(col_pins[col_index]);
+
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ for (uint8_t delay_idx = 0; delay_idx < 20; delay_idx++)
+ {
+ writePinHigh(col_pins[col_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ if (current_row % 3 == 0)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].r;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].r;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].r;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].r;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].r;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].r;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].r;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].r;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].r;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].r;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].r;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].r;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].r;
+ }
+
+ if (current_row % 3 == 1)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].g;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].g;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].g;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].g;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].g;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].g;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].g;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].g;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].g;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].g;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].g;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].g;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].g;
+ }
+
+ if (current_row % 3 == 2)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].b;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].b;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].b;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].b;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].b;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].b;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].b;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].b;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].b;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].b;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].b;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].b;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].b;
+ }
+
+ // Enable PWM on all timers
+ if(SN_CT16B0->MR0 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT16B0->MR1 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR0 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT32B2->MR2 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B0->MR0 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B1->MR2 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR3 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B1->MR3 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B2->MR1 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT16B2->MR2 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR0 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR3 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR1 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT32B1->MR1 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT32B0->MR1 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+
+ // Set match interrupts and TC rest for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
+
+void HardFault_Handler(void) {
+ NVIC_SystemReset();
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/mcuconf.h b/keyboards/spcgear/gk530/mcuconf.h
new file mode 100644
index 000000000..2cb5fd2a1
--- /dev/null
+++ b/keyboards/spcgear/gk530/mcuconf.h
@@ -0,0 +1,101 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_CT_IRQ_PRIORITY 2
+#define SN32_CT_USE_TIMER 2
+
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define SN32_USB_USE_USB1 TRUE
+#define SN32_USB_LOW_POWER_ON_SUSPEND TRUE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+#define CRT1_AREAS_NUMBER 1
+
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SN32_PWM_USE_TIM1 FALSE
+#define SN32_PWM_USE_TIM2 TRUE
+#define SN32_PWM_TIM1_IRQ_PRIORITY 3
+#define SN32_PWM_TIM2_IRQ_PRIORITY 3
+
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0x2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC 0
+#define ILRC 1
+#define EHSXTAL 2
+#define ELSXTAL 3
+#define PLL 4
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+#define __IHRC_FREQ (12000000UL)
+#define __ILRC_FREQ (32000UL)
+#define __ELS_XTAL_FREQ (32768UL)
+
+#if (SYS_CLOCK_SETUP)
+#define SYS0_PLLCTRL_VAL (PLL_ENABLE<<15) | (PLL_CLKIN<<12) | (PLL_FSEL<<8) | (PLL_PSEL<<5) | PLL_MSEL
+#endif
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk530/readme.md b/keyboards/spcgear/gk530/readme.md
new file mode 100644
index 000000000..a1b962234
--- /dev/null
+++ b/keyboards/spcgear/gk530/readme.md
@@ -0,0 +1,13 @@
+# SPCGear GK530 Tournament
+
+GK530
+
+Keyboard Maintainer: [HorrorTroll](https://github.com/HorrorTroll)
+Heavily based on Redragon K552-1 by: [HorrorTroll](https://github.com/HorrorTroll)
+Hardware Supported: SN32F248F
+
+Make example for this keyboard (after setting up your build environment):
+
+ make spcgear/gk530:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/spcgear/gk530/rules.mk b/keyboards/spcgear/gk530/rules.mk
new file mode 100644
index 000000000..1138b9263
--- /dev/null
+++ b/keyboards/spcgear/gk530/rules.mk
@@ -0,0 +1,62 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+## chip/board settings
+# - the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = SN32
+MCU_SERIES = SN32F240
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = SN32F240
+
+# Startup code to use
+# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = sn32f24x
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = SN_SN32F240
+
+# Cortex version
+MCU = cortex-m0
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+
+# BOOTLOADER = flash
+SN32_BOOTLOADER_ADDRESS = 0x1FFF0301
+
+OPT_DEFS = -O2
+
+# Options to pass to dfu-util when flashing
+# DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+# DFU_SUFFIX_ARGS = -p DF11 -v 0483
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
diff --git a/keyboards/spcgear/gk540/boards/SN_SN32F240/board.c b/keyboards/spcgear/gk540/boards/SN_SN32F240/board.c
new file mode 100644
index 000000000..a896aea21
--- /dev/null
+++ b/keyboards/spcgear/gk540/boards/SN_SN32F240/board.c
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+ #if SN32_HAS_GPIOA
+ {VAL_GPIOA_MODE},
+ #endif
+ #if SN32_HAS_GPIOB
+ {VAL_GPIOB_MODE},
+ #endif
+ #if SN32_HAS_GPIOC
+ {VAL_GPIOC_MODE},
+ #endif
+ #if SN32_HAS_GPIOD
+ {VAL_GPIOD_MODE},
+ #endif
+};
+#endif
+
+static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
+
+extern void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ sn32_clock_init();
+}
+
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+// SN_GPIO0->MODE = 0xffff;
+// // setP0.0~P0.1, P0.6~P0.7, P0.10~P0.15 to input pull-up
+// SN_GPIO0->CFG = 0x000A0AA0;
+
+// // set P1.2~1.9, P1.12~P1.15 to input pull-up
+// SN_GPIO1->CFG = 0x00A0000A;
+
+// SN_GPIO2->MODE = 0xFFFF;
+// // set P2.4~P2.15 to input pull-up
+// SN_GPIO2->CFG = 0x000000AA;
+
+// // set P3.0~P3.1, P3.4~P3.8 to input pull-up
+// SN_GPIO3->CFG = 0xAAA800A0;
+
+ // Set led pins to output
+// SN_GPIO2->CFG = 0xFFFF;
+// SN_GPIO2->DATA = 0x0; // Set low
+
+ SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/boards/SN_SN32F240/board.h b/keyboards/spcgear/gk540/boards/SN_SN32F240/board.h
new file mode 100644
index 000000000..99a5982ef
--- /dev/null
+++ b/keyboards/spcgear/gk540/boards/SN_SN32F240/board.h
@@ -0,0 +1,229 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for Generic STM32_F303 Board
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_SN32_F240
+#define BOARD_NAME "SN32F240"
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define system_SN32F240
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_PIN0 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_PIN11 11U
+#define GPIOA_PIN12 12U
+#define GPIOA_PIN13 13U
+#define GPIOA_PIN14 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_PIN13 13U
+#define GPIOB_PIN14 14U
+#define GPIOB_PIN15 15U
+
+#define GPIOC_PIN0 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_PIN6 6U
+#define GPIOC_PIN7 7U
+#define GPIOC_PIN8 8U
+#define GPIOC_PIN9 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_PIN14 14U
+#define GPIOC_PIN15 15U
+
+// #define GPIOD_PIN0 0U
+// #define GPIOD_PIN1 1U
+// #define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+// #define GPIOD_PIN12 12U
+// #define GPIOD_PIN13 13U
+// #define GPIOD_PIN14 14U
+// #define GPIOD_PIN15 15U
+
+
+/*
+ * IO lines assignments.
+ */
+// #define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U)
+// #define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+// #define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOD, 5U)
+#define LINE_SWCLK PAL_LINE(GPIOD, 6U)
+
+// #define LINE_PINB8 PAL_LINE(GPIOB, 8U)
+// #define LINE_PINB9 PAL_LINE(GPIOB, 9U)
+
+#define LINE_CAPS_LOCK PAL_LINE(GPIOC, 8U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the SN32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n)))
+#define PIN_MODE_OUTPUT(n) (1U << ((n)))
+#define PIN_MODE_PULLUP(n) (0U << ((n*2)))
+#define PIN_MODE_SCHMITT_EN(n) (10U << ((n*2)))
+#define PIN_MODE_SCHMITT_DIS(n) (11U << ((n*2)))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - PIN0 (input pullup).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA11 - PIN10 (input pullup).
+ * PA11 - PIN11 (input pullup).
+ * PA12 - PIN12 (input pullup).
+ * PA13 - PIN13 (input pullup).
+ * PA14 - PIN14 (input pullup).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODE (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_INPUT(GPIOA_PIN11) | PIN_MODE_INPUT(GPIOA_PIN12) | PIN_MODE_INPUT(GPIOA_PIN13) | PIN_MODE_INPUT(GPIOA_PIN14) | PIN_MODE_INPUT(GPIOA_PIN15))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - PIN13 (input pullup).
+ * PB14 - PIN14 (input pullup).
+ * PB15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOB_MODE (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15))
+/*
+ * GPIOC setup:
+ *
+ * PC0 - PIN0 (input pullup).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - PIN6 (input pullup).
+ * PC7 - PIN7 (input pullup).
+ * PC8 - PIN8 (input pullup).
+ * PC9 - PIN9 (input pullup).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - PIN14 (input pullup).
+ * PC15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOC_MODE (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD11 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODE (PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11))
+
+#if !defined(_FROM_ASM_)
+# ifdef __cplusplus
+extern "C" {
+# endif
+void boardInit(void);
+# ifdef __cplusplus
+}
+# endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/boards/SN_SN32F240/board.mk b/keyboards/spcgear/gk540/boards/SN_SN32F240/board.mk
new file mode 100644
index 000000000..e9bfc74b6
--- /dev/null
+++ b/keyboards/spcgear/gk540/boards/SN_SN32F240/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/SN_SN32F240/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/SN_SN32F240 \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/chconf.h b/keyboards/spcgear/gk540/chconf.h
new file mode 100644
index 000000000..2b863e582
--- /dev/null
+++ b/keyboards/spcgear/gk540/chconf.h
@@ -0,0 +1,700 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file rt/templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+# define CHCONF_H
+
+# define _CHIBIOS_RT_CONF_
+# define _CHIBIOS_RT_CONF_VER_6_0_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_ST_RESOLUTION)
+# define CH_CFG_ST_RESOLUTION 32
+# endif
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+# if !defined(CH_CFG_ST_FREQUENCY)
+# define CH_CFG_ST_FREQUENCY 10000
+# endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+# if !defined(CH_CFG_INTERVALS_SIZE)
+# define CH_CFG_INTERVALS_SIZE 32
+# endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+# if !defined(CH_CFG_TIME_TYPES_SIZE)
+# define CH_CFG_TIME_TYPES_SIZE 32
+# endif
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+# if !defined(CH_CFG_ST_TIMEDELTA)
+# define CH_CFG_ST_TIMEDELTA 0
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+# if !defined(CH_CFG_TIME_QUANTUM)
+# define CH_CFG_TIME_QUANTUM 0
+# endif
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+# if !defined(CH_CFG_MEMCORE_SIZE)
+# define CH_CFG_MEMCORE_SIZE 0
+# endif
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+# if !defined(CH_CFG_NO_IDLE_THREAD)
+# define CH_CFG_NO_IDLE_THREAD FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_OPTIMIZE_SPEED)
+# define CH_CFG_OPTIMIZE_SPEED FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_TM)
+# define CH_CFG_USE_TM FALSE
+# endif
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_REGISTRY)
+# define CH_CFG_USE_REGISTRY TRUE
+# endif
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_WAITEXIT)
+# define CH_CFG_USE_WAITEXIT TRUE
+# endif
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES)
+# define CH_CFG_USE_SEMAPHORES TRUE
+# endif
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
+# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MUTEXES)
+# define CH_CFG_USE_MUTEXES TRUE
+# endif
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
+# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+# endif
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+# if !defined(CH_CFG_USE_CONDVARS)
+# define CH_CFG_USE_CONDVARS TRUE
+# endif
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
+# define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+# endif
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_EVENTS)
+# define CH_CFG_USE_EVENTS TRUE
+# endif
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
+# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MESSAGES)
+# define CH_CFG_USE_MESSAGES TRUE
+# endif
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
+# define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+# endif
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+# if !defined(CH_CFG_USE_MAILBOXES)
+# define CH_CFG_USE_MAILBOXES TRUE
+# endif
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMCORE)
+# define CH_CFG_USE_MEMCORE FALSE
+# endif
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+# if !defined(CH_CFG_USE_HEAP)
+# define CH_CFG_USE_HEAP FALSE
+# endif
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_MEMPOOLS)
+# define CH_CFG_USE_MEMPOOLS FALSE
+# endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_OBJ_FIFOS)
+# define CH_CFG_USE_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+# if !defined(CH_CFG_USE_PIPES)
+# define CH_CFG_USE_PIPES FALSE
+# endif
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+# if !defined(CH_CFG_USE_DYNAMIC)
+# define CH_CFG_USE_DYNAMIC FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_CFG_USE_FACTORY)
+# define CH_CFG_USE_FACTORY FALSE
+# endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+# endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+# define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+# endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+# define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+# endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+# if !defined(CH_CFG_FACTORY_SEMAPHORES)
+# define CH_CFG_FACTORY_SEMAPHORES FALSE
+# endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+# if !defined(CH_CFG_FACTORY_MAILBOXES)
+# define CH_CFG_FACTORY_MAILBOXES FALSE
+# endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+# define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+# endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+# define CH_CFG_FACTORY_PIPES FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_STATISTICS)
+# define CH_DBG_STATISTICS FALSE
+# endif
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
+# define CH_DBG_SYSTEM_STATE_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_CHECKS)
+# define CH_DBG_ENABLE_CHECKS FALSE
+# endif
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_ENABLE_ASSERTS)
+# define CH_DBG_ENABLE_ASSERTS FALSE
+# endif
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_MASK)
+# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+# endif
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+# define CH_DBG_TRACE_BUFFER_SIZE 128
+# endif
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+# if !defined(CH_DBG_ENABLE_STACK_CHECK)
+# define CH_DBG_ENABLE_STACK_CHECK FALSE
+# endif
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+# if !defined(CH_DBG_FILL_THREADS)
+# define CH_DBG_FILL_THREADS FALSE
+# endif
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+# if !defined(CH_DBG_THREADS_PROFILING)
+# define CH_DBG_THREADS_PROFILING FALSE
+# endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+# define CH_CFG_SYSTEM_INIT_HOOK() \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p _thread_init() function.
+ *
+ * @note It is invoked from within @p _thread_init() and implicitly from all
+ * the threads creation APIs.
+ */
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ }
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ }
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
+ { /* Context switch code here.*/ }
+
+/**
+ * @brief ISR enter hook.
+ */
+# define CH_CFG_IRQ_PROLOGUE_HOOK() \
+ { /* IRQ prologue code here.*/ }
+
+/**
+ * @brief ISR exit hook.
+ */
+# define CH_CFG_IRQ_EPILOGUE_HOOK() \
+ { /* IRQ epilogue code here.*/ }
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+# define CH_CFG_IDLE_ENTER_HOOK() \
+ { /* Idle-enter code here.*/ }
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+# define CH_CFG_IDLE_LEAVE_HOOK() \
+ { /* Idle-leave code here.*/ }
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+# define CH_CFG_IDLE_LOOP_HOOK() \
+ { /* Idle loop code here.*/ }
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ }
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
+ { /* System halt code here.*/ }
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+# define CH_CFG_TRACE_HOOK(tep) \
+ { /* Trace code here.*/ }
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/config.h b/keyboards/spcgear/gk540/config.h
new file mode 100644
index 000000000..488fd2a7c
--- /dev/null
+++ b/keyboards/spcgear/gk540/config.h
@@ -0,0 +1,41 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+#include "config_led.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0C45
+#define PRODUCT_ID 0x8508
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER SPCGear
+#define PRODUCT GK540
+#define DESCRIPTION GK540 Magna
+
+/* Key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 21
+
+#define DIODE_DIRECTION ROW2COL
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11, B12, B13, B14, B15 }
+#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
diff --git a/keyboards/spcgear/gk540/config_led.c b/keyboards/spcgear/gk540/config_led.c
new file mode 100644
index 000000000..659983c5e
--- /dev/null
+++ b/keyboards/spcgear/gk540/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 },
+ { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, NO_LED, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, NO_LED },
+ { 74, NO_LED, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, NO_LED, 85, NO_LED, 86, NO_LED, 87, 88, 89, 90 },
+ { 91, 92, 93, 94, 95, 96, 97, NO_LED, 98, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 99, 100, 101, NO_LED, 102, 103, NO_LED }
+}, {
+ {0 , 0}, {20 , 0}, {30 , 0}, {40 , 0}, {50 , 0}, {65 , 0}, {75 , 0}, {85 , 0}, {95 , 0}, {110, 0}, {120, 0}, {130, 0}, {140, 0}, {157, 0}, {167, 0}, {177, 0},
+ {0 , 17}, {10 , 17}, {20 , 17}, {30 , 17}, {40 , 17}, {50 , 17}, {60 , 17}, {70 , 17}, {80 , 17}, {90 , 17}, {100, 17}, {110, 17}, {120, 17}, {137, 17}, {157, 17}, {167, 17}, {177, 17}, {194, 17}, {204, 17}, {214, 17}, {224, 17},
+ {3 , 29}, {15 , 29}, {25 , 29}, {35 , 29}, {45 , 29}, {55 , 29}, {65 , 29}, {75 , 29}, {85 , 29}, {95 , 29}, {105, 29}, {115, 29}, {125, 29}, {139, 29}, {157, 29}, {167, 29}, {177, 29}, {194, 29}, {204, 29}, {214, 29}, {224, 35},
+ {5 , 41}, {19 , 41}, {29 , 41}, {39 , 41}, {49 , 41}, {59 , 41}, {69 , 41}, {79 , 41}, {89 , 41}, {99 , 41}, {109, 41}, {119, 41}, {136, 41}, {194, 41}, {204, 41}, {214, 41},
+ {8 , 52}, {22 , 52}, {32 , 52}, {42 , 52}, {52 , 52}, {62 , 52}, {72 , 52}, {82 , 52}, {92 , 52}, {102, 52}, {112, 52}, {132, 52}, {167, 52}, {194, 52}, {204, 52}, {214, 52}, {224, 58},
+ {2 , 64}, {13 , 64}, {26 , 64}, {66 , 64}, {105, 64}, {118, 64}, {131, 64}, {144, 64}, {157, 64}, {167, 64}, {177, 64}, {199, 64}, {214, 64},
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+} };
+
+#endif
diff --git a/keyboards/spcgear/gk540/config_led.h b/keyboards/spcgear/gk540/config_led.h
new file mode 100644
index 000000000..1f9091315
--- /dev/null
+++ b/keyboards/spcgear/gk540/config_led.h
@@ -0,0 +1,36 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C14, C15, C5, C6, C7, C8, C9, C10, D0, D1, B6, B7, D2, D3 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (104)
+
+#define LED_NUM_LOCK_PIN D5
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN D7
+#define LED_PIN_ON_STATE 0 \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/gk540.h b/keyboards/spcgear/gk540/gk540.h
new file mode 100644
index 000000000..6e54d9f02
--- /dev/null
+++ b/keyboards/spcgear/gk540/gk540.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_all( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \
+ k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, \
+ k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \
+ k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73, \
+ k74, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k90, \
+ k91, k92, k93, k94, k95, k96, k97, k98, k99, k100, k101, k102, k103 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, XXX, k13, k14, k15, XXX, XXX, XXX, XXX }, \
+ { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36 }, \
+ { k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57 }, \
+ { k58, k59, k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, k70, XXX, XXX, XXX, k71, k72, k73, XXX }, \
+ { k74, XXX, k75, k76, k77, k78, k79, k80, k81, k82, k83, k84, XXX, k85, XXX, k86, XXX, k87, k88, k89, k90 }, \
+ { k91, k92, k93, k94, k95, k96, k97, XXX, k98, XXX, XXX, XXX, XXX, XXX, k99, k100, k101, XXX, k102, k103, XXX } \
+}
diff --git a/keyboards/spcgear/gk540/halconf.h b/keyboards/spcgear/gk540/halconf.h
new file mode 100644
index 000000000..8c25963fc
--- /dev/null
+++ b/keyboards/spcgear/gk540/halconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef HALCONF_H
+# define HALCONF_H
+
+# define _CHIBIOS_HAL_CONF_
+# define _CHIBIOS_HAL_CONF_VER_7_0_
+
+# include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+# define HAL_USE_PAL TRUE
+# endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+# define HAL_USE_ADC FALSE
+# endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+# define HAL_USE_CAN FALSE
+# endif
+
+/**
+ * @brief Enables the cryptographic subsystem.
+ */
+# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+# define HAL_USE_CRY FALSE
+# endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+# define HAL_USE_DAC FALSE
+# endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+# define HAL_USE_GPT FALSE
+# endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+# define HAL_USE_I2C FALSE
+# endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+# define HAL_USE_I2S FALSE
+# endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+# define HAL_USE_ICU FALSE
+# endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+# define HAL_USE_MAC FALSE
+# endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_MMC_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+# define HAL_USE_PWM FALSE
+# endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+# define HAL_USE_RTC FALSE
+# endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+# define HAL_USE_SDC FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL FALSE
+# endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+# define HAL_USE_SERIAL_USB TRUE
+# endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+# define HAL_USE_SIO FALSE
+# endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+# define HAL_USE_SPI FALSE
+# endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+# define HAL_USE_TRNG FALSE
+# endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+# define HAL_USE_UART FALSE
+# endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+# define HAL_USE_USB TRUE
+# endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+# define HAL_USE_WDG FALSE
+# endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+# define HAL_USE_WSPI FALSE
+# endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define PAL_USE_CALLBACKS FALSE
+# endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+# define PAL_USE_WAIT FALSE
+# endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+# define ADC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define ADC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+# define CAN_USE_SLEEP_MODE TRUE
+# endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+# define CAN_ENFORCE_USE_CALLBACKS FALSE
+# endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_USE_FALLBACK FALSE
+# endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+# define HAL_CRY_ENFORCE_FALLBACK FALSE
+# endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+# define DAC_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define DAC_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define I2C_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the zero-copy API.
+ */
+# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+# define MAC_USE_ZERO_COPY FALSE
+# endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+# define MAC_USE_EVENTS TRUE
+# endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+# define MMC_NICE_WAITING TRUE
+# endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+# define SDC_INIT_RETRY 100
+# endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+# define SDC_MMC_SUPPORT FALSE
+# endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+# define SDC_NICE_WAITING TRUE
+# endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR_V20 0x50FF8000U
+# endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+# define SDC_INIT_OCR 0x80100000U
+# endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+# define SERIAL_DEFAULT_BITRATE 38400
+# endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 16 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_BUFFERS_SIZE 16
+# endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 256 bytes for both the transmission and receive
+ * buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_SIZE 1
+# endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+# define SERIAL_USB_BUFFERS_NUMBER 2
+# endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+# define SPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+# define SPI_USE_CIRCULAR FALSE
+# endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define SPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+# endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+# define UART_USE_WAIT FALSE
+# endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define UART_USE_MUTUAL_EXCLUSION FALSE
+# endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+# define USB_USE_WAIT TRUE
+# endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+# define WSPI_USE_WAIT TRUE
+# endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+# define WSPI_USE_MUTUAL_EXCLUSION TRUE
+# endif
+
+#endif /* HALCONF_H */
+
+/** @} */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/info.json b/keyboards/spcgear/gk540/info.json
new file mode 100644
index 000000000..8288c749b
--- /dev/null
+++ b/keyboards/spcgear/gk540/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "GK540",
+ "url": "https://spcgear.com/en/product/gk540-magna-kailh-red-rgb/",
+ "maintainer": "HorrorTroll",
+ "width": 21,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/spcgear/gk540/keymaps/default/keymap.c b/keyboards/spcgear/gk540/keymaps/default/keymap.c
new file mode 100644
index 000000000..77dc42263
--- /dev/null
+++ b/keyboards/spcgear/gk540/keymaps/default/keymap.c
@@ -0,0 +1,180 @@
+/*
+Copyright 2019 Stephen Peery
+
+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 "gk540.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.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _BASE = 0,
+ _GAME = 1,
+ _FL,
+ _CL
+};
+
+enum layer_keycodes {
+ BASE = SAFE_RANGE,
+ GAME
+};
+// readability
+#define XXX KC_NO
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │ │ 4 │ 5 │ 6 │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │ │ 1 │ 2 │ 3 │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ │LCrl│GUI │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │ │ 0 │ , │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │ │   │  │  │  │  │ │  │  │  │  │ │  │ │ │ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │  │ │ │ │ │ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │  |  │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │   RShift │     │   │ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │  │ │                  │ │  │ │ │ │   │   │   │ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_BASE] = 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_PSCR, KC_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PCMM
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │
+ │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │  Enter │ │ 4 │ 5 │ 6 │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │   RShift │     │ ↑ │ │ 1 │ 2 │ 3 │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
+ │LCrl│  │LAlt│         Space          │RAlt│ Fn │ App│RCrl│ │ ← │ ↓ │ → │ │ 0 │ , │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_GAME] = 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_PSCR, KC_SLCK, KC_PAUSE,
+ 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, MO(_CL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PCMM
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MyC│Hom│Cal│MeP│ │Prv│Nxt│Ply│Stp│ │Mut│VoD│VoU│ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Hud│Hui│  │ │Mod│Rod│Tog│ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │GAME│ │                  │ │ Fn │ │ │ │Spd│Vad│Spi│ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_FL] = LAYOUT_all(
+ RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_MOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
+ _______, GAME, _______, _______, _______, MO(_FL), _______, _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______
+ ),
+
+/*
+ ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
+ │Rst│   │MyC│Hom│Cal│MeP│ │Prv│Nxt│Ply│Stp│ │Mut│VoD│VoU│ │ │ │ │ │
+ └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
+ ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
+ │   │   │   │   │   │   │   │   │   │   │   │Hud│Hui│  │ │Mod│Rod│Tog│ │ │  │  │  │
+ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │   │   │     │ │ │ │ │ │ │ │ │ │
+ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │
+ │   │   │   │   │   │   │   │   │   │   │   │   │    │ │ │ │ │ │
+ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ ├───┼───┼───┼───┤
+ │   │   │   │   │   │   │   │   │   │   │   │     │     │Vai│ │  │  │  │  │
+ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
+ │ │BASE│ │                  │ │ Fn │ │ │ │Spd│Vad│Spi│ │ │ │ │
+ └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
+*/
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */
+ [_CL] = LAYOUT_all(
+ RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_MOD, RGB_RMOD, RGB_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
+ _______, BASE, _______, _______, _______, MO(_CL), _______, _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_BASE);
+ }
+ return false;
+ break;
+ case GAME:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_GAME);
+ writePinLow(D5);
+ writePinLow(D6);
+ writePinLow(D7);
+ }
+ return false;
+ break;
+ }
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/keymaps/default/readme.md b/keyboards/spcgear/gk540/keymaps/default/readme.md
new file mode 100644
index 000000000..5c3994146
--- /dev/null
+++ b/keyboards/spcgear/gk540/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# ANSI Layout
+
+This is ANSI Layout
+
+How to compile: `qmk compile -kb spcgear/gk540 -km default` \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/led_matrix.c b/keyboards/spcgear/gk540/led_matrix.c
new file mode 100644
index 000000000..daae2680f
--- /dev/null
+++ b/keyboards/spcgear/gk540/led_matrix.c
@@ -0,0 +1,83 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_NUM_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/matrix.c b/keyboards/spcgear/gk540/matrix.c
new file mode 100644
index 000000000..f0b5ff34e
--- /dev/null
+++ b/keyboards/spcgear/gk540/matrix.c
@@ -0,0 +1,578 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+#include "CT32.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clocks
+ SN_SYS1->AHBCLKEN_b.CT16B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT16B2CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B0CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B1CLKEN = 1;
+ SN_SYS1->AHBCLKEN_b.CT32B2CLKEN = 1;
+
+ // Set Timer Clock Prescalers
+ SN_SYS1->APBCP0_b.CT16B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT16B1PRE = 0x00;
+ SN_SYS1->APBCP1_b.CT16B2PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B0PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B1PRE = 0x00;
+ SN_SYS1->APBCP0_b.CT32B2PRE = 0x00;
+
+ // PFPA Timer Mapping
+ // CT16B0 PWM0 P0.0 Col 0
+ // PWM1 P0.1 Col 1
+ // CT16B1 PWM1 P1.3 Col 13
+ // PWM2 P0.15 Col 9
+ // CT16B2 PWM0 P0.2 Col 2
+ // PWM1 P1.4 Col 14
+ // PWM2 P1.0 Col 10
+ // CT32B0 PWM0 P0.4 Col 4
+ // PWM1 P1.11 Col 16
+ // PWM3 P1.2 Col 12
+ // CT32B1 PWM1 P1.10 Col 15
+ // PWM2 P0.5 Col 5
+ // PWM3 P0.7 Col 7
+ // CT32B2 PWM0 P1.1 Col 11
+ // PWM1 P0.14 Col 8
+ // PWM2 P0.3 Col 3
+ // PWM3 P0.6 Col 6
+ SN_PFPA->CT16B0 = 0x00000;
+ SN_PFPA->CT16B1 = 0x02330;
+ SN_PFPA->CT16B2 = 0x02010;
+ SN_PFPA->CT32B0 = 0x00410;
+ SN_PFPA->CT32B1 = 0x21300;
+ SN_PFPA->CT32B2 = 0x00030;
+
+ // Set match interrupts and TC reset for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ // COL match register
+ SN_CT16B0->MR3 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B0->PRE = 0x28;
+ SN_CT16B1->PRE = 0x28;
+ SN_CT16B2->PRE = 0x28;
+ SN_CT32B0->PRE = 0x28;
+ SN_CT32B1->PRE = 0x28;
+ SN_CT32B2->PRE = 0x28;
+
+ // Enable PWM on all timers
+ SN_CT16B0->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B1->PWMCTRL =
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN);
+ SN_CT16B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B0->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B1->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+ SN_CT32B2->PWMCTRL =
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM1EN_EN \
+ |mskCT32_PWM2EN_EN \
+ |mskCT32_PWM3EN_EN);
+
+ // Enable IO
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0IOEN_EN \
+ |mskCT16_PWM1IOEN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0IOEN_EN \
+ |mskCT32_PWM1IOEN_EN \
+ |mskCT32_PWM2IOEN_EN \
+ |mskCT32_PWM3IOEN_EN);
+
+ // Clear match registers
+ SN_CT16B0->MR0 = 0x0;
+ SN_CT16B0->MR1 = 0x0;
+ SN_CT16B0->MR2 = 0x0;
+ SN_CT16B1->MR0 = 0x0;
+ SN_CT16B1->MR1 = 0x0;
+ SN_CT16B1->MR2 = 0x0;
+ SN_CT16B1->MR3 = 0x0;
+ SN_CT16B2->MR0 = 0x0;
+ SN_CT16B2->MR1 = 0x0;
+ SN_CT16B2->MR2 = 0x0;
+ SN_CT16B2->MR3 = 0x0;
+ SN_CT32B0->MR0 = 0x0;
+ SN_CT32B0->MR1 = 0x0;
+ SN_CT32B0->MR2 = 0x0;
+ SN_CT32B0->MR3 = 0x0;
+ SN_CT32B1->MR0 = 0x0;
+ SN_CT32B1->MR1 = 0x0;
+ SN_CT32B1->MR2 = 0x0;
+ SN_CT32B1->MR3 = 0x0;
+ SN_CT32B2->MR0 = 0x0;
+ SN_CT32B2->MR1 = 0x0;
+ SN_CT32B2->MR2 = 0x0;
+ SN_CT32B2->MR3 = 0x0;
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B0_IRQn);
+ nvicEnableVector(CT16B0_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+/**
+ * @brief MR1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B0_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B0->PWMCTRL = 0;
+ SN_CT16B1->PWMCTRL = 0;
+ SN_CT16B2->PWMCTRL = 0;
+ SN_CT32B0->PWMCTRL = 0;
+ SN_CT32B1->PWMCTRL = 0;
+ SN_CT32B2->PWMCTRL = 0;
+
+ SN_CT16B0->IC = mskCT16_MR3IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ // Read the key matrix
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Enable the column
+ writePinLow(col_pins[col_index]);
+
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ for (uint8_t delay_idx = 0; delay_idx < 20; delay_idx++)
+ {
+ writePinHigh(col_pins[col_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set timers to the up-counting mode.
+ SN_CT16B0->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+ SN_CT16B2->TMRCTRL = (mskCT16_CRST);
+ SN_CT32B0->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B1->TMRCTRL = (mskCT32_CRST);
+ SN_CT32B2->TMRCTRL = (mskCT32_CRST);
+
+ // Wait until timer reset done.
+ while( (SN_CT16B0->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B1->TMRCTRL & mskCT16_CRST)
+ || (SN_CT16B2->TMRCTRL & mskCT16_CRST)
+ || (SN_CT32B0->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B1->TMRCTRL & mskCT32_CRST)
+ || (SN_CT32B2->TMRCTRL & mskCT32_CRST));
+
+ if (current_row % 3 == 0)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].r;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].r;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].r;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].r;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].r;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].r;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].r;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].r;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].r;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].r;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].r;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].r;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].r;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].r;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].r;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].r;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].r;
+ }
+
+ if (current_row % 3 == 1)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].g;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].g;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].g;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].g;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].g;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].g;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].g;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].g;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].g;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].g;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].g;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].g;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].g;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].g;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].g;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].g;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].g;
+ }
+
+ if (current_row % 3 == 2)
+ {
+ SN_CT16B0->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B0->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B2->MR0 = led_state[row_ofst + 2 ].b;
+ SN_CT32B2->MR2 = led_state[row_ofst + 3 ].b;
+ SN_CT32B0->MR0 = led_state[row_ofst + 4 ].b;
+ SN_CT32B1->MR2 = led_state[row_ofst + 5 ].b;
+ SN_CT32B2->MR3 = led_state[row_ofst + 6 ].b;
+ SN_CT32B1->MR3 = led_state[row_ofst + 7 ].b;
+ SN_CT32B2->MR1 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 9 ].b;
+ SN_CT16B2->MR2 = led_state[row_ofst + 10].b;
+ SN_CT32B2->MR0 = led_state[row_ofst + 11].b;
+ SN_CT32B0->MR3 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 13].b;
+ SN_CT16B2->MR1 = led_state[row_ofst + 14].b;
+ SN_CT32B1->MR1 = led_state[row_ofst + 15].b;
+ SN_CT32B0->MR1 = led_state[row_ofst + 16].b;
+ SN_CT16B0->MR2 = led_state[row_ofst + 17].b;
+ SN_CT32B1->MR0 = led_state[row_ofst + 18].b;
+ SN_CT32B0->MR2 = led_state[row_ofst + 19].b;
+ SN_CT16B1->MR0 = led_state[row_ofst + 20].b;
+ }
+
+ // Enable PWM on all timers
+ if(SN_CT16B0->MR0 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT16B0->MR1 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR0 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+ if(SN_CT32B2->MR2 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B0->MR0 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B1->MR2 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR3 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B1->MR3 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT32B2->MR1 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT16B2->MR2 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B2->MR0 > 0)
+ {
+ SN_CT32B2->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR3 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM3EN_EN \
+ |mskCT32_PWM3IOEN_EN);
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT16B2->MR1 > 0)
+ {
+ SN_CT16B2->PWMCTRL |=
+ (mskCT16_PWM1EN_EN \
+ |mskCT16_PWM1IOEN_EN);
+ }
+ if(SN_CT32B1->MR1 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT32B0->MR1 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM1EN_EN \
+ |mskCT32_PWM1IOEN_EN);
+ }
+ if(SN_CT16B0->MR2 > 0)
+ {
+ SN_CT16B0->PWMCTRL |=
+ (mskCT16_PWM2EN_EN \
+ |mskCT16_PWM2IOEN_EN);
+ }
+ if(SN_CT32B1->MR0 > 0)
+ {
+ SN_CT32B1->PWMCTRL |=
+ (mskCT32_PWM0EN_EN \
+ |mskCT32_PWM0IOEN_EN);
+ }
+ if(SN_CT32B0->MR2 > 0)
+ {
+ SN_CT32B0->PWMCTRL |=
+ (mskCT32_PWM2EN_EN \
+ |mskCT32_PWM2IOEN_EN);
+ }
+ if(SN_CT16B1->MR0 > 0)
+ {
+ SN_CT16B1->PWMCTRL |=
+ (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM0IOEN_EN);
+ }
+
+ // Set match interrupts and TC rest for CT16B0, which is used to generate interrupt
+ SN_CT16B0->MCTRL = (mskCT16_MR3IE_EN|mskCT16_MR3STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting. Start CT16B0 last because it generates our interrupt
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT16B2->TMRCTRL |= mskCT16_CEN_EN;
+ SN_CT32B0->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B1->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT32B2->TMRCTRL |= mskCT32_CEN_EN;
+ SN_CT16B0->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
+
+void HardFault_Handler(void) {
+ NVIC_SystemReset();
+} \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/mcuconf.h b/keyboards/spcgear/gk540/mcuconf.h
new file mode 100644
index 000000000..2cb5fd2a1
--- /dev/null
+++ b/keyboards/spcgear/gk540/mcuconf.h
@@ -0,0 +1,101 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+/*
+ * SN32F24xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define SN32F24xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+
+/*
+ * SN driver system settings.
+ */
+#define SN32_CT_IRQ_PRIORITY 2
+#define SN32_CT_USE_TIMER 2
+
+#define SN32_HAS_GPIOA TRUE
+#define SN32_HAS_GPIOB TRUE
+#define SN32_HAS_GPIOC TRUE
+#define SN32_HAS_GPIOD TRUE
+
+/*
+ * USB driver system settings.
+ */
+#define SN32_USB_USE_USB1 TRUE
+#define SN32_USB_LOW_POWER_ON_SUSPEND TRUE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+#define CRT1_AREAS_NUMBER 1
+
+#define PLATFORM_USB_USE_USB1 TRUE
+
+/*
+ * Timer driver system settings.
+ */
+#define SN32_PWM_USE_TIM1 FALSE
+#define SN32_PWM_USE_TIM2 TRUE
+#define SN32_PWM_TIM1_IRQ_PRIORITY 3
+#define SN32_PWM_TIM2_IRQ_PRIORITY 3
+
+#define SYS_CLOCK_SETUP 1
+#define SYS0_CLKCFG_VAL 0
+#define AHB_PRESCALAR 0x2
+#define CLKOUT_SEL_VAL 0x0
+#define CLKOUT_PRESCALAR 0x0
+
+/*----------------------------------------------------------------------------
+ DEFINES
+ *----------------------------------------------------------------------------*/
+#define IHRC 0
+#define ILRC 1
+#define EHSXTAL 2
+#define ELSXTAL 3
+#define PLL 4
+
+/*----------------------------------------------------------------------------
+ Define clocks
+ *----------------------------------------------------------------------------*/
+#define __IHRC_FREQ (12000000UL)
+#define __ILRC_FREQ (32000UL)
+#define __ELS_XTAL_FREQ (32768UL)
+
+#if (SYS_CLOCK_SETUP)
+#define SYS0_PLLCTRL_VAL (PLL_ENABLE<<15) | (PLL_CLKIN<<12) | (PLL_FSEL<<8) | (PLL_PSEL<<5) | PLL_MSEL
+#endif
+
+// #endif /* _MCUCONF_H_ */
+
+#define PLATFORM_MCUCONF
+
+#endif /* MCUCONF_H */ \ No newline at end of file
diff --git a/keyboards/spcgear/gk540/readme.md b/keyboards/spcgear/gk540/readme.md
new file mode 100644
index 000000000..bc8413a2a
--- /dev/null
+++ b/keyboards/spcgear/gk540/readme.md
@@ -0,0 +1,13 @@
+# SPCGear GK540 Magna
+
+GK540
+
+Keyboard Maintainer: [HorrorTroll](https://github.com/HorrorTroll)
+Heavily based on Redragon K552-1 by: [HorrorTroll](https://github.com/HorrorTroll)
+Hardware Supported: SN32F248F
+
+Make example for this keyboard (after setting up your build environment):
+
+ make spcgear/gk540:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/spcgear/gk540/rules.mk b/keyboards/spcgear/gk540/rules.mk
new file mode 100644
index 000000000..1138b9263
--- /dev/null
+++ b/keyboards/spcgear/gk540/rules.mk
@@ -0,0 +1,62 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+## chip/board settings
+# - the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = SN32
+MCU_SERIES = SN32F240
+
+# Linker script to use
+# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = SN32F240
+
+# Startup code to use
+# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = sn32f24x
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = SN_SN32F240
+
+# Cortex version
+MCU = cortex-m0
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+
+# BOOTLOADER = flash
+SN32_BOOTLOADER_ADDRESS = 0x1FFF0301
+
+OPT_DEFS = -O2
+
+# Options to pass to dfu-util when flashing
+# DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+# DFU_SUFFIX_ARGS = -p DF11 -v 0483
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom
diff --git a/keyboards/womier/k87/config.h b/keyboards/womier/k87/config.h
new file mode 100644
index 000000000..10831ccb6
--- /dev/null
+++ b/keyboards/womier/k87/config.h
@@ -0,0 +1,56 @@
+/* Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter HID\VID_320F&PID_502A&REV_0101&MI_00
+*/
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x4B43
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER Womier
+#define PRODUCT K87
+#define DESCRIPTION K87
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 17
+
+#define DIODE_DIRECTION COL2ROW
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0, B1 }
+#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7 }
+
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL//RGB_MATRIX_SOLID_COLOR
+
+// #define RGB_MATRIX_STARTUP_HUE (157-8)
+
+// #define RGB_MATRIX_STARTUP_SAT (192+16) //UINT8_MAX
+
+// #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 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
+
+#include "config_led.h"
diff --git a/keyboards/womier/k87/config_led.c b/keyboards/womier/k87/config_led.c
new file mode 100644
index 000000000..e5f65eee3
--- /dev/null
+++ b/keyboards/womier/k87/config_led.c
@@ -0,0 +1,29 @@
+#ifdef RGB_MATRIX_ENABLE
+
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+led_config_t g_led_config = { {
+ { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 },
+ { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 },
+ { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, NO_LED, NO_LED, NO_LED },
+ { 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, 76, NO_LED, 77, NO_LED },
+ { 78, 79, 80, NO_LED, NO_LED, NO_LED, 81, NO_LED, NO_LED, NO_LED, 82, 83, 84, 85, 86, 87, 88 }
+}, {
+ { 0 *14, 0 }, { 2 *14, 0 }, { 3 *14, 0 }, { 4 *14, 0 }, { 5 *14, 0 }, { 6 *14, 0 }, { 7 *14, 0 }, { 8 *14, 0 }, { 9 *14, 0 }, { 10 *14, 0 }, { 11 *14, 0 }, { 12 *14, 0 }, { 13 *14, 0 }, { 14 *14, 0 }, { 15 *14, 0 }, { 16 *14, 0 },
+ { 0 *14, 11}, { 1 *14, 11}, { 2 *14, 11}, { 3 *14, 11}, { 4 *14, 11}, { 5 *14, 11}, { 6 *14, 11}, { 7 *14, 11}, { 8 *14, 11}, { 9 *14, 11}, { 10 *14, 11}, { 11 *14, 11}, { 12 *14, 11}, { 13 *14, 11}, { 14 *14, 11}, { 15 *14, 11}, { 16 *14, 11},
+ { 0 *14, 22}, { 1 *14, 22}, { 2 *14, 22}, { 3 *14, 22}, { 4 *14, 22}, { 5 *14, 22}, { 6 *14, 22}, { 7 *14, 22}, { 8 *14, 22}, { 9 *14, 22}, { 10 *14, 22}, { 11 *14, 22}, { 12 *14, 22}, { 13 *14, 22}, { 14 *14, 22}, { 15 *14, 22}, { 16 *14, 22},
+ { 0 *14, 33}, { 1 *14, 33}, { 2 *14, 33}, { 3 *14, 33}, { 4 *14, 33}, { 5 *14, 33}, { 6 *14, 33}, { 7 *14, 33}, { 8 *14, 33}, { 9 *14, 33}, { 10 *14, 33}, { 11 *14, 33}, { 12 *14, 33}, { 13 *14, 33},
+ { 0 *14, 44}, { 1 *14, 44}, { 2 *14, 44}, { 3 *14, 44}, { 4 *14, 44}, { 5 *14, 44}, { 6 *14, 44}, { 7 *14, 44}, { 8 *14, 44}, { 9 *14, 44}, { 10 *14, 44}, { 11 *14, 44}, { 13 *14, 44}, { 15 *14, 44},
+ { 0 *14, 64}, { 1 *14, 64}, { 2 *14, 64}, { 6 *14, 64}, { 10 *14, 64}, { 11 *14, 64}, { 12 *14, 64}, { 13 *14, 64}, { 14 *14, 64}, { 15 *14, 64}, { 16 *14, 64},
+}, {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
+ 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+} };
+
+#endif
diff --git a/keyboards/womier/k87/config_led.h b/keyboards/womier/k87/config_led.h
new file mode 100644
index 000000000..c34378269
--- /dev/null
+++ b/keyboards/womier/k87/config_led.h
@@ -0,0 +1,35 @@
+/*
+Copyright 2020 Adam Honse <calcprogrammer1@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/>.
+*/
+
+#pragma once
+
+// Backlight configuration
+#define BACKLIGHT_LEVELS 8
+
+#define LED_MATRIX_ROWS MATRIX_ROWS
+#define LED_MATRIX_ROW_CHANNELS 3
+#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
+#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
+
+#define LED_MATRIX_COLS MATRIX_COLS
+#define LED_MATRIX_COL_PINS MATRIX_COL_PINS
+
+#define DRIVER_LED_TOTAL (89)
+
+#define LED_CAPS_LOCK_PIN B14
+#define LED_SCROLL_LOCK_PIN B15
+#define LED_PIN_ON_STATE 0
diff --git a/keyboards/womier/k87/info.json b/keyboards/womier/k87/info.json
new file mode 100644
index 000000000..4c78ea3fb
--- /dev/null
+++ b/keyboards/womier/k87/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "K552-2",
+ "url": "https://www.redragonzone.com/products/redragonk552",
+ "maintainer": "CalcProgrammer1",
+ "width": 17,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"x":15, "y":1}, {"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}, {"x":15, "y":2}, {"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}, {"x":15, "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
+ }
+ }
+
+}
diff --git a/keyboards/womier/k87/k87.h b/keyboards/womier/k87/k87.h
new file mode 100644
index 000000000..00bdf1e03
--- /dev/null
+++ b/keyboards/womier/k87/k87.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include "quantum.h"
+
diff --git a/keyboards/womier/k87/keymaps/default/keymap.c b/keyboards/womier/k87/keymaps/default/keymap.c
new file mode 100644
index 000000000..dd47be088
--- /dev/null
+++ b/keyboards/womier/k87/keymaps/default/keymap.c
@@ -0,0 +1,44 @@
+/*
+Copyright 2019 Stephen Peery
+
+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
+
+// 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.
+enum layer_names {
+ _BASE,
+ _FN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ [_BASE] = { { KC_ESC, KC_NO, 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_SLCK, KC_PAUSE },
+ { 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_INS, KC_HOME, KC_PGUP },
+ { 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_DEL, KC_END, KC_PGDN },
+ { 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, KC_NO, KC_NO, KC_NO },
+ { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, KC_UP, KC_NO },
+ { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT }
+ },
+ [_FN] = { { RESET, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, RGB_TOG, _______, _______, _______, KC_SLEP },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_M_P, RGB_M_B, RGB_M_R },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_SW, RGB_MOD , RGB_RMOD },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI }
+ }
+};
diff --git a/keyboards/womier/k87/led_matrix.c b/keyboards/womier/k87/led_matrix.c
new file mode 100644
index 000000000..87a7b9850
--- /dev/null
+++ b/keyboards/womier/k87/led_matrix.c
@@ -0,0 +1,82 @@
+#include <string.h>
+#include "rgb.h"
+#include "rgb_matrix.h"
+#include "rgb_matrix_types.h"
+#include "color.h"
+
+/*
+ COLS key / led
+ PWM PWM00A - PWM21A (PWM15A unused)
+ 2ty transistors PNP driven high
+ base - GPIO
+ collector - LED Col pins
+ emitter - VDD
+
+ VDD GPIO
+ (E) (B)
+ | PNP |
+ |_______|
+ |
+ |
+ (C)
+ LED
+
+ ROWS RGB
+ PWM PWM22A - PWM21B (PWM10B unused)
+ C 0-15
+ j3y transistors NPN driven low
+ base - GPIO
+ collector - LED RGB row pins
+ emitter - GND
+
+ LED
+ (C)
+ |
+ |
+ _______
+ | NPN |
+ | |
+ (B) (E)
+ GPIO GND
+*/
+
+LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+uint8_t led_pos[DRIVER_LED_TOTAL];
+
+void init(void) {
+ unsigned int i = 0;
+ for (unsigned int y = 0; y < LED_MATRIX_ROWS; y++) {
+ for (unsigned int x = 0; x < LED_MATRIX_COLS; x++) {
+ if (g_led_config.matrix_co[y][x] != NO_LED) {
+ led_pos[g_led_config.matrix_co[y][x]] = i;
+ }
+ i++;
+ }
+ }
+}
+
+static void flush(void) {}
+
+void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
+ int corrected_index = led_pos[index];
+ led_state[corrected_index].r = r;
+ led_state[corrected_index].g = g;
+ led_state[corrected_index].b = b;
+}
+
+static void set_color_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i=0; i<DRIVER_LED_TOTAL; i++)
+ set_color(i, r, g, b);
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = set_color,
+ .set_color_all = set_color_all,
+};
+
+void led_set(uint8_t usb_led) {
+ writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+}
diff --git a/keyboards/womier/k87/matrix.c b/keyboards/womier/k87/matrix.c
new file mode 100644
index 000000000..74a04bfd6
--- /dev/null
+++ b/keyboards/womier/k87/matrix.c
@@ -0,0 +1,471 @@
+/*
+Copyright 2011 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/>.
+
+Ported to QMK by Stephen Peery <https://github.com/smp4488/>
+*/
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <SN32F240B.h>
+#include "ch.h"
+#include "hal.h"
+#include "CT16.h"
+
+#include "color.h"
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+static const pin_t led_row_pins[LED_MATRIX_ROWS_HW] = LED_MATRIX_ROW_PINS;
+static uint16_t row_ofsts[LED_MATRIX_ROWS];
+
+matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values
+matrix_row_t last_matrix[MATRIX_ROWS] = {0}; // raw values
+matrix_row_t matrix[MATRIX_ROWS]; //debounced values
+
+static bool matrix_changed = false;
+// static uint8_t col_index = 0;
+// static uint8_t led_index = 0;
+static uint8_t current_row = 0;
+
+extern volatile LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
+
+__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 matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {}
+
+#if 0
+static void unselect_cols(void) {
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinInputHigh(col_pins[x]);
+ }
+}
+
+static void init_pins(void) {
+ unselect_cols();
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInputHigh(row_pins[x]);
+ }
+}
+#else
+
+static void init_pins(void) {
+
+ // Unselect ROWs
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinOutput(row_pins[x]);
+ writePinHigh(row_pins[x]);
+ }
+
+ // Unselect COLs
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+
+ for (uint8_t x = 0; x < LED_MATRIX_ROWS_HW; x++) {
+ setPinOutput(led_row_pins[x]);
+ writePinHigh(led_row_pins[x]);
+ }
+}
+#endif
+
+void matrix_init(void) {
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ for (uint8_t i = 0; i < LED_MATRIX_ROWS; i++) {
+ row_ofsts[i] = i * LED_MATRIX_COLS;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+
+ // Enable Timer Clock
+ SN_SYS1->AHBCLKEN_b.CT16B1CLKEN = 1;
+
+ // PFPA - Map all PWM outputs to their PWM A pins
+ SN_PFPA->CT16B1 = 0x00000000;
+
+ // SN_CT16B1->MR0 = 0;
+ // SN_CT16B1->MR1 = 0;
+ // SN_CT16B1->MR2 = 0xFF;
+
+ // SN_CT16B1->MR3 = 0;
+ // SN_CT16B1->MR4 = 0;
+ // SN_CT16B1->MR5 = 0xFF;
+
+ // SN_CT16B1->MR6 = 0xFF;
+ // SN_CT16B1->MR7 = 0xFF;
+ // SN_CT16B1->MR8 = 0xFF;
+
+ // SN_CT16B1->MR9 = 0xFF;
+ // SN_CT16B1->MR10 = 0xFF;
+ // SN_CT16B1->MR11 = 0xFF;
+
+ // SN_CT16B1->MR12 = 0;
+ // SN_CT16B1->MR13 = 0xFF;
+ // SN_CT16B1->MR14 = 0;
+
+ // SN_CT16B1->MR15 = 0;
+ // SN_CT16B1->MR16 = 0xFF;
+ // SN_CT16B1->MR17 = 0;
+
+ // Enable PWM function, IOs and select the PWM modes
+ // Enable PWM0-PWM3, PWM8-PWM20 function (except PWM10)
+ SN_CT16B1->PWMENB = (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN \
+ |mskCT16_PWM3EN_EN \
+ |mskCT16_PWM4EN_EN \
+ |mskCT16_PWM5EN_EN \
+ |mskCT16_PWM6EN_EN \
+ |mskCT16_PWM7EN_EN \
+ |mskCT16_PWM8EN_EN \
+ |mskCT16_PWM9EN_EN \
+ |mskCT16_PWM10EN_EN \
+ |mskCT16_PWM11EN_EN \
+ |mskCT16_PWM12EN_EN \
+ |mskCT16_PWM13EN_EN \
+ |mskCT16_PWM14EN_EN \
+ |mskCT16_PWM16EN_EN \
+ |mskCT16_PWM17EN_EN \
+ |mskCT16_PWM18EN_EN \
+ |mskCT16_PWM19EN_EN \
+ |mskCT16_PWM20EN_EN \
+ |mskCT16_PWM21EN_EN);
+
+ // Enable PWM0-PWM3, PWM8-PWM20 IO (except PWM10)
+ SN_CT16B1->PWMIOENB = (mskCT16_PWM0EN_EN \
+ |mskCT16_PWM1EN_EN \
+ |mskCT16_PWM2EN_EN \
+ |mskCT16_PWM3EN_EN \
+ |mskCT16_PWM4EN_EN \
+ |mskCT16_PWM5EN_EN \
+ |mskCT16_PWM6EN_EN \
+ |mskCT16_PWM7EN_EN \
+ |mskCT16_PWM8EN_EN \
+ |mskCT16_PWM9EN_EN \
+ |mskCT16_PWM10EN_EN \
+ |mskCT16_PWM11EN_EN \
+ |mskCT16_PWM12EN_EN \
+ |mskCT16_PWM13EN_EN \
+ |mskCT16_PWM14EN_EN \
+ |mskCT16_PWM16EN_EN \
+ |mskCT16_PWM17EN_EN \
+ |mskCT16_PWM18EN_EN \
+ |mskCT16_PWM19EN_EN \
+ |mskCT16_PWM20EN_EN \
+ |mskCT16_PWM21EN_EN);
+
+ // SN_CT16B1->PWMCTRL = 0x55650000; //PWM08-PWM9 , PWM11-PWM15 select as PWM mode 2
+ // |mskCT16_PWM10MODE_2
+ #if 0
+ SN_CT16B1->PWMCTRL = (mskCT16_PWM0MODE_2 | \
+ mskCT16_PWM1MODE_2 | \
+ mskCT16_PWM2MODE_2 | \
+ mskCT16_PWM3MODE_2 | \
+ mskCT16_PWM4MODE_2 | \
+ mskCT16_PWM5MODE_2 | \
+ mskCT16_PWM6MODE_2 | \
+ mskCT16_PWM7MODE_2 | \
+ mskCT16_PWM8MODE_2 | \
+ mskCT16_PWM9MODE_2 | \
+ mskCT16_PWM10MODE_2 | \
+ mskCT16_PWM11MODE_2 | \
+ mskCT16_PWM12MODE_2 | \
+ mskCT16_PWM13MODE_2 | \
+ mskCT16_PWM14MODE_2 | \
+ mskCT16_PWM15MODE_2 | \
+ mskCT16_PWM16MODE_2 | \
+ mskCT16_PWM17MODE_2);
+ #endif
+
+ // Set match interrupts and TC rest
+ SN_CT16B1->MCTRL3 = (mskCT16_MR22IE_EN | mskCT16_MR22STOP_EN);
+
+ // COL match register
+ SN_CT16B1->MR22 = 0xFF;
+
+ // Set prescale value
+ SN_CT16B1->PRE = 0x02;
+
+ //Set CT16B1 as the up-counting mode.
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+
+ // Wait until timer reset done.
+ while (SN_CT16B1->TMRCTRL & mskCT16_CRST);
+
+ // Let TC start counting.
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+
+ NVIC_ClearPendingIRQ(CT16B1_IRQn);
+ nvicEnableVector(CT16B1_IRQn, 0);
+}
+
+uint8_t matrix_scan(void) {
+ matrix_changed = false;
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Determine if the matrix changed state
+ if ((last_matrix[row_index] != raw_matrix[row_index])) {
+ matrix_changed = true;
+ last_matrix[row_index] = raw_matrix[row_index];
+ }
+ }
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, matrix_changed);
+
+ matrix_scan_quantum();
+
+ return matrix_changed;
+}
+
+uint8_t hw_row_to_matrix_row[18] = { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5 };
+volatile uint32_t * rgb_match_registers[6][3] =
+{
+ {&SN_CT16B1->MR0, &SN_CT16B1->MR1, &SN_CT16B1->MR2 },
+ {&SN_CT16B1->MR3, &SN_CT16B1->MR4, &SN_CT16B1->MR5 },
+ {&SN_CT16B1->MR6, &SN_CT16B1->MR7, &SN_CT16B1->MR8 },
+ {&SN_CT16B1->MR9, &SN_CT16B1->MR10, &SN_CT16B1->MR11 },
+ {&SN_CT16B1->MR12, &SN_CT16B1->MR13, &SN_CT16B1->MR14 },
+ {&SN_CT16B1->MR15, &SN_CT16B1->MR16, &SN_CT16B1->MR17 },
+};
+
+/**
+ * @brief CT16B1 interrupt handler.
+ *
+ * @isr
+ */
+OSAL_IRQ_HANDLER(SN32_CT16B1_HANDLER) {
+
+ chSysDisable();
+
+ OSAL_IRQ_PROLOGUE();
+
+ // Disable PWM outputs on column pins
+ SN_CT16B1->PWMIOENB = 0;
+
+ SN_CT16B1->IC = mskCT16_MR22IC; // Clear match interrupt status
+
+ // Turn the selected row off
+ writePinLow(led_row_pins[current_row]);
+
+ // Turn the next row on
+ current_row = (current_row + 1) % LED_MATRIX_ROWS_HW;
+
+ if(current_row == 0)
+ {
+ // Read the key matrix
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Enable the row
+ writePinLow(row_pins[row_index]);
+
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ setPinInputHigh(col_pins[col_index]);
+
+ // Check row pin state
+ if (readPin(col_pins[col_index]) == 0) {
+ // Pin LO, set col bit
+ raw_matrix[row_index] |= (MATRIX_ROW_SHIFTER << col_index);
+ } else {
+ // Pin HI, clear col bit
+ raw_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << col_index);
+ }
+ }
+
+ // Disable the column
+ writePinHigh(row_pins[row_index]);
+ }
+ }
+
+ uint8_t row_idx = hw_row_to_matrix_row[current_row];
+ uint16_t row_ofst = row_ofsts[row_idx];
+
+ //Set CT16B1 as the up-counting mode.
+ SN_CT16B1->TMRCTRL = (mskCT16_CRST);
+
+ // Wait until timer reset done.
+ while (SN_CT16B1->TMRCTRL & mskCT16_CRST);
+
+ if(current_row % 3 == 0)
+ {
+ SN_CT16B1->MR0 = led_state[row_ofst + 0 ].r;
+ SN_CT16B1->MR1 = led_state[row_ofst + 1 ].r;
+ SN_CT16B1->MR2 = led_state[row_ofst + 2 ].r;
+ SN_CT16B1->MR3 = led_state[row_ofst + 3 ].r;
+ SN_CT16B1->MR4 = led_state[row_ofst + 4 ].r;
+ SN_CT16B1->MR5 = led_state[row_ofst + 5 ].r;
+ SN_CT16B1->MR6 = led_state[row_ofst + 6 ].r;
+ SN_CT16B1->MR7 = led_state[row_ofst + 7 ].r;
+ SN_CT16B1->MR8 = led_state[row_ofst + 8 ].r;
+ SN_CT16B1->MR9 = led_state[row_ofst + 9 ].r;
+ SN_CT16B1->MR10 = led_state[row_ofst + 10].r;
+ SN_CT16B1->MR11 = led_state[row_ofst + 11].r;
+ SN_CT16B1->MR12 = led_state[row_ofst + 12].r;
+ SN_CT16B1->MR13 = led_state[row_ofst + 13].r;
+ SN_CT16B1->MR14 = led_state[row_ofst + 14].r;
+ SN_CT16B1->MR16 = led_state[row_ofst + 15].r;
+ SN_CT16B1->MR17 = led_state[row_ofst + 16].r;
+ }
+
+ if(current_row % 3 == 1)
+ {
+ SN_CT16B1->MR0 = led_state[row_ofst + 0 ].b;
+ SN_CT16B1->MR1 = led_state[row_ofst + 1 ].b;
+ SN_CT16B1->MR2 = led_state[row_ofst + 2 ].b;
+ SN_CT16B1->MR3 = led_state[row_ofst + 3 ].b;
+ SN_CT16B1->MR4 = led_state[row_ofst + 4 ].b;
+ SN_CT16B1->MR5 = led_state[row_ofst + 5 ].b;
+ SN_CT16B1->MR6 = led_state[row_ofst + 6 ].b;
+ SN_CT16B1->MR7 = led_state[row_ofst + 7 ].b;
+ SN_CT16B1->MR8 = led_state[row_ofst + 8 ].b;
+ SN_CT16B1->MR9 = led_state[row_ofst + 9 ].b;
+ SN_CT16B1->MR10 = led_state[row_ofst + 10].b;
+ SN_CT16B1->MR11 = led_state[row_ofst + 11].b;
+ SN_CT16B1->MR12 = led_state[row_ofst + 12].b;
+ SN_CT16B1->MR13 = led_state[row_ofst + 13].b;
+ SN_CT16B1->MR14 = led_state[row_ofst + 14].b;
+ SN_CT16B1->MR16 = led_state[row_ofst + 15].b;
+ SN_CT16B1->MR17 = led_state[row_ofst + 16].b;
+ }
+
+ if(current_row % 3 == 2)
+ {
+ SN_CT16B1->MR0 = led_state[row_ofst + 0 ].g;
+ SN_CT16B1->MR1 = led_state[row_ofst + 1 ].g;
+ SN_CT16B1->MR2 = led_state[row_ofst + 2 ].g;
+ SN_CT16B1->MR3 = led_state[row_ofst + 3 ].g;
+ SN_CT16B1->MR4 = led_state[row_ofst + 4 ].g;
+ SN_CT16B1->MR5 = led_state[row_ofst + 5 ].g;
+ SN_CT16B1->MR6 = led_state[row_ofst + 6 ].g;
+ SN_CT16B1->MR7 = led_state[row_ofst + 7 ].g;
+ SN_CT16B1->MR8 = led_state[row_ofst + 8 ].g;
+ SN_CT16B1->MR9 = led_state[row_ofst + 9 ].g;
+ SN_CT16B1->MR10 = led_state[row_ofst + 10].g;
+ SN_CT16B1->MR11 = led_state[row_ofst + 11].g;
+ SN_CT16B1->MR12 = led_state[row_ofst + 12].g;
+ SN_CT16B1->MR13 = led_state[row_ofst + 13].g;
+ SN_CT16B1->MR14 = led_state[row_ofst + 14].g;
+ SN_CT16B1->MR16 = led_state[row_ofst + 15].g;
+ SN_CT16B1->MR17 = led_state[row_ofst + 16].g;
+ }
+
+ if(SN_CT16B1->MR0 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM0EN_EN;
+ }
+ if(SN_CT16B1->MR1 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM1EN_EN;
+ }
+ if(SN_CT16B1->MR2 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM2EN_EN;
+ }
+ if(SN_CT16B1->MR3 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM3EN_EN;
+ }
+ if(SN_CT16B1->MR4 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM4EN_EN;
+ }
+ if(SN_CT16B1->MR5 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM5EN_EN;
+ }
+ if(SN_CT16B1->MR6 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM6EN_EN;
+ }
+ if(SN_CT16B1->MR6 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM6EN_EN;
+ }
+ if(SN_CT16B1->MR7 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM7EN_EN;
+ }
+ if(SN_CT16B1->MR8 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM8EN_EN;
+ }
+ if(SN_CT16B1->MR9 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM9EN_EN;
+ }
+ if(SN_CT16B1->MR10 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM10EN_EN;
+ }
+ if(SN_CT16B1->MR11 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM11EN_EN;
+ }
+ if(SN_CT16B1->MR12 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM12EN_EN;
+ }
+ if(SN_CT16B1->MR13 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM13EN_EN;
+ }
+ if(SN_CT16B1->MR14 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM14EN_EN;
+ }
+ if(SN_CT16B1->MR16 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM16EN_EN;
+ }
+ if(SN_CT16B1->MR17 > 0)
+ {
+ SN_CT16B1->PWMIOENB |= mskCT16_PWM17EN_EN;
+ }
+
+ // Set match interrupts and TC rest
+ SN_CT16B1->MCTRL3 = (mskCT16_MR22IE_EN | mskCT16_MR22STOP_EN);
+
+ writePinHigh(led_row_pins[current_row]);
+
+ // Let TC start counting.
+ SN_CT16B1->TMRCTRL |= mskCT16_CEN_EN;
+
+ chSysEnable();
+
+ OSAL_IRQ_EPILOGUE();
+}
diff --git a/keyboards/womier/k87/readme.md b/keyboards/womier/k87/readme.md
new file mode 100644
index 000000000..f3895ae30
--- /dev/null
+++ b/keyboards/womier/k87/readme.md
@@ -0,0 +1,13 @@
+# Redragon K552-2 Kumara
+
+K552-2
+
+Keyboard Maintainer: [Adam Honse](https://github.com/CalcProgrammer1)
+Based on Kemove DK63 by: [Stephen Peery](https://github.com/smp4488)
+Hardware Supported: SN32F248BF
+
+Make example for this keyboard (after setting up your build environment):
+
+ make redragon/k552/rev2:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/womier/k87/rules.mk b/keyboards/womier/k87/rules.mk
new file mode 100644
index 000000000..cc5578735
--- /dev/null
+++ b/keyboards/womier/k87/rules.mk
@@ -0,0 +1,32 @@
+# project specific files
+SRC = matrix.c
+SRC += led_matrix.c
+SRC += config_led.c
+
+# MCU name
+MCU = SN32F248BF
+
+# Build Options
+# comment out to disable the options.
+#
+LTO_ENABLE = no
+BACKLIGHT_ENABLE = no
+MAGIC_ENABLE = yes
+MAGIC_KEYCODE_ENABLE = yes
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = no # USB Nkey Rollover
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+SERIAL_LINK_ENABLE = no
+WAIT_FOR_USB = no
+CUSTOM_MATRIX = yes
+KEYBOARD_SHARED_EP = yes
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = custom