summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-06-11 06:27:53 +0000
committerQMK Bot <hello@qmk.fm>2023-06-11 06:27:53 +0000
commit55f226159b2e06265ccb8f2105ef1c95f2f7f005 (patch)
treecb6f5435c3373d7f9e6106f2b7881d46ebf40788
parentc4b116875f6ac7c73556b8f4438d2ad3af6085e2 (diff)
parent8cd9f07c305b704a8fd163bd2dbc1891e80c3b18 (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/viktus/osav2_topre/ec.c205
-rw-r--r--keyboards/viktus/osav2_topre/ec.h31
-rw-r--r--keyboards/viktus/osav2_topre/info.json588
-rw-r--r--keyboards/viktus/osav2_topre/keymaps/default/keymap.c34
-rw-r--r--keyboards/viktus/osav2_topre/keymaps/via/keymap.c34
-rw-r--r--keyboards/viktus/osav2_topre/keymaps/via/rules.mk1
-rw-r--r--keyboards/viktus/osav2_topre/osav2_topre.c49
-rw-r--r--keyboards/viktus/osav2_topre/readme.md25
-rw-r--r--keyboards/viktus/osav2_topre/rules.mk3
9 files changed, 970 insertions, 0 deletions
diff --git a/keyboards/viktus/osav2_topre/ec.c b/keyboards/viktus/osav2_topre/ec.c
new file mode 100644
index 0000000000..fd2e8fa0ec
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/ec.c
@@ -0,0 +1,205 @@
1/* Copyright 2023 Viktus Design LLC
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#include "ec.h"
19#include "analog.h"
20//#include "debug.h" // needed for debugging
21
22// sensing channel definitions
23#define A0 0
24#define A1 1
25#define A2 2
26#define A3 3
27#define A4 4
28#define A5 5
29#define A6 6
30#define A7 7
31
32// analog connection settings
33#define DISCHARGE_PIN D3
34#define ANALOG_PORT D4
35
36#ifndef MUX_SEL_PIN
37# define MUX_SEL_PINS \
38 { D0, D1, D2 }
39#endif
40
41// pin connections
42const uint8_t row_channels[] = MATRIX_ROW_PINS;
43const uint8_t col_pins[] = MATRIX_COL_PINS;
44const uint8_t mux_sel_pins[] = MUX_SEL_PINS;
45
46_Static_assert(sizeof(mux_sel_pins) == 3, "invalid MUX_SEL_PINS");
47
48static ec_config_t config;
49static uint16_t ec_sw_value[MATRIX_COLS][MATRIX_ROWS];
50
51static inline void discharge_capacitor(void) { setPinOutput(DISCHARGE_PIN); }
52static inline void charge_capacitor(uint8_t col) {
53 setPinInput(DISCHARGE_PIN);
54 writePinHigh(col_pins[col]);
55}
56
57static inline void clear_all_col_pins(void) {
58 for (int col = 0; col < sizeof(col_pins); col++) {
59 writePinLow(col_pins[col]);
60 }
61}
62
63void init_mux_sel(void) {
64 for (int idx = 0; idx < sizeof(mux_sel_pins); idx++) {
65 setPinOutput(mux_sel_pins[idx]);
66 }
67}
68
69void select_mux(uint8_t row) {
70 uint8_t ch = row_channels[row];
71 writePin(mux_sel_pins[0], ch & 1);
72 writePin(mux_sel_pins[1], ch & 2);
73 writePin(mux_sel_pins[2], ch & 4);
74}
75
76void init_col(void) {
77 for (int idx = 0; idx < sizeof(col_pins); idx++) {
78 setPinOutput(col_pins[idx]);
79 writePinLow(col_pins[idx]);
80 }
81}
82
83void ec_init(ec_config_t const* const ec_config) {
84 // save config
85 config = *ec_config;
86
87 // initialize discharge pin as discharge mode
88 writePinLow(DISCHARGE_PIN);
89 setPinOutput(DISCHARGE_PIN);
90
91 // set analog reference
92 analogReference(ADC_REF_POWER);
93
94 // initialize drive lines
95 init_col();
96
97 // initialize multiplexer select pin
98 init_mux_sel();
99
100 // set discharge pin to charge mode
101 setPinInput(DISCHARGE_PIN);
102}
103
104uint16_t ec_readkey_raw(uint8_t col, uint8_t row) {
105 uint16_t sw_value = 0;
106
107 discharge_capacitor();
108
109 select_mux(row);
110
111 clear_all_col_pins();
112
113 cli();
114
115 charge_capacitor(col);
116
117 sw_value = analogReadPin(ANALOG_PORT);
118
119 sei();
120
121 return sw_value;
122}
123
124bool ec_update_key(matrix_row_t* current_row, matrix_row_t col, uint16_t sw_value, uint16_t reset_pt, uint16_t actuation_pt) {
125 bool current_state = (*current_row >> col) & 1;
126
127 // press to release
128 if (current_state && sw_value < reset_pt) {
129 *current_row &= ~(MATRIX_ROW_SHIFTER << col);
130 return true;
131 }
132
133 // release to press
134 if ((!current_state) && sw_value > actuation_pt) {
135 *current_row |= (MATRIX_ROW_SHIFTER << col);
136 return true;
137 }
138
139 return false;
140}
141
142bool ec_matrix_scan(matrix_row_t current_matrix[]) {
143 bool updated = false;
144
145 for (int row = 0; row < sizeof(row_channels); row++) {
146 for (int col = 0; col < sizeof(col_pins); col++) {
147 uint16_t reset_pt = config.reset_pt;
148 uint16_t actuation_pt = config.actuation_pt;
149
150 //Modifying threshold values for overlapping pads
151 switch(row) {
152 case 0:
153 switch(col) {
154 case 14: // lower threshold for split backspace: left 1U( rest, btm)
155 case 15: // lower threshold for 2U backspace: 2U(38 rest, 60 btm)
156 reset_pt = 44;
157 actuation_pt = 48;
158 break;
159 }
160 break;
161 case 3:
162 switch(col) {
163 case 14: // Lower threshold for right shift: 1.75U(40 rest, 70 btm)
164 reset_pt = 48;
165 actuation_pt = 53;
166 break;
167 }
168 break;
169 case 4:
170 switch(col) {
171 case 3: // Lower threshold for left space: col3( rest, btm)
172 case 4: // Lower threshold for left space: col4(38 rest, 88 btm)
173 reset_pt = 50;
174 actuation_pt = 60;
175 break;
176 case 5: // Lower threshold for left space: col5( rest, btm)
177 case 6: // Lower threshold for left space: col6(40 rest, 80 btm)
178 reset_pt = 48;
179 actuation_pt = 58;
180 break;
181 case 14: // Lower threshold for right shift: 2.75U( rest, btm)
182 reset_pt = 48;
183 actuation_pt = 53;
184 break;
185 }
186 break;
187 }
188
189 ec_sw_value[col][row] = ec_readkey_raw(col, row);
190 updated |= ec_update_key(&current_matrix[row], col, ec_sw_value[col][row], reset_pt, actuation_pt);
191 }
192 }
193
194 return updated;
195}
196
197// console debugging for pad values
198/*void ec_dprint_matrix(void) {
199 for (int row = 0; row < sizeof(row_channels); row++) {
200 for (int col = 0; col < sizeof(col_pins); col++) {
201 dprintf("%5d", ec_sw_value[col][row]);
202 }
203 dprintf("\n");
204 }
205}*/
diff --git a/keyboards/viktus/osav2_topre/ec.h b/keyboards/viktus/osav2_topre/ec.h
new file mode 100644
index 0000000000..76da647dc8
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/ec.h
@@ -0,0 +1,31 @@
1/* Copyright 2023 Viktus Design LLC
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 <stdint.h>
18#include <stdbool.h>
19
20#include "matrix.h"
21
22typedef struct {
23 uint16_t reset_pt;
24 uint16_t actuation_pt;
25} ec_config_t;
26
27void ec_init(ec_config_t const* const ec_config);
28bool ec_matrix_scan(matrix_row_t current_matrix[]);
29//void ec_dprint_matrix(void); // needed for debugging
30uint16_t ec_readkey_raw(uint8_t col, uint8_t row);
31bool ec_update_key(matrix_row_t* current_row, matrix_row_t col, uint16_t sw_value, uint16_t reset_pt, uint16_t actuation_pt);
diff --git a/keyboards/viktus/osav2_topre/info.json b/keyboards/viktus/osav2_topre/info.json
new file mode 100644
index 0000000000..1f2120ed57
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/info.json
@@ -0,0 +1,588 @@
1{
2 "manufacturer": "Viktus Design LLC",
3 "keyboard_name": "OSAv2 - Topre",
4 "maintainer": "BlindAssassin111",
5 "url": "https://viktus.design",
6 "usb": {
7 "device_version": "1.6.0",
8 "vid": "0x5644",
9 "pid": "0x446F"
10 },
11 "bootloader": "atmel-dfu",
12 "processor": "atmega32u4",
13 "features": {
14 "bootmagic": true,
15 "command": false,
16 "console": false,
17 "extrakey": true,
18 "mousekey": true,
19 "nkro": true
20 },
21 "build": {
22 "lto": true
23 },
24 "diode_direction": "COL2ROW",
25 "matrix_pins": {
26 "cols": ["B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "B7", "F1", "F0", "E6", "B0", "B1", "B2", "B3"],
27 "rows": ["A1", "A0", "A3", "A4", "A2"]
28 },
29 "indicators": {
30 "num_lock": "B4",
31 "caps_lock": "D7",
32 "scroll_lock": "D6"
33 },
34 "layouts": {
35 "LAYOUT_split_back": {
36 "layout": [
37 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
38 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
39 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
40 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
41 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
42 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
43 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
44 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
45 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
46 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
47 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
48 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
49 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
50 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
51 { "label": "K014", "matrix": [0, 14], "x": 15.75, "y": 0 },
52 { "label": "K015", "matrix": [0, 15], "x": 16.75, "y": 0 },
53 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
54 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
55 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
56 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
57 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
58 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
59 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
60 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
61 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
62 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
63 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
64 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
65 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
66 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
67 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
68 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
69 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
70 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
71 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
72 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
73 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
74 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
75 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
76 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
77 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
78 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
79 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
80 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
81 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
82 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
83 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
84 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
85 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
86 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
87 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
88 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
89 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
90 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
91 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
92 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
93 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
94 { "label": "K414", "matrix": [4, 14], "w": 2.75, "x": 15.75, "y": 3 },
95 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
96 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
97 { "label": "K44", "matrix": [4, 4], "w": 2.25, "x": 5.5, "y": 4 },
98 { "label": "K46", "matrix": [4, 6], "x": 7.75, "y": 4 },
99 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
100 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
101 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
102 ]
103 },
104 "LAYOUT_2u_back": {
105 "layout": [
106 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
107 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
108 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
109 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
110 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
111 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
112 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
113 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
114 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
115 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
116 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
117 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
118 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
119 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
120 { "label": "K015", "matrix": [0, 15], "w": 2, "x": 15.75, "y": 0 },
121 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
122 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
123 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
124 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
125 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
126 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
127 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
128 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
129 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
130 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
131 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
132 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
133 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
134 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
135 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
136 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
137 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
138 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
139 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
140 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
141 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
142 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
143 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
144 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
145 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
146 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
147 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
148 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
149 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
150 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
151 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
152 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
153 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
154 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
155 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
156 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
157 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
158 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
159 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
160 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
161 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
162 { "label": "K414", "matrix": [4, 14], "w": 2.75, "x": 15.75, "y": 3 },
163 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
164 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
165 { "label": "K44", "matrix": [4, 4], "w": 2.25, "x": 5.5, "y": 4 },
166 { "label": "K46", "matrix": [4, 6], "x": 7.75, "y": 4 },
167 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
168 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
169 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
170 ]
171 },
172 "LAYOUT_split_back_175u_shift": {
173 "layout": [
174 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
175 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
176 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
177 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
178 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
179 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
180 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
181 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
182 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
183 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
184 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
185 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
186 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
187 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
188 { "label": "K014", "matrix": [0, 14], "x": 15.75, "y": 0 },
189 { "label": "K015", "matrix": [0, 15], "x": 16.75, "y": 0 },
190 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
191 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
192 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
193 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
194 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
195 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
196 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
197 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
198 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
199 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
200 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
201 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
202 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
203 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
204 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
205 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
206 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
207 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
208 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
209 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
210 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
211 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
212 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
213 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
214 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
215 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
216 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
217 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
218 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
219 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
220 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
221 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
222 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
223 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
224 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
225 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
226 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
227 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
228 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
229 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
230 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
231 { "label": "K314", "matrix": [3, 14], "w": 1.75, "x": 15.75, "y": 3 },
232 { "label": "K315", "matrix": [3, 15], "x": 17.5, "y": 3 },
233 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
234 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
235 { "label": "K44", "matrix": [4, 4], "w": 2.25, "x": 5.5, "y": 4 },
236 { "label": "K46", "matrix": [4, 6], "x": 7.75, "y": 4 },
237 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
238 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
239 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
240 ]
241 },
242 "LAYOUT_2u_back_175u_shift": {
243 "layout": [
244 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
245 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
246 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
247 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
248 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
249 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
250 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
251 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
252 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
253 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
254 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
255 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
256 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
257 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
258 { "label": "K015", "matrix": [0, 15], "w": 2, "x": 15.75, "y": 0 },
259 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
260 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
261 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
262 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
263 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
264 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
265 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
266 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
267 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
268 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
269 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
270 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
271 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
272 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
273 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
274 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
275 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
276 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
277 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
278 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
279 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
280 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
281 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
282 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
283 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
284 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
285 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
286 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
287 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
288 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
289 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
290 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
291 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
292 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
293 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
294 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
295 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
296 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
297 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
298 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
299 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
300 { "label": "K314", "matrix": [3, 14], "w": 1.75, "x": 15.75, "y": 3 },
301 { "label": "K315", "matrix": [3, 15], "x": 17.5, "y": 3 },
302 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
303 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
304 { "label": "K44", "matrix": [4, 4], "w": 2.25, "x": 5.5, "y": 4 },
305 { "label": "K46", "matrix": [4, 6], "x": 7.75, "y": 4 },
306 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
307 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
308 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
309 ]
310 },
311 "LAYOUT_split_back_mirrored": {
312 "layout": [
313 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
314 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
315 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
316 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
317 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
318 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
319 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
320 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
321 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
322 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
323 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
324 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
325 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
326 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
327 { "label": "K014", "matrix": [0, 14], "x": 15.75, "y": 0 },
328 { "label": "K015", "matrix": [0, 15], "x": 16.75, "y": 0 },
329 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
330 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
331 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
332 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
333 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
334 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
335 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
336 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
337 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
338 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
339 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
340 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
341 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
342 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
343 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
344 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
345 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
346 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
347 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
348 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
349 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
350 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
351 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
352 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
353 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
354 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
355 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
356 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
357 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
358 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
359 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
360 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
361 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
362 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
363 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
364 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
365 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
366 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
367 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
368 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
369 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
370 { "label": "K414", "matrix": [4, 14], "w": 2.75, "x": 15.75, "y": 3 },
371 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
372 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
373 { "label": "K44", "matrix": [4, 3], "x": 5.5, "y": 4 },
374 { "label": "K46", "matrix": [4, 5], "w": 2.25, "x": 6.5, "y": 4 },
375 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
376 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
377 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
378 ]
379 },
380 "LAYOUT_2u_back_mirrored": {
381 "layout": [
382 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
383 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
384 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
385 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
386 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
387 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
388 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
389 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
390 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
391 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
392 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
393 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
394 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
395 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
396 { "label": "K015", "matrix": [0, 15], "w": 2, "x": 15.75, "y": 0 },
397 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
398 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
399 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
400 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
401 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
402 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
403 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
404 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
405 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
406 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
407 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
408 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
409 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
410 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
411 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
412 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
413 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
414 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
415 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
416 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
417 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
418 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
419 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
420 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
421 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
422 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
423 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
424 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
425 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
426 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
427 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
428 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
429 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
430 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
431 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
432 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
433 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
434 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
435 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
436 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
437 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
438 { "label": "K414", "matrix": [4, 14], "w": 2.75, "x": 15.75, "y": 3 },
439 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
440 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
441 { "label": "K44", "matrix": [4, 3], "x": 5.5, "y": 4 },
442 { "label": "K46", "matrix": [4, 5], "w": 2.25, "x": 6.5, "y": 4 },
443 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
444 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
445 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
446 ]
447 },
448 "LAYOUT_split_back_175u_shift_mirrored": {
449 "layout": [
450 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
451 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
452 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
453 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
454 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
455 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
456 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
457 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
458 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
459 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
460 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
461 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
462 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
463 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
464 { "label": "K014", "matrix": [0, 14], "x": 15.75, "y": 0 },
465 { "label": "K015", "matrix": [0, 15], "x": 16.75, "y": 0 },
466 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
467 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
468 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
469 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
470 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
471 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
472 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
473 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
474 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
475 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
476 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
477 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
478 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
479 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
480 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
481 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
482 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
483 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
484 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
485 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
486 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
487 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
488 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
489 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
490 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
491 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
492 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
493 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
494 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
495 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
496 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
497 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
498 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
499 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
500 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
501 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
502 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
503 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
504 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
505 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
506 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
507 { "label": "K314", "matrix": [3, 14], "w": 1.75, "x": 15.75, "y": 3 },
508 { "label": "K315", "matrix": [3, 15], "x": 17.5, "y": 3 },
509 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
510 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
511 { "label": "K44", "matrix": [4, 3], "x": 5.5, "y": 4 },
512 { "label": "K46", "matrix": [4, 5], "w": 2.25, "x": 6.5, "y": 4 },
513 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
514 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
515 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
516 ]
517 },
518 "LAYOUT_2u_back_175u_shift_mirrored": {
519 "layout": [
520 { "label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0 },
521 { "label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0 },
522 { "label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0 },
523 { "label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0 },
524 { "label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0 },
525 { "label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0 },
526 { "label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0 },
527 { "label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0 },
528 { "label": "K08", "matrix": [0, 8], "x": 9.75, "y": 0 },
529 { "label": "K09", "matrix": [0, 9], "x": 10.75, "y": 0 },
530 { "label": "K010", "matrix": [0, 10], "x": 11.75, "y": 0 },
531 { "label": "K011", "matrix": [0, 11], "x": 12.75, "y": 0 },
532 { "label": "K012", "matrix": [0, 12], "x": 13.75, "y": 0 },
533 { "label": "K013", "matrix": [0, 13], "x": 14.75, "y": 0 },
534 { "label": "K015", "matrix": [0, 15], "w": 2, "x": 15.75, "y": 0 },
535 { "label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1 },
536 { "label": "K11", "matrix": [1, 1], "w": 1.5, "x": 1.5, "y": 1 },
537 { "label": "K12", "matrix": [1, 2], "x": 3, "y": 1 },
538 { "label": "K13", "matrix": [1, 3], "x": 4, "y": 1 },
539 { "label": "K14", "matrix": [1, 4], "x": 5, "y": 1 },
540 { "label": "K15", "matrix": [1, 5], "x": 6, "y": 1 },
541 { "label": "K16", "matrix": [1, 6], "x": 7, "y": 1 },
542 { "label": "K18", "matrix": [1, 8], "x": 9.5, "y": 1 },
543 { "label": "K19", "matrix": [1, 9], "x": 10.5, "y": 1 },
544 { "label": "K110", "matrix": [1, 10], "x": 11.5, "y": 1 },
545 { "label": "K111", "matrix": [1, 11], "x": 12.5, "y": 1 },
546 { "label": "K112", "matrix": [1, 12], "x": 13.5, "y": 1 },
547 { "label": "K113", "matrix": [1, 13], "x": 14.5, "y": 1 },
548 { "label": "K114", "matrix": [1, 14], "x": 15.5, "y": 1 },
549 { "label": "K115", "matrix": [1, 15], "w": 1.5, "x": 16.5, "y": 1 },
550 { "label": "K20", "matrix": [2, 0], "x": 0, "y": 2 },
551 { "label": "K21", "matrix": [2, 1], "w": 1.75, "x": 1.25, "y": 2 },
552 { "label": "K22", "matrix": [2, 2], "x": 3, "y": 2 },
553 { "label": "K23", "matrix": [2, 3], "x": 4, "y": 2 },
554 { "label": "K24", "matrix": [2, 4], "x": 5, "y": 2 },
555 { "label": "K25", "matrix": [2, 5], "x": 6, "y": 2 },
556 { "label": "K26", "matrix": [2, 6], "x": 7, "y": 2 },
557 { "label": "K28", "matrix": [2, 8], "x": 10, "y": 2 },
558 { "label": "K29", "matrix": [2, 9], "x": 11, "y": 2 },
559 { "label": "K210", "matrix": [2, 10], "x": 12, "y": 2 },
560 { "label": "K211", "matrix": [2, 11], "x": 13, "y": 2 },
561 { "label": "K212", "matrix": [2, 12], "x": 14, "y": 2 },
562 { "label": "K213", "matrix": [2, 13], "x": 15, "y": 2 },
563 { "label": "K215", "matrix": [2, 15], "w": 2.25, "x": 16, "y": 2 },
564 { "label": "K31", "matrix": [3, 1], "w": 2.25, "x": 1, "y": 3 },
565 { "label": "K32", "matrix": [3, 2], "x": 3.25, "y": 3 },
566 { "label": "K33", "matrix": [3, 3], "x": 4.25, "y": 3 },
567 { "label": "K34", "matrix": [3, 4], "x": 5.25, "y": 3 },
568 { "label": "K35", "matrix": [3, 5], "x": 6.25, "y": 3 },
569 { "label": "K36", "matrix": [3, 6], "x": 7.25, "y": 3 },
570 { "label": "K38", "matrix": [3, 8], "x": 9.75, "y": 3 },
571 { "label": "K39", "matrix": [3, 9], "x": 10.75, "y": 3 },
572 { "label": "K310", "matrix": [3, 10], "x": 11.75, "y": 3 },
573 { "label": "K311", "matrix": [3, 11], "x": 12.75, "y": 3 },
574 { "label": "K312", "matrix": [3, 12], "x": 13.75, "y": 3 },
575 { "label": "K313", "matrix": [3, 13], "x": 14.75, "y": 3 },
576 { "label": "K314", "matrix": [3, 14], "w": 1.75, "x": 15.75, "y": 3 },
577 { "label": "K315", "matrix": [3, 15], "x": 17.5, "y": 3 },
578 { "label": "K41", "matrix": [4, 1], "w": 1.5, "x": 1, "y": 4 },
579 { "label": "K42", "matrix": [4, 2], "w": 1.5, "x": 4, "y": 4 },
580 { "label": "K44", "matrix": [4, 3], "x": 5.5, "y": 4 },
581 { "label": "K46", "matrix": [4, 5], "w": 2.25, "x": 6.5, "y": 4 },
582 { "label": "K49", "matrix": [4, 9], "w": 2.75, "x": 9.75, "y": 4 },
583 { "label": "K411", "matrix": [4, 11], "w": 1.5, "x": 12.5, "y": 4 },
584 { "label": "K415", "matrix": [4, 15], "w": 1.5, "x": 16.75, "y": 4 }
585 ]
586 }
587 }
588}
diff --git a/keyboards/viktus/osav2_topre/keymaps/default/keymap.c b/keyboards/viktus/osav2_topre/keymaps/default/keymap.c
new file mode 100644
index 0000000000..b9561c9b32
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
1/* Copyright 2022 Viktus Design LLC
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
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_split_back_175u_shift(
21 KC_DEL, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_TILDE,
22 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_BSPC,
23 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,
24 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
25 KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL
26 ),
27 [1] = LAYOUT_split_back_175u_shift(
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, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_TRNS, 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,
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
31 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
32 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
33 )
34};
diff --git a/keyboards/viktus/osav2_topre/keymaps/via/keymap.c b/keyboards/viktus/osav2_topre/keymaps/via/keymap.c
new file mode 100644
index 0000000000..b9561c9b32
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/keymaps/via/keymap.c
@@ -0,0 +1,34 @@
1/* Copyright 2022 Viktus Design LLC
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
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_split_back_175u_shift(
21 KC_DEL, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_TILDE,
22 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_BSPC,
23 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,
24 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
25 KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL
26 ),
27 [1] = LAYOUT_split_back_175u_shift(
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, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_TRNS, 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,
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
31 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
32 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
33 )
34};
diff --git a/keyboards/viktus/osav2_topre/keymaps/via/rules.mk b/keyboards/viktus/osav2_topre/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/viktus/osav2_topre/osav2_topre.c b/keyboards/viktus/osav2_topre/osav2_topre.c
new file mode 100644
index 0000000000..96b04090cf
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/osav2_topre.c
@@ -0,0 +1,49 @@
1/* Copyright 2023 Viktus Design LLC
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#include "ec.h"
19#include "matrix.h"
20//#include "debug.h" // needed for debugging
21
22#define RESET_PT 55
23#define ACTUATION_PT 65
24
25// console debugging for pad values
26/*void keyboard_post_init_kb() {
27 debug_enable = true;
28 debug_matrix = true;
29}*/
30
31void matrix_init_custom(void) {
32 ec_config_t ec_config = {.reset_pt = RESET_PT, .actuation_pt = ACTUATION_PT};
33
34 ec_init(&ec_config);
35}
36
37bool matrix_scan_custom(matrix_row_t current_matrix[]) {
38 bool updated = ec_matrix_scan(current_matrix);
39
40 // console debugging for pad values
41 /*static int cnt = 0;
42 if (cnt++ == 300) {
43 cnt = 0;
44 ec_dprint_matrix();
45 dprintf("\n");
46 }*/
47
48 return updated;
49}
diff --git a/keyboards/viktus/osav2_topre/readme.md b/keyboards/viktus/osav2_topre/readme.md
new file mode 100644
index 0000000000..6379644cd6
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/readme.md
@@ -0,0 +1,25 @@
1# OSAv2 Topre
2
3![osav2_topre](https://i.imgur.com/WTRrpQFh.png)
4
5- Keyboard Maintainer: BlindAssassin111
6- Hardware Supported: OSAv2 Topre PCBs
7- Hardware Availability: Viktus Design LLC
8
9Make example for this keyboard (after setting up your build environment):
10
11 make viktus/osav2_topre:default
12
13Flashing example for this keyboard:
14
15 make viktus/osav2_topre:default:flash
16
17See 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).
18
19## Bootloader
20
21Enter the bootloader in 3 ways:
22
23* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
24* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
25* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/viktus/osav2_topre/rules.mk b/keyboards/viktus/osav2_topre/rules.mk
new file mode 100644
index 0000000000..037e26c530
--- /dev/null
+++ b/keyboards/viktus/osav2_topre/rules.mk
@@ -0,0 +1,3 @@
1CUSTOM_MATRIX = lite
2QUANTUM_LIB_SRC += analog.c
3SRC += ec.c