aboutsummaryrefslogtreecommitdiff
path: root/keyboards/mechlovin/hannah60rgb
diff options
context:
space:
mode:
authormechlovin <57231893+mechlovin@users.noreply.github.com>2020-10-05 02:23:35 +0700
committerGitHub <noreply@github.com>2020-10-04 12:23:35 -0700
commit793de76bb451d2072a4460407dec2b2811dc48ac (patch)
tree0b5b806c87c6d662f3585ee2518ca0895968849f /keyboards/mechlovin/hannah60rgb
parentf176daa1ca95c3145cd5a8af3f0993ce070eeb46 (diff)
downloadqmk_firmware-793de76bb451d2072a4460407dec2b2811dc48ac.tar.gz
qmk_firmware-793de76bb451d2072a4460407dec2b2811dc48ac.zip
[Keyboard] Add hannah60rgb rev.2 PCB (#10287)
* add hannah60rgb_rev2 * add * Update rev2.c * fixed rgb matrix * Update rev2.c * update rules.mk * update readme * update * Update config.h * Update rules.mk
Diffstat (limited to 'keyboards/mechlovin/hannah60rgb')
-rw-r--r--keyboards/mechlovin/hannah60rgb/config.h17
-rw-r--r--keyboards/mechlovin/hannah60rgb/hannah60rgb.h79
-rw-r--r--keyboards/mechlovin/hannah60rgb/info.json3
-rw-r--r--keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md1
-rw-r--r--keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md1
-rw-r--r--keyboards/mechlovin/hannah60rgb/readme.md2
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/config.h18
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c26
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c (renamed from keyboards/mechlovin/hannah60rgb/keymaps/via/keymap.c)2
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk (renamed from keyboards/mechlovin/hannah60rgb/keymaps/via/rules.mk)0
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/rev1.c (renamed from keyboards/mechlovin/hannah60rgb/hannah60rgb.c)0
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/rev1.h63
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev1/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/config.h40
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c (renamed from keyboards/mechlovin/hannah60rgb/keymaps/default/keymap.c)2
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c44
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk1
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/rev2.c247
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/rev2.h33
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/rules.mk2
-rw-r--r--keyboards/mechlovin/hannah60rgb/rules.mk9
21 files changed, 502 insertions, 89 deletions
diff --git a/keyboards/mechlovin/hannah60rgb/config.h b/keyboards/mechlovin/hannah60rgb/config.h
index 5ad16084f..6acfa5d40 100644
--- a/keyboards/mechlovin/hannah60rgb/config.h
+++ b/keyboards/mechlovin/hannah60rgb/config.h
@@ -21,11 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21 21
22/* USB Device descriptor parameter */ 22/* USB Device descriptor parameter */
23#define VENDOR_ID 0x4D4C // ML-Mechlovin 23#define VENDOR_ID 0x4D4C // ML-Mechlovin
24#define PRODUCT_ID 0x6001
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Team.Mechlovin 24#define MANUFACTURER Team.Mechlovin
27#define PRODUCT Hannah60 RGB
28#define DESCRIPTION Team.Mechlovin Hannah60 RGB
29 25
30/* key matrix size */ 26/* key matrix size */
31#define MATRIX_ROWS 5 27#define MATRIX_ROWS 5
@@ -44,15 +40,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
44#define MATRIX_ROW_PINS { A4, A5, A3, A2, A1 } 40#define MATRIX_ROW_PINS { A4, A5, A3, A2, A1 }
45#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14 } 41#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14 }
46 42
47#define DIODE_DIRECTION COL2ROW 43#define DIODE_DIRECTION COL2ROW \ No newline at end of file
48
49#define RGB_DI_PIN A15
50#define DRIVER_LED_TOTAL 72
51#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
52#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
53#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
54#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
55#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
56#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
57#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
58#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file
diff --git a/keyboards/mechlovin/hannah60rgb/hannah60rgb.h b/keyboards/mechlovin/hannah60rgb/hannah60rgb.h
index 8fd1c6797..9944b1228 100644
--- a/keyboards/mechlovin/hannah60rgb/hannah60rgb.h
+++ b/keyboards/mechlovin/hannah60rgb/hannah60rgb.h
@@ -1,63 +1,24 @@
1/* 1/* Copyright 2019 Mechlovin
2Copyright 2020 Mechlovin' 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17#pragma once 16#pragma once
18 17
19#include "quantum.h" 18#include "quantum.h"
20 19
21#define LAYOUT_all( \ 20#if defined(KEYBOARD_mechlovin_hannah60rgb_rev1)
22K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ 21 #include "rev1.h"
23K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ 22#elif defined(KEYBOARD_mechlovin_hannah60rgb_rev2)
24K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ 23 #include "rev2.h"
25K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ 24#endif
26K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D \
27) { \
28 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
29 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
30 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
31 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
32 { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D }, \
33}
34#define LAYOUT_60_ansi( \
35 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
36 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \
37 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
38 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
39 K40, K41, K42, K46, K4A, K4B, K4C, K4D \
40) { \
41 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
42 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \
43 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
44 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \
45 { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \
46}
47#define LAYOUT_60_iso( \
48 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
49 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
50 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
51 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
52 K40, K41, K42, K46, K4A, K4B, K4C, K4D \
53) { \
54 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
55 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \
56 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
57 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \
58 { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \
59}
60
61
62// generated by KBFirmware JSON to QMK Parser
63// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/mechlovin/hannah60rgb/info.json b/keyboards/mechlovin/hannah60rgb/info.json
index 97d7b8492..e6d052b49 100644
--- a/keyboards/mechlovin/hannah60rgb/info.json
+++ b/keyboards/mechlovin/hannah60rgb/info.json
@@ -1,12 +1,11 @@
1{ 1{
2 "keyboard_name": "hannah60rgb", 2 "keyboard_name": "hannah60rgb",
3 "url": "", 3 "url": "",
4 "maintainer": "qmk", 4 "maintainer": "Team Mechlovin'",
5 "width": 15, 5 "width": 15,
6 "height": 5, 6 "height": 5,
7 "layouts": { 7 "layouts": {
8 "LAYOUT_all": { 8 "LAYOUT_all": {
9 "key_count": 66,
10 "layout": [ 9 "layout": [
11 {"label":"K00 (B0,B5)", "x":2.75, "y":0}, 10 {"label":"K00 (B0,B5)", "x":2.75, "y":0},
12 {"label":"K01 (B0,B6)", "x":3.75, "y":0}, 11 {"label":"K01 (B0,B6)", "x":3.75, "y":0},
diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md b/keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md
deleted file mode 100644
index 9a101f5ac..000000000
--- a/keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md
+++ /dev/null
@@ -1 +0,0 @@
1# The default keymap for hannah60rgb
diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md b/keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md
deleted file mode 100644
index 794a57963..000000000
--- a/keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md
+++ /dev/null
@@ -1 +0,0 @@
1# The VIA keymap for hannah60rgb
diff --git a/keyboards/mechlovin/hannah60rgb/readme.md b/keyboards/mechlovin/hannah60rgb/readme.md
index 777be816a..e827bda5a 100644
--- a/keyboards/mechlovin/hannah60rgb/readme.md
+++ b/keyboards/mechlovin/hannah60rgb/readme.md
@@ -10,6 +10,6 @@ A 60% PCB with per-key RGB, compatible with Poker and Unikorn cases.
10 10
11Make example for this keyboard (after setting up your build environment): 11Make example for this keyboard (after setting up your build environment):
12 12
13 make mechlovin/hannah60rgb:default 13 make mechlovin/hannah60rgb/rev1:default
14 14
15See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). 15See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h
new file mode 100644
index 000000000..20873e716
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h
@@ -0,0 +1,18 @@
1#pragma once
2
3#define PRODUCT_ID 0x6001
4#define DEVICE_VER 0x0001
5#define PRODUCT Hannah60 RGB
6
7#define RGB_DI_PIN A15
8#ifdef RGB_MATRIX_ENABLE
9# define DRIVER_LED_TOTAL 72
10# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
11# define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
12# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
13# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
14# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
15# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
16# 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
17# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
18#endif \ No newline at end of file
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c
new file mode 100644
index 000000000..d3e8d7e64
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c
@@ -0,0 +1,26 @@
1/* Copyright 2020 Mechlovin'
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_all(
20 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_DEL,
21 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,
22 LT(2,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,
23 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_LSFT, MO(1),
24 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ),
25
26};
diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/via/keymap.c b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c
index 0e22b84f0..2d72dbd5a 100644
--- a/keyboards/mechlovin/hannah60rgb/keymaps/via/keymap.c
+++ b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c
@@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_all( 19 [0] = LAYOUT_all(
20 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_DEL, 20 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_DEL,
21 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, 21 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,
22 LT(2,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, 22 LT(2,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,
23 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_LSFT, MO(1), 23 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_LSFT, MO(1),
24 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), 24 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ),
25 [1] = LAYOUT_all( 25 [1] = LAYOUT_all(
diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/via/rules.mk b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk
index 036bd6d1c..036bd6d1c 100644
--- a/keyboards/mechlovin/hannah60rgb/keymaps/via/rules.mk
+++ b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk
diff --git a/keyboards/mechlovin/hannah60rgb/hannah60rgb.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c
index 5acea8c66..5acea8c66 100644
--- a/keyboards/mechlovin/hannah60rgb/hannah60rgb.c
+++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.h b/keyboards/mechlovin/hannah60rgb/rev1/rev1.h
new file mode 100644
index 000000000..8fd1c6797
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.h
@@ -0,0 +1,63 @@
1/*
2Copyright 2020 Mechlovin'
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#pragma once
18
19#include "quantum.h"
20
21#define LAYOUT_all( \
22K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \
23K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \
24K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
25K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
26K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D \
27) { \
28 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
29 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
30 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
31 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
32 { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D }, \
33}
34#define LAYOUT_60_ansi( \
35 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
36 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \
37 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
38 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
39 K40, K41, K42, K46, K4A, K4B, K4C, K4D \
40) { \
41 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
42 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \
43 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
44 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \
45 { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \
46}
47#define LAYOUT_60_iso( \
48 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
49 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
50 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
51 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
52 K40, K41, K42, K46, K4A, K4B, K4C, K4D \
53) { \
54 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
55 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \
56 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
57 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \
58 { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \
59}
60
61
62// generated by KBFirmware JSON to QMK Parser
63// https://noroadsleft.github.io/kbf_qmk_converter/
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rules.mk b/keyboards/mechlovin/hannah60rgb/rev1/rules.mk
new file mode 100644
index 000000000..20256e208
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev1/rules.mk
@@ -0,0 +1 @@
RGB_MATRIX_ENABLE = WS2812
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h
new file mode 100644
index 000000000..2bcffbc85
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h
@@ -0,0 +1,40 @@
1#pragma once
2
3#define PRODUCT_ID 0x6002
4#define DEVICE_VER 0x0001
5#define PRODUCT Hannah60 RGB Rev.2
6
7#ifdef RGBLIGHT_ENABLE
8# define RGB_DI_PIN A15
9# define RGBLED_NUM 18
10# define RGBLIGHT_ANIMATIONS
11# define RGBLIGHT_HUE_STEP 8
12# define RGBLIGHT_SAT_STEP 8
13# define RGBLIGHT_VAL_STEP 8
14#endif
15
16//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0
17// set to 0 for write, 1 for read (as per I2C protocol)
18// The address will vary depending on your wiring:
19// 0b1110100 AD <-> GND
20// 0b1110111 AD <-> VCC
21// 0b1110101 AD <-> SCL
22// 0b1110110 AD <-> SDA
23#define DRIVER_ADDR_1 0b1110100
24#define DRIVER_ADDR_2 0b1110110
25#define DRIVER_COUNT 2
26#define DRIVER_1_LED_TOTAL 44
27#define DRIVER_2_LED_TOTAL 34
28#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
29#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
30#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
31#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
32#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
33#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
34#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
35#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
36#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
37
38#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
39# define RGB_MATRIX_DISABLE_KEYCODES
40#endif \ No newline at end of file
diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/default/keymap.c b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c
index 5edcdd099..fd55a3185 100644
--- a/keyboards/mechlovin/hannah60rgb/keymaps/default/keymap.c
+++ b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c
@@ -21,6 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 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, 21 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,
22 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, 22 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,
23 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_LSFT, MO(1), 23 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_LSFT, MO(1),
24 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), 24 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ),
25 25
26}; 26};
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c
new file mode 100644
index 000000000..c3c7c1559
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c
@@ -0,0 +1,44 @@
1/* Copyright 2020 Mechlovin'
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_all(
20 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_DEL,
21 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,
22 LT(2,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,
23 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_LSFT, MO(1),
24 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ),
25 [1] = LAYOUT_all(
26 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
31 [2] = LAYOUT_all(
32 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
37 [3] = LAYOUT_all(
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
39 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
40 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
43
44};
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk
new file mode 100644
index 000000000..036bd6d1c
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c
new file mode 100644
index 000000000..05469a1bb
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c
@@ -0,0 +1,247 @@
1/* Copyright 2020 Mechlovin'
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "rev2.h"
18
19#ifdef RGB_MATRIX_ENABLE
20const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
21/* Refer to IS31 manual for these locations
22 * driver
23 * | R location
24 * | | G location
25 * | | | B location
26 * | | | | */
27// left CA
28 {0, C1_1, C3_2, C4_2}, //D9-0-0
29 {0, C5_2, C6_2, C7_2}, //D59-1-1
30 {0, C2_1, C3_1, C4_1}, //D68-2-2
31 {0, C5_1, C6_1, C7_1}, //D76-3-3
32 {0, C1_2, C2_2, C4_3}, //D10-15-4
33 {0, C5_3, C6_3, C7_3}, //D60-16-5
34 {0, C1_3, C2_3, C3_3}, //D72-17-6
35 {0, C5_4, C6_4, C7_4}, //D77-18-7
36 {0, C1_4, C2_4, C3_4}, //D46-30-8
37 {0, C4_4, C6_5, C7_5}, //D61-31-9
38 {0, C1_5, C2_5, C3_5}, //D73-32-10
39 {0, C4_5, C5_5, C7_6}, //D78-33-11
40 {0, C1_6, C2_6, C3_6}, //D126-44-12
41 {0, C4_6, C5_6, C6_6}, //D51-45-13
42 {0, C1_7, C2_7, C3_7}, //D63-46-14
43 {0, C4_7, C5_7, C6_7}, //D74-47-15
44 {0, C1_8, C2_8, C3_8}, //D56-60-16
45 {0, C4_8, C5_8, C6_8}, //D67-61-17
46
47// left CB
48 {0, C2_9, C3_9, C4_9}, //D80-4-18
49 {0, C5_9, C6_9, C7_9}, //D84-5-19
50 {0, C1_9, C3_10, C4_10}, //D89-6-20
51 {0, C5_10, C6_10, C7_10}, //D94-7-21
52 {0, C1_10, C2_10, C4_11}, //D81-19-22
53 {0, C5_11, C6_11, C7_11}, //D85-20-23
54 {0, C1_11, C2_11, C3_11}, //D90-21-24
55 {0, C5_12, C6_12, C7_12}, //D95-22-25
56 {0, C1_12, C2_12, C3_12}, //D82-34-26
57 {0, C4_12, C6_13, C7_13}, //D86-35-27
58 {0, C1_13, C2_13, C3_13}, //D91-36-28
59 {0, C4_13, C5_13, C7_14}, //D96-37-29
60 {0, C1_14, C2_14, C3_14}, //D79-48-30
61 {0, C4_14, C5_14, C6_14}, //D83-49-31
62 {0, C1_15, C2_15, C3_15}, //D87-50-32
63 {0, C4_15, C5_15, C6_15}, //D92-51-33
64 {0, C1_16, C2_16, C3_16}, //D75-62-34
65 {0, C4_16, C5_16, C6_16}, //D93-63-35
66
67// right CA
68 {1, C2_1, C3_1, C4_1}, //D98-8-36
69 {1, C5_1, C6_1, C7_1}, //D102-9-37
70 {1, C1_1, C3_2, C4_2}, //D106-10-38
71 {1, C5_2, C6_2, C7_2}, //D111-11-39
72 {1, C2_9, C3_9, C4_9}, //D116-12-40
73 {1, C5_9, C6_9, C7_9}, //D130-13-41
74 {1, C1_13, C2_13, C3_13}, //D121-14-42
75 {1, C1_2, C2_2, C4_3}, //D99-23-43
76 {1, C5_3, C6_3, C7_3}, //D103-24-44
77 {1, C1_3, C2_3, C3_3}, //D107-25-45
78 {1, C5_4, C6_4, C7_4}, //D112-26-46
79 {1, C1_9, C3_10, C4_10}, //D117-27-47
80 {1, C5_10, C6_10, C7_10}, //D129-28-48
81 {1, C4_13, C5_13, C7_14}, //D122-29-49
82 {1, C1_4, C2_4, C3_4}, //D100-38-50
83 {1, C4_4, C6_5, C7_5}, //D104-39-51
84 {1, C1_5, C2_5, C3_5}, //D108-40-52
85 {1, C4_5, C5_5, C7_6}, //D113-41-53
86// right CB
87 {1, C1_10, C2_10, C4_11}, //D118-42-54
88 {1, C5_11, C6_11, C7_11}, //D123-43-55
89 {1, C1_6, C2_6, C3_6}, //D97-52-56
90 {1, C4_6, C5_6, C6_6}, //D101-53-57
91 {1, C1_7, C2_7, C3_7}, //D105-54-58
92 {1, C4_7, C5_7, C6_7}, //D109-55-59
93 {1, C1_11, C2_11, C3_11}, //D114-56-60
94 {1, C5_12, C6_12, C7_12}, //D128-57-61
95 {1, C1_14, C2_14, C3_14}, //D119-58-62
96 {1, C4_14, C5_14, C6_14}, //D124-59-63
97 {1, C1_8, C2_8, C3_8}, //D127-64-64
98 {1, C4_8, C5_8, C6_8}, //D110-65-65
99 {1, C1_12, C2_12, C3_12}, //D115-66-66
100 {1, C4_12, C6_13, C7_13}, //D120-67-67
101 {1, C1_15, C2_15, C3_15}, //D125-68-68
102 {1, C4_15, C5_15, C6_15}, //D140-69-69
103 {0, C8_7, C7_7, C7_8}, //INDICATOR LED-70
104 {0, C8_8, C8_1, C8_2}, //INDICATOR LED-71
105 {0, C9_7, C8_6, C9_6}, //INDICATOR LED-72
106 {0, C9_8, C8_4, C8_5},//INDICATOR LED-73
107 {0, C8_15, C9_1, C9_2},//INDICATOR LED-74
108 {0, C8_16, C8_3, C9_3},//INDICATOR LED-75
109 {0, C9_15, C9_9, C9_10},//INDICATOR LED-76
110 {0, C9_16, C9_11, C7_12},//INDICATOR LED-77
111};
112
113led_config_t g_led_config = { {
114 // Key Matrix to LED Index
115 {0, 1, 2, 3, 18, 19, 20, 21, 36, 37, 38, 39, 40, 41},
116 {4, 5, 6, 7, 22, 23, 24, 25, 43, 44, 45, 46, 47, 69},
117 {8, 9, 10, 11, 26, 27, 28, 29, 50, 51, 52, 53, 54, 55},
118 {13, 14, 15, 30, 31, 32, 33, 56, 57, 58, 59, 60, 62, 63},
119 {16, 17, 34, NO_LED, NO_LED, NO_LED, 35, NO_LED, NO_LED, NO_LED, 65, 66, 67, 68},
120 },
121 {
122 //LED Index to Physical Positon
123 { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0}, //9-59-68-76
124 { 0, 16}, { 16, 16}, { 32, 16}, { 48, 16}, //10-60-72-77
125 { 0, 32}, { 16, 32}, { 32, 32}, { 48, 32}, //46-61-73-78
126 { 0, 48}, { 0, 48}, { 12, 48}, { 16, 48}, //126-51-63-74
127 { 0, 64}, { 16, 64}, //56-67
128 { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, //80-84-89-94
129 { 64, 16}, { 80, 16}, { 96,16}, { 112,16}, //81-85-90-95
130 { 64, 32}, { 80, 32}, { 96,32}, { 112,32}, //82-86-91-96
131 { 32, 48}, { 48, 48}, { 64,48}, { 80,48}, //79-83-87-92
132 { 32, 64}, { 80, 64}, //75-93
133 { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {220, 0}, {210, 0}, //98-102-106-111-116-121-130
134 { 128,16}, {144,16}, {160,16}, {176, 16}, {192, 16}, {220, 16}, {220,16}, //99-103-107-112-117-129-122
135 { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {220, 32}, //100-104-108-113-118-123
136 { 96,48}, {112,48}, {128, 48}, {144, 48}, {160, 48}, {200, 48}, {220,48}, {220,48}, //97-101-105-109-114-119-128-124
137 { 96,64}, {144,64}, {160,64}, {176,64}, {220, 64}, //127-110-115-120-125
138 { 220, 0}, //140
139}, {
140 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
141 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
142 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
143 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
144 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
145} };
146
147__attribute__((weak)) void rgb_matrix_indicators_user(void) {
148 if (host_keyboard_led_state().caps_lock) {
149 rgb_matrix_set_color(8, 255, 255, 255);
150 rgb_matrix_set_color(70, 255, 0, 0);
151 } else {
152 rgb_matrix_set_color(70, 0, 0, 0);
153 }
154 if (host_keyboard_led_state().num_lock) {
155 rgb_matrix_set_color(71, 255, 0, 0);
156 } else {
157 rgb_matrix_set_color(71, 0, 0, 0);
158 }
159 if (host_keyboard_led_state().scroll_lock) {
160 rgb_matrix_set_color(72, 255, 0, 0);
161 } else {
162 rgb_matrix_set_color(72, 0, 0, 0);
163 }
164}
165
166__attribute__((weak))
167layer_state_t layer_state_set_user(layer_state_t state) {
168 // if on layer 1, turn on L1 LED, otherwise off.
169 if (get_highest_layer(state) == 0) {
170 rgb_matrix_set_color(73, 255, 0, 0);
171 } else {
172 rgb_matrix_set_color(73, 0, 0, 0);
173 }
174 // if on layer 2, turn on L2 LED, otherwise off.
175 if (get_highest_layer(state) == 1) {
176 rgb_matrix_set_color(74, 255, 0, 0);
177 } else {
178 rgb_matrix_set_color(74, 0, 0, 0);
179 }
180
181 // if on layer 3, turn on L3 LED, otherwise off.
182 if (get_highest_layer(state) == 2) {
183 rgb_matrix_set_color(75, 255, 0, 0);
184 } else {
185 rgb_matrix_set_color(75, 0, 0, 0);
186 }
187
188 // if on layer 4, turn on L4 LED, otherwise off.
189 if (get_highest_layer(state) == 3) {
190 rgb_matrix_set_color(76, 255, 0, 0);
191 } else {
192 rgb_matrix_set_color(76, 0, 0, 0);
193 }
194
195 // if on layer 5, turn on L5 LED, otherwise off.
196 if (get_highest_layer(state) == 4) {
197 rgb_matrix_set_color(77, 255, 0, 0);
198 } else {
199 rgb_matrix_set_color(77, 0, 0, 0);
200 }
201
202 return state;
203}
204
205#endif
206
207bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
208 if (record->event.pressed) {
209 switch(keycode) {
210 #ifdef RGB_MATRIX_DISABLE_KEYCODES
211 case KC_F13: // toggle rgb matrix
212 rgb_matrix_toggle();
213 return false;
214 case KC_F14:
215 rgb_matrix_step();
216 return false;
217 case KC_F15:
218 rgb_matrix_increase_speed();
219 return false;
220 case KC_F16:
221 rgb_matrix_decrease_speed();
222 return false;
223 case KC_F17:
224 rgb_matrix_increase_hue();
225 return false;
226 case KC_F18:
227 rgb_matrix_decrease_hue();
228 return false;
229 case KC_F19:
230 rgb_matrix_increase_sat();
231 return false;
232 case KC_F20:
233 rgb_matrix_decrease_sat();
234 return false;
235 case KC_F21:
236 rgb_matrix_increase_val();
237 return false;
238 case KC_F22:
239 rgb_matrix_decrease_val();
240 return false;
241 #endif
242 default:
243 break;
244 }
245 }
246 return true;
247}
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.h b/keyboards/mechlovin/hannah60rgb/rev2/rev2.h
new file mode 100644
index 000000000..3382941e4
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.h
@@ -0,0 +1,33 @@
1/*
2Copyright 2020 Mechlovin'
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#pragma once
18
19#include "quantum.h"
20
21#define LAYOUT_all( \
22K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \
23K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \
24K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
25K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
26K40, K41, K42, K46, K4A, K4B, K4C, K4D \
27) { \
28 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
29 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
30 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
31 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
32 { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \
33}
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rules.mk b/keyboards/mechlovin/hannah60rgb/rev2/rules.mk
new file mode 100644
index 000000000..1114e6952
--- /dev/null
+++ b/keyboards/mechlovin/hannah60rgb/rev2/rules.mk
@@ -0,0 +1,2 @@
1RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
2RGB_MATRIX_ENABLE = IS31FL3731 \ No newline at end of file
diff --git a/keyboards/mechlovin/hannah60rgb/rules.mk b/keyboards/mechlovin/hannah60rgb/rules.mk
index 1a5441fc7..7023e65ca 100644
--- a/keyboards/mechlovin/hannah60rgb/rules.mk
+++ b/keyboards/mechlovin/hannah60rgb/rules.mk
@@ -14,14 +14,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
14# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 14# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
15NKRO_ENABLE = yes # USB Nkey Rollover 15NKRO_ENABLE = yes # USB Nkey Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18MIDI_ENABLE = no # MIDI support
19UNICODE_ENABLE = no # Unicode
20BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
21AUDIO_ENABLE = no # Audio output on port C6 18AUDIO_ENABLE = no # Audio output on port C6
22FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
23HD44780_ENABLE = no # Enable support for HD44780 based LCDs
24RGB_MATRIX_ENABLE = WS2812
25
26# generated by KBFirmware JSON to QMK Parser 19# generated by KBFirmware JSON to QMK Parser
27# https://noroadsleft.github.io/kbf_qmk_converter/ 20# https://noroadsleft.github.io/kbf_qmk_converter/
21
22DEFAULT_FOLDER = mechlovin/hannah60rgb/rev1