summaryrefslogtreecommitdiff
path: root/keyboards/inland
diff options
context:
space:
mode:
authorjonylee@hfd <108282809+jonylee1986@users.noreply.github.com>2023-06-20 10:31:46 +0800
committerGitHub <noreply@github.com>2023-06-19 19:31:46 -0700
commitd98b60c8f607c9d3d40b187ab9ea47e4fa6df2ef (patch)
treef58367965c491f0daf4113c27c5eb18f3d93ff5c /keyboards/inland
parent808228c1a89cda24ca9e9c4d6516b7964bf00e85 (diff)
Move kb83 keyboard (#20761)
* move hfdkb/keyboard_sw/k83 --> inland/kb83 * move hfdkb/keyboard_sw/k83 --> inland/kb83 * Update data/mappings/keyboard_aliases.hjson * Update keyboard_aliases.hjson * fixed the Configurator layout data * fixed the Configurator layout data * Revert "Update keyboard_aliases.hjson" This reverts commit c085c547656d09a14b9b0fad6a00f9551106719f. * Revert "fixed the Configurator layout data" * Update keyboard_aliases.hjson * Update info.json
Diffstat (limited to 'keyboards/inland')
-rw-r--r--keyboards/inland/kb83/config.h85
-rw-r--r--keyboards/inland/kb83/halconf.h23
-rw-r--r--keyboards/inland/kb83/info.json130
-rw-r--r--keyboards/inland/kb83/kb83.c604
-rw-r--r--keyboards/inland/kb83/keymaps/default/keymap.c73
-rw-r--r--keyboards/inland/kb83/keymaps/via/keymap.c73
-rw-r--r--keyboards/inland/kb83/keymaps/via/rules.mk2
-rw-r--r--keyboards/inland/kb83/mcuconf.h24
-rw-r--r--keyboards/inland/kb83/readme.md19
-rw-r--r--keyboards/inland/kb83/rgb_matrix_kb.inc51
-rw-r--r--keyboards/inland/kb83/rules.mk19
11 files changed, 1103 insertions, 0 deletions
diff --git a/keyboards/inland/kb83/config.h b/keyboards/inland/kb83/config.h
new file mode 100644
index 0000000000..a4660c93be
--- /dev/null
+++ b/keyboards/inland/kb83/config.h
@@ -0,0 +1,85 @@
1/* Copyright (C) 2022 jonylee@hfd
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#pragma once
18
19
20#define RGB_TRIGGER_ON_KEYDOWN
21
22/* encoder resolution */
23#define TAP_CODE_DELAY 15
24
25/* DIP switch */
26#define DIP_SWITCH_PINS \
27 { A9 }
28
29/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
30#define LOCKING_SUPPORT_ENABLE
31/* Locking resynchronize hack */
32#define LOCKING_RESYNC_ENABLE
33
34/* SPI Config for spi flash*/
35#define SPI_DRIVER SPIDQ
36#define SPI_SCK_PIN B3
37#define SPI_MOSI_PIN B5
38#define SPI_MISO_PIN B4
39#define SPI_MOSI_PAL_MODE 5
40
41#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
42#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
43
44/* I2C Config for LED Driver */
45#define DRIVER_COUNT 2
46#define DRIVER_ADDR_1 0b1110100
47#define DRIVER_ADDR_2 0b1110111
48#define I2C1_SDA_PIN B7
49#define I2C1_SCL_PIN B6
50#define I2C1_SCL_PAL_MODE 4
51#define I2C1_OPMODE OPMODE_I2C
52#define I2C1_CLOCK_SPEED 400000 /* 400000 */
53
54#define DRIVER_1_LED_TOTAL 61
55#define DRIVER_2_LED_TOTAL 21
56#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + 10)
57
58#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
59
60#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
61#define RGB_MATRIX_KEYPRESSES
62#define RGB_MATRIX_KEYRELEASES
63
64// RGB Matrix Animation modes. Explicitly enabled
65// For full list of effects, see:
66// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
67#define ENABLE_RGB_MATRIX_BREATHING
68#define ENABLE_RGB_MATRIX_CYCLE_ALL
69#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
70#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
71#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
72#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
73#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
74#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
75#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
76#define ENABLE_RGB_MATRIX_DUAL_BEACON
77#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
78#define ENABLE_RGB_MATRIX_RAINDROPS
79#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
80// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
81#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
82#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
83#define ENABLE_RGB_MATRIX_MULTISPLASH
84
85#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
diff --git a/keyboards/inland/kb83/halconf.h b/keyboards/inland/kb83/halconf.h
new file mode 100644
index 0000000000..2f64e65393
--- /dev/null
+++ b/keyboards/inland/kb83/halconf.h
@@ -0,0 +1,23 @@
1/* Copyright (C) 2022 jonylee@hfd
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#pragma once
17
18#define HAL_USE_I2C TRUE
19#define HAL_USE_SPI TRUE
20#define SPI_USE_WAIT TRUE
21#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
22
23#include_next <halconf.h>
diff --git a/keyboards/inland/kb83/info.json b/keyboards/inland/kb83/info.json
new file mode 100644
index 0000000000..b31fd86f1f
--- /dev/null
+++ b/keyboards/inland/kb83/info.json
@@ -0,0 +1,130 @@
1{
2 "keyboard_name": "KB83",
3 "manufacturer": "www.hfd.cn",
4 "maintainer": "hfd",
5 "usb": {
6 "vid": "0xFFFE",
7 "pid": "0x0007",
8 "device_version": "1.0.0",
9 "force_nkro": true
10 },
11 "rgb_matrix": {
12 "driver": "IS31FL3733"
13 },
14 "processor": "WB32FQ95",
15 "bootloader": "wb32-dfu",
16 "matrix_pins": {
17 "cols": ["C1", "C2", "C3", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "C4", "C5", "B0", "B1", "B2"],
18 "rows": ["B15", "C6", "C7", "C8", "C9", "A8"]
19 },
20 "diode_direction": "ROW2COL",
21 "encoder": {
22 "rotary": [
23 {"pin_a": "B14", "pin_b": "B13", "resolution": 4}
24 ]
25 },
26 "layouts": {
27 "LAYOUT": {
28 "layout": [
29 {"matrix": [0, 0], "x": 0, "y": 0},
30
31 {"matrix": [0, 1], "x": 1.25, "y": 0},
32 {"matrix": [0, 2], "x": 2.25, "y": 0},
33 {"matrix": [0, 3], "x": 3.25, "y": 0},
34 {"matrix": [0, 4], "x": 4.25, "y": 0},
35
36 {"matrix": [0, 5], "x": 5.5, "y": 0},
37 {"matrix": [0, 6], "x": 6.5, "y": 0},
38 {"matrix": [0, 7], "x": 7.5, "y": 0},
39 {"matrix": [0, 8], "x": 8.5, "y": 0},
40
41 {"matrix": [0, 9], "x": 9.75, "y": 0},
42 {"matrix": [0, 10], "x": 10.75, "y": 0},
43 {"matrix": [0, 11], "x": 11.75, "y": 0},
44 {"matrix": [0, 12], "x": 12.75, "y": 0},
45
46 {"matrix": [0, 13], "x": 14, "y": 0},
47 {"matrix": [0, 15], "x": 15.25, "y": 0},
48
49 {"matrix": [1, 0], "x": 0, "y": 1.25},
50 {"matrix": [1, 1], "x": 1, "y": 1.25},
51 {"matrix": [1, 2], "x": 2, "y": 1.25},
52 {"matrix": [1, 3], "x": 3, "y": 1.25},
53 {"matrix": [1, 4], "x": 4, "y": 1.25},
54 {"matrix": [1, 5], "x": 5, "y": 1.25},
55 {"matrix": [1, 6], "x": 6, "y": 1.25},
56 {"matrix": [1, 7], "x": 7, "y": 1.25},
57 {"matrix": [1, 8], "x": 8, "y": 1.25},
58 {"matrix": [1, 9], "x": 9, "y": 1.25},
59 {"matrix": [1, 10], "x": 10, "y": 1.25},
60 {"matrix": [1, 11], "x": 11, "y": 1.25},
61 {"matrix": [1, 12], "x": 12, "y": 1.25},
62 {"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2},
63
64 {"matrix": [1, 15], "x": 15.25, "y": 1.25},
65
66 {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5},
67 {"matrix": [2, 1], "x": 1.5, "y": 2.25},
68 {"matrix": [2, 2], "x": 2.5, "y": 2.25},
69 {"matrix": [2, 3], "x": 3.5, "y": 2.25},
70 {"matrix": [2, 4], "x": 4.5, "y": 2.25},
71 {"matrix": [2, 5], "x": 5.5, "y": 2.25},
72 {"matrix": [2, 6], "x": 6.5, "y": 2.25},
73 {"matrix": [2, 7], "x": 7.5, "y": 2.25},
74 {"matrix": [2, 8], "x": 8.5, "y": 2.25},
75 {"matrix": [2, 9], "x": 9.5, "y": 2.25},
76 {"matrix": [2, 10], "x": 10.5, "y": 2.25},
77 {"matrix": [2, 11], "x": 11.5, "y": 2.25},
78 {"matrix": [2, 12], "x": 12.5, "y": 2.25},
79 {"matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5},
80
81 {"matrix": [2, 15], "x": 15.25, "y": 2.25},
82
83 {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75},
84 {"matrix": [3, 1], "x": 1.75, "y": 3.25},
85 {"matrix": [3, 2], "x": 2.75, "y": 3.25},
86 {"matrix": [3, 3], "x": 3.75, "y": 3.25},
87 {"matrix": [3, 4], "x": 4.75, "y": 3.25},
88 {"matrix": [3, 5], "x": 5.75, "y": 3.25},
89 {"matrix": [3, 6], "x": 6.75, "y": 3.25},
90 {"matrix": [3, 7], "x": 7.75, "y": 3.25},
91 {"matrix": [3, 8], "x": 8.75, "y": 3.25},
92 {"matrix": [3, 9], "x": 9.75, "y": 3.25},
93 {"matrix": [3, 10], "x": 10.75, "y": 3.25},
94 {"matrix": [3, 11], "x": 11.75, "y": 3.25},
95 {"matrix": [3, 13], "x": 12.75, "y": 3.25, "w": 2.25},
96
97 {"matrix": [3, 15], "x": 15.25, "y": 3.25},
98
99 {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25},
100 {"matrix": [4, 1], "x": 2.25, "y": 4.25},
101 {"matrix": [4, 2], "x": 3.25, "y": 4.25},
102 {"matrix": [4, 3], "x": 4.25, "y": 4.25},
103 {"matrix": [4, 4], "x": 5.25, "y": 4.25},
104 {"matrix": [4, 5], "x": 6.25, "y": 4.25},
105 {"matrix": [4, 6], "x": 7.25, "y": 4.25},
106 {"matrix": [4, 7], "x": 8.25, "y": 4.25},
107 {"matrix": [4, 8], "x": 9.25, "y": 4.25},
108 {"matrix": [4, 9], "x": 10.25, "y": 4.25},
109 {"matrix": [4, 10], "x": 11.25, "y": 4.25},
110 {"matrix": [4, 13], "x": 12.25, "y": 4.25, "w": 1.75},
111
112 {"matrix": [4, 14], "x": 14.125, "y": 4.375},
113
114 {"matrix": [4, 15], "x": 15.25, "y": 4.25},
115
116 {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25},
117 {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25},
118 {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25},
119 {"matrix": [5, 5], "x": 3.75, "y": 5.25, "w": 6.25},
120 {"matrix": [5, 9], "x": 10, "y": 5.25},
121 {"matrix": [5, 10], "x": 11, "y": 5.25},
122 {"matrix": [5, 11], "x": 12, "y": 5.25},
123
124 {"matrix": [5, 13], "x": 13.125, "y": 5.375},
125 {"matrix": [5, 14], "x": 14.125, "y": 5.375},
126 {"matrix": [5, 15], "x": 15.125, "y": 5.375}
127 ]
128 }
129 }
130}
diff --git a/keyboards/inland/kb83/kb83.c b/keyboards/inland/kb83/kb83.c
new file mode 100644
index 0000000000..86b52cfe92
--- /dev/null
+++ b/keyboards/inland/kb83/kb83.c
@@ -0,0 +1,604 @@
1/* Copyright (C) 2022 jonylee@hfd
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 "quantum.h"
18
19// clang-format off
20#ifdef RGB_MATRIX_ENABLE
21const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
22/* Refer to IS31 manual for these locations
23 * driver
24 * | R location
25 * | | G location
26 * | | | B location
27 * | | | | */
28 {1, A_1, B_1, C_1},
29 {1, A_2, B_2, C_2},
30 {1, A_3, B_3, C_3},
31 {1, A_4, B_4, C_4},
32 {1, A_5, B_5, C_5},
33 {1, A_6, B_6, C_6},
34 {1, A_7, B_7, C_7},
35 {1, A_8, B_8, C_8},
36 {1, A_9, B_9, C_9},
37 {1, A_10, B_10, C_10},
38 {1, A_11, B_11, C_11},
39 {1, A_12, B_12, C_12},
40 {1, A_13, B_13, C_13},
41 {1, A_14, B_14, C_14},
42
43 {0, A_1, B_1, C_1},
44 {0, A_2, B_2, C_2},
45 {0, A_3, B_3, C_3},
46 {0, A_4, B_4, C_4},
47 {0, A_5, B_5, C_5},
48 {0, A_6, B_6, C_6},
49 {0, A_7, B_7, C_7},
50 {0, A_8, B_8, C_8},
51 {0, A_9, B_9, C_9},
52 {0, A_10, B_10, C_10},
53 {0, A_11, B_11, C_11},
54 {0, A_12, B_12, C_12},
55 {0, A_13, B_13, C_13},
56 {0, A_14, B_14, C_14},
57 {1, D_1, E_1, F_1},
58
59 {0, D_1, E_1, F_1},
60 {0, D_2, E_2, F_2},
61 {0, D_3, E_3, F_3},
62 {0, D_4, E_4, F_4},
63 {0, D_5, E_5, F_5},
64 {0, D_6, E_6, F_6},
65 {0, D_7, E_7, F_7},
66 {0, D_8, E_8, F_8},
67 {0, D_9, E_9, F_9},
68 {0, D_10, E_10, F_10},
69 {0, D_11, E_11, F_11},
70 {0, D_12, E_12, F_12},
71 {0, D_13, E_13, F_13},
72 {0, D_14, E_14, F_14},
73 {1, D_2, E_2, F_2},
74
75 {0, G_1, H_1, I_1},
76 {0, G_2, H_2, I_2},
77 {0, G_3, H_3, I_3},
78 {0, G_4, H_4, I_4},
79 {0, G_5, H_5, I_5},
80 {0, G_6, H_6, I_6},
81 {0, G_7, H_7, I_7},
82 {0, G_8, H_8, I_8},
83 {0, G_9, H_9, I_9},
84 {0, G_10, H_10, I_10},
85 {0, G_11, H_11, I_11},
86 {0, G_12, H_12, I_12},
87 {0, G_13, H_13, I_13},
88 {1, D_3, E_3, F_3},
89
90 {0, J_1, K_1, L_1},
91 {0, J_2, K_2, L_2},
92 {0, J_3, K_3, L_3},
93 {0, J_4, K_4, L_4},
94 {0, J_5, K_5, L_5},
95 {0, J_6, K_6, L_6},
96 {0, J_7, K_7, L_7},
97 {0, J_8, K_8, L_8},
98 {0, J_9, K_9, L_9},
99 {0, J_10, K_10, L_10},
100 {0, J_11, K_11, L_11},
101 {0, J_12, K_12, L_12},
102 {1, D_7, E_7, F_7},
103 {1, D_4, E_4, F_4},
104
105 {0, J_13, K_13, L_13},
106 {0, J_14, K_14, L_14},
107 {0, J_15, K_15, L_15},
108 {0, J_16, K_16, L_16},
109
110 {0, G_14, H_14, I_14},
111 {0, G_15, H_15, I_15},
112 {0, G_16, H_16, I_16},
113
114 {0, D_15, E_15, F_15},
115 {1, D_6, E_6, F_6},
116 {1, D_5, E_5, F_5},
117
118 {1, G_1, H_1, I_1},
119 {1, G_2, H_2, I_2},
120 {1, G_3, H_3, I_3},
121 {1, G_4, H_4, I_4},
122 {1, G_5, H_5, I_5},
123
124 {1, J_1, K_1, L_1},
125 {1, J_2, K_2, L_2},
126 {1, J_3, K_3, L_3},
127 {1, J_4, K_4, L_4},
128 {1, J_5, K_5, L_5},
129};
130
131led_config_t g_led_config = {
132 {
133 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, NO_LED},
134 { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NO_LED, 28},
135 { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43},
136 { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, NO_LED, 57},
137 { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, NO_LED, NO_LED, 69, 70, 71},
138 { 72, 73, 74, NO_LED, NO_LED, 75, NO_LED, NO_LED, NO_LED, 76, 77, 78, NO_LED, 79, 80, 81}
139 },
140 {
141 { 0, 0}, // 0
142 { 14, 0}, // 1
143 { 29, 0}, // 2
144 { 44, 0}, // 3
145 { 59, 0}, // 4
146 { 74, 0}, // 5
147 { 89, 0}, // 6
148 {104, 0}, // 7
149 {119, 0}, // 8
150 {134, 0}, // 9
151 {149, 0}, // 10
152 {164, 0}, // 11
153 {179, 0}, // 12
154 {194, 0}, // 13
155
156 { 0, 12}, // 14
157 { 14, 12}, // 15
158 { 28, 12}, // 16
159 { 42, 12}, // 17
160 { 56, 12}, // 18
161 { 70, 12}, // 19
162 { 84, 12}, // 20
163 { 98, 12}, // 21
164 {112, 12}, // 22
165 {126, 12}, // 23
166 {140, 12}, // 24
167 {154, 12}, // 25
168 {168, 12}, // 26
169 {182, 12}, // 27
170 {224, 12}, // 28
171
172 { 0, 25}, // 29
173 { 14, 25}, // 30
174 { 28, 25}, // 31
175 { 42, 25}, // 32
176 { 56, 25}, // 33
177 { 70, 25}, // 34
178 { 84, 25}, // 35
179 { 98, 25}, // 36
180 {112, 25}, // 37
181 {126, 25}, // 38
182 {140, 25}, // 39
183 {154, 25}, // 40
184 {168, 25}, // 41
185 {182, 25}, // 42
186 {224, 25}, // 43
187
188 { 0, 38}, // 44
189 { 28, 38}, // 45
190 { 42, 38}, // 46
191 { 56, 38}, // 47
192 { 70, 38}, // 48
193 { 84, 38}, // 49
194 { 98, 38}, // 50
195 {112, 38}, // 51
196 {126, 38}, // 52
197 {140, 38}, // 53
198 {154, 38}, // 54
199 {168, 38}, // 55
200 {182, 38}, // 56
201 {224, 38}, // 57
202
203 { 0, 51}, // 58
204 { 18, 51}, // 59
205 { 37, 51}, // 60
206 { 56, 51}, // 61
207 { 74, 51}, // 62
208 { 93, 51}, // 63
209 {112, 51}, // 64
210 {130, 51}, // 65
211 {149, 51}, // 66
212 {168, 51}, // 67
213 {186, 51}, // 68
214 {200, 51}, // 69
215 {214, 51}, // 70
216 {224, 51}, // 71
217
218 { 0, 64}, // 72
219 { 18, 64}, // 73
220 { 37, 64}, // 74
221 { 92, 64}, // 75
222 {140, 64}, // 76
223 {154, 64}, // 77
224 {168, 64}, // 78
225 {196, 64}, // 80
226 {210, 64}, // 81
227 {224, 64}, // 82
228
229 {0, 0}, // 68 LED 1
230 {0, 16}, // 69 LED 2
231 {0, 32}, // 70 LED 3
232 {0, 48}, // 71 LED 4
233 {0, 64}, // 72 LED 5
234
235 {224, 0 }, // 78 LED 12
236 {224, 16}, // 79 LED 13
237 {224, 32}, // 80 LED 14
238 {224, 48}, // 81 LED 15
239 {224, 64}, // 82 LED 16
240 },
241 {
242 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
243 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
244 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
245 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
246 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
247 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
248 2, 2, 2, 2, 2,
249 2, 2, 2, 2, 2,
250 }
251};
252
253bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
254 if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
255 return false;
256 }
257 // caps lock red
258 if (host_keyboard_led_state().caps_lock) {
259 RGB_MATRIX_INDICATOR_SET_COLOR(44, 255, 0, 0);
260 } else {
261 if (!rgb_matrix_get_flags()) {
262 RGB_MATRIX_INDICATOR_SET_COLOR(44, 0, 0, 0);
263 }
264 }
265 // GUI lock red
266 if (keymap_config.no_gui) {
267 RGB_MATRIX_INDICATOR_SET_COLOR(73, 255, 0, 0);
268 } else {
269 if (!rgb_matrix_get_flags()) {
270 RGB_MATRIX_INDICATOR_SET_COLOR(73, 0, 0, 0);
271 }
272 }
273 return true;
274}
275
276#endif
277
278enum __layers {
279 WIN_B,
280 WIN_FN,
281 MAC_B,
282 MAC_FN
283};
284
285enum colors {
286 WHITE,
287 RED,
288 GREEN,
289 BLUE
290};
291enum colors led_color_status = WHITE;
292
293// clang-format on
294static bool fn_make_flag = false;
295static bool Lkey_flag = false;
296static bool reset_glint_flag = false;
297static bool while_test_flag = false;
298static bool alarm_flag = false;
299static uint16_t current_time = 0;
300static uint8_t glint_cnt = 0;
301static uint16_t scancode = 0;
302static uint8_t alarm_cnt = 0;
303static uint8_t RGB_HSV_level;
304
305HSV hsv;
306
307void led_test(uint8_t color);
308void clear_eeprom(void);
309void rgb_hsv_updata_user(void);
310
311bool dip_switch_update_kb(uint8_t index, bool active) {
312 if (!dip_switch_update_user(index, active)) {
313 return false;
314 }
315 if (index == 0) {
316 default_layer_set(1UL << (active ? 2 : 0));
317 }
318 if(active){
319 keymap_config.no_gui = 0;
320 eeconfig_update_keymap(keymap_config.raw);
321 }
322 return true;
323}
324
325bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
326 if (!process_record_user(keycode, record)) {
327 return false;
328 }
329 switch (keycode) {
330 case MO(WIN_FN):
331 case MO(MAC_FN):
332 fn_make_flag = record->event.pressed;
333 return true;
334 case KC_ESC:
335 if (fn_make_flag && record->event.pressed) {
336 Lkey_flag = true;
337 current_time = timer_read();
338 scancode = KC_ESC;
339 return false;
340 } else {
341 Lkey_flag = 0;
342 }
343 return true;
344 case KC_END:
345 if (fn_make_flag && record->event.pressed) {
346 if (while_test_flag) {
347 while_test_flag = false;
348 rgb_matrix_init();
349 } else {
350 Lkey_flag = true;
351 current_time = timer_read();
352 scancode = KC_END;
353 }
354 return false;
355 } else {
356 Lkey_flag = 0;
357 }
358 return true;
359 case KC_LEFT:
360 if (while_test_flag == true) {
361 if (record->event.pressed) {
362 if (glint_cnt == 0)
363 glint_cnt = 3;
364 else
365 glint_cnt--;
366 if ((glint_cnt % 4) == 0) {
367 rgb_matrix_sethsv_noeeprom(HSV_WHITE);
368 } else if ((glint_cnt % 4) == 1) {
369 rgb_matrix_sethsv_noeeprom(HSV_RED);
370 } else if ((glint_cnt % 4) == 2) {
371 rgb_matrix_sethsv_noeeprom(HSV_GREEN);
372 } else if ((glint_cnt % 4) == 3) {
373 rgb_matrix_sethsv_noeeprom(HSV_BLUE);
374 }
375 }
376 return false;
377 }
378 return true;
379 case KC_RGHT:
380 if (while_test_flag == true) {
381 if (record->event.pressed) {
382 glint_cnt++;
383 if (glint_cnt >= 4) glint_cnt = 0;
384
385 if ((glint_cnt % 4) == 0) {
386 rgb_matrix_sethsv_noeeprom(HSV_WHITE);
387 } else if ((glint_cnt % 4) == 1) {
388 rgb_matrix_sethsv_noeeprom(HSV_RED);
389 } else if ((glint_cnt % 4) == 2) {
390 rgb_matrix_sethsv_noeeprom(HSV_GREEN);
391 } else if ((glint_cnt % 4) == 3) {
392 rgb_matrix_sethsv_noeeprom(HSV_BLUE);
393 }
394 }
395 return false;
396 }
397 return true;
398 case DF(WIN_B):
399 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
400 alarm_flag = true;
401 rgb_matrix_toggle_noeeprom();
402 current_time = timer_read();
403 set_single_persistent_default_layer(WIN_B);
404 return false;
405 }
406 return true;
407 case DF(MAC_B):
408 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
409 alarm_flag = true;
410 rgb_matrix_toggle_noeeprom();
411 current_time = timer_read();
412 set_single_persistent_default_layer(MAC_B);
413 return false;
414 }
415 return true;
416
417 case RGB_VAI:
418 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
419 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) < 4) {
420 RGB_HSV_level++;
421 rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
422 }
423 rgb_hsv_updata_user();
424 }
425 return false;
426 case RGB_VAD:
427 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
428 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) > 0) {
429 RGB_HSV_level--;
430 rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
431 }
432 rgb_hsv_updata_user();
433 }
434 return false;
435 case RGB_SAI:
436 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
437 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_sat() / (UINT8_MAX / 4)) < 4) {
438 RGB_HSV_level++;
439 rgb_matrix_config.hsv.s = (uint8_t)(UINT8_MAX / 4) * RGB_HSV_level;
440 }
441 rgb_hsv_updata_user();
442 }
443 return false;
444 case RGB_SAD:
445 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
446 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_sat() / (UINT8_MAX / 4)) > 0) {
447 RGB_HSV_level--;
448 rgb_matrix_config.hsv.s = (uint8_t)(UINT8_MAX / 4) * RGB_HSV_level;
449 }
450 rgb_hsv_updata_user();
451 }
452 return false;
453 case RGB_HUI:
454 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
455 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 6)) < 6) {
456 RGB_HSV_level++;
457 rgb_matrix_config.hsv.h = (uint8_t)(UINT8_MAX / 6) * RGB_HSV_level;
458 }
459 rgb_hsv_updata_user();
460 }
461 return false;
462 case RGB_HUD:
463 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
464 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 6)) > 0) {
465 RGB_HSV_level--;
466 rgb_matrix_config.hsv.h = (uint8_t)(UINT8_MAX / 6) * RGB_HSV_level;
467 }
468 rgb_hsv_updata_user();
469 }
470 return false;
471 case RGB_SPI:
472 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
473 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 4)) < 4) {
474 RGB_HSV_level++;
475 rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 4) * RGB_HSV_level);
476 }
477 }
478 return false;
479 case RGB_SPD:
480 if ((fn_make_flag && record->event.pressed) && (alarm_flag == 0)) {
481 if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 4)) > 0) {
482 RGB_HSV_level--;
483 rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 4) * RGB_HSV_level);
484 }
485 }
486 return false;
487 case RGB_TOG:
488 if (record->event.pressed) {
489 switch (rgb_matrix_get_flags()) {
490 case LED_FLAG_ALL: {
491 rgb_matrix_set_flags(LED_FLAG_NONE);
492 rgb_matrix_set_color_all(0, 0, 0);
493 } break;
494 default: {
495 rgb_matrix_set_flags(LED_FLAG_ALL);
496 } break;
497 }
498 }
499 if (!rgb_matrix_is_enabled()) {
500 rgb_matrix_set_flags(LED_FLAG_ALL);
501 rgb_matrix_enable();
502 }
503 return false;
504
505 default:
506 return process_record_user(keycode, record);
507 }
508}
509
510void housekeeping_task_kb(void) {
511 if (Lkey_flag) {
512 if (scancode == KC_ESC) {
513 if (timer_elapsed(current_time) >= 3000) {
514 Lkey_flag = false;
515 clear_eeprom();
516
517 current_time = timer_read();
518 reset_glint_flag = true;
519 glint_cnt = 0;
520 rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
521 rgb_matrix_sethsv_noeeprom(HSV_OFF);
522 }
523 } else if (scancode == KC_END) {
524 if (timer_elapsed(current_time) >= 3000) {
525 Lkey_flag = false;
526 clear_eeprom();
527
528 while_test_flag = true;
529 glint_cnt = 0;
530 rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
531 rgb_matrix_sethsv_noeeprom(HSV_WHITE);
532 }
533 }
534 } else if (reset_glint_flag) {
535 if ((timer_elapsed(current_time)) >= 300) {
536 current_time = timer_read();
537 if (((glint_cnt++) & 0x01) == 0) {
538 rgb_matrix_sethsv_noeeprom(HSV_RED);
539 } else {
540 rgb_matrix_sethsv_noeeprom(HSV_OFF);
541 }
542 if (glint_cnt >= 7) {
543 glint_cnt = 0;
544 reset_glint_flag = false;
545 rgb_matrix_init();
546 }
547 }
548 } else if (alarm_cnt != 0) {
549 alarm_cnt--;
550 if (alarm_cnt == 0) {
551 alarm_flag = true;
552 rgb_matrix_toggle_noeeprom();
553 current_time = timer_read();
554 }
555 } else if (alarm_flag) {
556 if ((timer_elapsed(current_time)) >= 200) {
557 rgb_matrix_toggle_noeeprom();
558 alarm_flag = 0;
559 }
560 }
561}
562
563void led_test(uint8_t color) {
564 rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
565
566 switch (color) {
567 case WHITE:
568 rgb_matrix_sethsv_noeeprom(HSV_WHITE);
569 break;
570
571 case RED:
572 rgb_matrix_sethsv_noeeprom(HSV_RED);
573 break;
574
575 case GREEN:
576 rgb_matrix_sethsv_noeeprom(HSV_GREEN);
577 break;
578
579 case BLUE:
580 rgb_matrix_sethsv_noeeprom(HSV_BLUE);
581 break;
582 }
583}
584
585void clear_eeprom(void) {
586 layer_state_t default_layer_temp = default_layer_state;
587 eeconfig_init();
588 default_layer_set(default_layer_temp);
589
590#ifdef VIA_ENABLE
591 // This resets the layout options
592 via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
593 // This resets the keymaps in EEPROM to what is in flash.
594 dynamic_keymap_reset();
595 // This resets the macros in EEPROM to nothing.
596 dynamic_keymap_macro_reset();
597#endif
598
599 rgb_matrix_enable_noeeprom();
600}
601
602void rgb_hsv_updata_user(void) {
603 rgb_matrix_sethsv(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
604}
diff --git a/keyboards/inland/kb83/keymaps/default/keymap.c b/keyboards/inland/kb83/keymaps/default/keymap.c
new file mode 100644
index 0000000000..712383d48d
--- /dev/null
+++ b/keyboards/inland/kb83/keymaps/default/keymap.c
@@ -0,0 +1,73 @@
1/* Copyright (C) 2022 jonylee@hfd
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 QMK_KEYBOARD_H
18// clang-format off
19enum __layers {
20 WIN_B,
21 WIN_FN,
22 MAC_B,
23 MAC_FN
24};
25
26#define KC_TASK LGUI(KC_TAB)
27#define KC_FLXP LGUI(KC_E)
28#define KC_SIRI LALT(KC_SPC)
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31
32 [WIN_B] = LAYOUT( /* Base */
33 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_MUTE,
34 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
35 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_PGUP,
36 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_PGDN,
37 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_END,
38 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
39
40 [WIN_FN] = LAYOUT( /* FN */
41 _______, KC_BRID, KC_BRIU, KC_MAIL, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, RGB_TOG,
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI,
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
46 _______, GU_TOGG, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI),
47
48 [MAC_B] = LAYOUT( /* Base */
49 KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_SIRI, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE,
50 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
51 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_PGUP,
52 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_PGDN,
53 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_END,
54 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
55
56 [MAC_FN] = LAYOUT( /* FN */
57 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_TOG,
58 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI,
60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD,
61 _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, _______,
62 _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI)
63};
64
65#if defined(ENCODER_MAP_ENABLE)
66const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
67 [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
68 [WIN_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) },
69 [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
70 [MAC_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) },
71};
72#endif
73
diff --git a/keyboards/inland/kb83/keymaps/via/keymap.c b/keyboards/inland/kb83/keymaps/via/keymap.c
new file mode 100644
index 0000000000..712383d48d
--- /dev/null
+++ b/keyboards/inland/kb83/keymaps/via/keymap.c
@@ -0,0 +1,73 @@
1/* Copyright (C) 2022 jonylee@hfd
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 QMK_KEYBOARD_H
18// clang-format off
19enum __layers {
20 WIN_B,
21 WIN_FN,
22 MAC_B,
23 MAC_FN
24};
25
26#define KC_TASK LGUI(KC_TAB)
27#define KC_FLXP LGUI(KC_E)
28#define KC_SIRI LALT(KC_SPC)
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31
32 [WIN_B] = LAYOUT( /* Base */
33 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_MUTE,
34 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
35 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_PGUP,
36 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_PGDN,
37 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_END,
38 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
39
40 [WIN_FN] = LAYOUT( /* FN */
41 _______, KC_BRID, KC_BRIU, KC_MAIL, KC_WSCH, KC_CALC, KC_MSEL, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, RGB_TOG,
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI,
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
46 _______, GU_TOGG, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI),
47
48 [MAC_B] = LAYOUT( /* Base */
49 KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_SIRI, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE,
50 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
51 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_PGUP,
52 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_PGDN,
53 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_END,
54 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
55
56 [MAC_FN] = LAYOUT( /* FN */
57 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_TOG,
58 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
59 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI,
60 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD,
61 _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, _______,
62 _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI)
63};
64
65#if defined(ENCODER_MAP_ENABLE)
66const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
67 [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
68 [WIN_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) },
69 [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
70 [MAC_FN] = { ENCODER_CCW_CW(RGB_SAI, RGB_SAD) },
71};
72#endif
73
diff --git a/keyboards/inland/kb83/keymaps/via/rules.mk b/keyboards/inland/kb83/keymaps/via/rules.mk
new file mode 100644
index 0000000000..4253f570f0
--- /dev/null
+++ b/keyboards/inland/kb83/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2ENCODER_MAP_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/inland/kb83/mcuconf.h b/keyboards/inland/kb83/mcuconf.h
new file mode 100644
index 0000000000..0d16f4f04e
--- /dev/null
+++ b/keyboards/inland/kb83/mcuconf.h
@@ -0,0 +1,24 @@
1/* Copyright (C) 2022 jonylee@hfd
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#pragma once
17
18#include_next <mcuconf.h>
19
20#undef WB32_SPI_USE_QSPI
21#define WB32_SPI_USE_QSPI TRUE
22
23#undef WB32_I2C_USE_I2C1
24#define WB32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/inland/kb83/readme.md b/keyboards/inland/kb83/readme.md
new file mode 100644
index 0000000000..e6f1d45990
--- /dev/null
+++ b/keyboards/inland/kb83/readme.md
@@ -0,0 +1,19 @@
1# kb83
2
3A customizable 75% encoder keyboard.
4
5* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
6* Hardware Supported: kb83
7* Hardware Availability:[inland](https://www.microcenter.com)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make inland/kb83:default
12
13Flashing example for this keyboard:
14
15 make inland/kb83:default:flash
16
17**Reset Key**: Hold down the key located at *K01*, which programmed as *Esc* while plugging in the keyboard.
18
19See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/inland/kb83/rgb_matrix_kb.inc b/keyboards/inland/kb83/rgb_matrix_kb.inc
new file mode 100644
index 0000000000..56e2bd31cb
--- /dev/null
+++ b/keyboards/inland/kb83/rgb_matrix_kb.inc
@@ -0,0 +1,51 @@
1// !!! DO NOT ADD #pragma once !!! //
2
3// Step 1.
4// Declare custom effects using the RGB_MATRIX_EFFECT macro
5// (note the lack of semicolon after the macro!)
6
7RGB_MATRIX_EFFECT(turn_off_rgb)
8RGB_MATRIX_EFFECT(kb_reset_rgb)
9
10// Step 2.
11// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
12
13#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
14
15// e.g: A simple effect, self-contained within a single method
16static bool turn_off_rgb(effect_params_t *params) {
17 RGB_MATRIX_USE_LIMITS(led_min, led_max);
18 for (uint8_t i = led_min; i < led_max; i++) {
19 rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
20 }
21 return rgb_matrix_check_finished_leds(led_max);
22}
23
24// e.g: A more complex effect, relying on external methods and state, with
25// dedicated init and run methods
26static uint8_t some_global_state;
27static void kb_reset_rgb_init(effect_params_t* params) {
28 some_global_state = 0;
29}
30static bool kb_reset_rgb_run(effect_params_t* params) {
31 RGB_MATRIX_USE_LIMITS(led_min, led_max);
32 some_global_state++;
33 if(some_global_state&0x01){
34 for (uint8_t i = led_min; i < led_max; i++)
35 rgb_matrix_set_color(i, 0, 0, 0);
36 }
37 else{
38 for (uint8_t i = led_min; i < led_max; i++)
39 rgb_matrix_set_color(i, 0xc0, 0xc0, 0xc0);
40 }
41 if(some_global_state>=7)
42 rgb_matrix_init();
43 return rgb_matrix_check_finished_leds(led_max);
44}
45
46static bool kb_reset_rgb(effect_params_t* params) {
47 if (params->init) kb_reset_rgb_init(params);
48 return kb_reset_rgb_run(params);
49}
50
51#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/keyboards/inland/kb83/rules.mk b/keyboards/inland/kb83/rules.mk
new file mode 100644
index 0000000000..756d0c0719
--- /dev/null
+++ b/keyboards/inland/kb83/rules.mk
@@ -0,0 +1,19 @@
1# Build Options
2# change yes to no to disable
3#
4BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
5MOUSEKEY_ENABLE = no # Mouse keys
6EXTRAKEY_ENABLE = yes # Audio control and System control
7CONSOLE_ENABLE = no # Console for debug
8COMMAND_ENABLE = no # Commands for debug and configuration
9KEYBOARD_SHARED_EP = no
10NKRO_ENABLE = yes # Enable N-Key Rollover
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
13AUDIO_ENABLE = no # Audio output
14DIP_SWITCH_ENABLE = yes # DPI Switch
15ENCODER_ENABLE = yes
16RGB_MATRIX_ENABLE = yes
17EEPROM_DRIVER = wear_leveling
18WEAR_LEVELING_DRIVER = spi_flash
19#RGB_MATRIX_CUSTOM_USER = yes #Add turnoff LED