aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Adamcik <josef.adamcik@gmail.com>2019-11-09 17:05:37 +0100
committerJosef Adamcik <josef.adamcik@gmail.com>2020-04-29 09:15:45 +0200
commit168ba88ada31e9c70e39ee7a592595a7a771afe3 (patch)
tree60b8dc2ce1de34847219f00b4868c03f5461da2c
parente1217dae5a659448920a6b0a987f9a2d24ea498c (diff)
downloadqmk_firmware-168ba88ada31e9c70e39ee7a592595a7a771afe3.tar.gz
qmk_firmware-168ba88ada31e9c70e39ee7a592595a7a771afe3.zip
Add SofleKeyboard support to QMK firmware.
-rw-r--r--keyboards/sofle/config.h4
-rw-r--r--keyboards/sofle/keymaps/default/config.h9
-rw-r--r--keyboards/sofle/keymaps/default/keymap.c369
-rw-r--r--keyboards/sofle/keymaps/default/readme.md20
-rw-r--r--keyboards/sofle/keymaps/default/rules.mk5
-rw-r--r--keyboards/sofle/readme.md27
-rw-r--r--keyboards/sofle/rev1/config.h38
-rw-r--r--keyboards/sofle/rev1/info.json19
-rw-r--r--keyboards/sofle/rev1/rev1.c1
-rw-r--r--keyboards/sofle/rev1/rev1.h37
-rw-r--r--keyboards/sofle/rev1/rules.mk2
-rw-r--r--keyboards/sofle/rules.mk4
-rw-r--r--keyboards/sofle/sofle.c5
-rw-r--r--keyboards/sofle/sofle.h5
14 files changed, 545 insertions, 0 deletions
diff --git a/keyboards/sofle/config.h b/keyboards/sofle/config.h
new file mode 100644
index 000000000..0ff762c00
--- /dev/null
+++ b/keyboards/sofle/config.h
@@ -0,0 +1,4 @@
1#pragma once
2
3#include "config_common.h"
4
diff --git a/keyboards/sofle/keymaps/default/config.h b/keyboards/sofle/keymaps/default/config.h
new file mode 100644
index 000000000..8133e12fc
--- /dev/null
+++ b/keyboards/sofle/keymaps/default/config.h
@@ -0,0 +1,9 @@
1#pragma once
2
3/* The way how "handedness" is decided (which half is which),
4see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness
5for more options.
6*/
7#define MASTER_LEFT
8
9#define TAPPING_FORCE_HOLD
diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c
new file mode 100644
index 000000000..894cb33cd
--- /dev/null
+++ b/keyboards/sofle/keymaps/default/keymap.c
@@ -0,0 +1,369 @@
1#include QMK_KEYBOARD_H
2
3enum sofle_layers {
4 /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
5 _M_QWERTY,
6 _W_QWERTY,
7 _M_COLEMAK,
8 _W_COLEMAK,
9 _M_LOWER,
10 _W_LOWER,
11 _M_RAISE,
12 _W_RAISE,
13 _ADJUST,
14};
15
16enum custom_keycodes {
17 KC_M_QWERTY = SAFE_RANGE,
18 KC_W_QWERTY,
19 KC_M_COLEMAK,
20 KC_W_COLEMAK,
21 KC_M_LOWER,
22 KC_W_LOWER,
23 KC_M_RAISE,
24 KC_W_RAISE,
25 KC_ADJUST,
26};
27
28/* Linux/win variants */
29#define KC_W_UNDO LCTL(KC_Z)
30#define KC_W_CUT LCTL(KC_X)
31#define KC_W_COPY LCTL(KC_C)
32#define KC_W_PASTE LCTL(KC_V)
33#define KC_W_PRVWD LCTL(KC_LEFT)
34#define KC_W_NXTWD LCTL(KC_RIGHT)
35#define KC_W_LSTRT KC_HOME
36#define KC_W_LEND KC_END
37#define KC_W_DLINE LCTL(KC_BSPC)
38
39/* Mac variants */
40#define KC_M_UNDO LGUI(KC_Z)
41#define KC_M_CUT LGUI(KC_X)
42#define KC_M_COPY LGUI(KC_C)
43#define KC_M_PASTE LGUI(KC_V)
44#define KC_M_PRVWD LALT(KC_LEFT)
45#define KC_M_NXTWD LALT(KC_RIGHT)
46#define KC_M_LSTRT LGUI(KC_LEFT)
47#define KC_M_LEND LGUI(KC_RIGHT)
48#define KC_M_DLINE LGUI(KC_BSPC)
49
50#define KC_____ KC_TRNS
51#define KC_XXXX KC_NO
52#define KC_RESET RESET
53
54const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
55/*
56 * QWERTY
57 * ,-----------------------------------------. ,-----------------------------------------.
58 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
59 * |------+------+------+------+------+------| |------+------+------+------+------+------|
60 * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc |
61 * |------+------+------+------+------+------| |------+------+------+------+------+------|
62 * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
63 * |------+------+------+------+------+------| | | |------+------+------+------+------+------|
64 * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
65 * `-----------------------------------------/ / \ \-----------------------------------------'
66 * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
67 * | | | | |/ / \ \ | | | | |
68 * `----------------------------------' '------''---------------------------'
69 */
70[_M_QWERTY] = LAYOUT_kc( \
71 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, GRV, \
72 ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, \
73 TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, \
74 LSFT, Z, X, C, V, B, MUTE, XXXX, N, M, COMM, DOT, SLSH, RSFT, \
75 LCTRL,LALT,LGUI,M_LOWER, ENT, SPC, M_RAISE, RGUI, RALT, RCTRL \
76),
77[_W_QWERTY] = LAYOUT_kc( \
78 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, GRV, \
79 ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, \
80 TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, \
81 LSFT, Z, X, C, V, B, MUTE, XXXX, N, M, COMM, DOT, SLSH, RSFT, \
82 LGUI, LALT,LCTRL,W_LOWER,ENT, SPC, W_RAISE, RCTRL,RALT, RGUI \
83),
84/*
85 * COLEMAK
86 * ,-----------------------------------------. ,-----------------------------------------.
87 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
88 * |------+------+------+------+------+------| |------+------+------+------+------+------|
89 * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc |
90 * |------+------+------+------+------+------| |------+------+------+------+------+------|
91 * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
92 * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
93 * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift|
94 * `-----------------------------------------/ / \ \-----------------------------------------'
95 * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
96 * | | | | |/ / \ \ | | | | |
97 * `----------------------------------' '------''---------------------------'
98 */
99
100[_M_COLEMAK] = LAYOUT_kc( \
101 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, GRV, \
102 ESC, Q, W, F, P, G, J, L, U, Y, SCLN, BSPC, \
103 TAB, A, R, S, T, D, H, N, E, I, O, QUOT, \
104 LSFT, Z, X, C, V, B, MUTE, XXXX, K, M, COMM, DOT, SLSH, RSFT, \
105 LCTRL,LALT,LGUI,M_LOWER, ENT, SPC, M_RAISE, RGUI, RALT, RCTRL \
106),
107[_W_COLEMAK] = LAYOUT_kc( \
108 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, GRV, \
109 ESC, Q, W, F, P, G, J, L, U, Y, SCLN, BSPC, \
110 TAB, A, R, S, T, D, H, N, E, I, O, QUOT, \
111 LSFT, Z, X, C, V, B, MUTE, XXXX, K, M, COMM, DOT, SLSH, RSFT, \
112 LGUI, LALT,LCTRL,W_LOWER,ENT, SPC, W_RAISE, RCTRL,RALT, RGUI \
113),
114/* LOWER
115 * ,-----------------------------------------. ,-----------------------------------------.
116 * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
117 * |------+------+------+------+------+------| |------+------+------+------+------+------|
118 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
119 * |------+------+------+------+------+------| |------+------+------+------+------+------|
120 * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
121 * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
122 * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift|
123 * `-----------------------------------------/ / \ \-----------------------------------------'
124 * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
125 * | | | | |/ / \ \ | | | | |
126 * `----------------------------------' '------''---------------------------'
127 */
128[_M_LOWER] = LAYOUT_kc( \
129 ____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11,\
130 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \
131 ____, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE, \
132 ____, EQL, MINS, PLUS, LCBR, RCBR, ____, ____, LBRC, RBRC, SCLN, COLN, BSLS, ____, \
133 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____\
134),
135[_W_LOWER] = LAYOUT_kc( \
136 ____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11,\
137 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \
138 ____, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE, \
139 ____, EQL, MINS, PLUS, LCBR, RCBR, ____, ____, LBRC, RBRC, SCLN, COLN, BSLS, ____, \
140 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____\
141),
142/* RAISE
143 * ,----------------------------------------. ,-----------------------------------------.
144 * | | | | | | | | | | | | | |
145 * |------+------+------+------+------+------| |------+------+------+------+------+------|
146 * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc |
147 * |------+------+------+------+------+------| |------+------+------+------+------+------|
148 * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc |
149 * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
150 * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift|
151 * `-----------------------------------------/ / \ \-----------------------------------------'
152 * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
153 * | | | | |/ / \ \ | | | | |
154 * `----------------------------------' '------''---------------------------'
155 */
156[_M_RAISE] = LAYOUT_kc( \
157 ____, ____ , ____ , ____ , ____ , ____, ____, ____ , ____, ____ , ____ ,____, \
158 ____, INS, PSCR, APP, XXXX, XXXX, PGUP, M_PRVWD, UP,M_NXTWD,M_DLINE,BSPC, \
159 ____, LALT, LCTL, LSFT, XXXX, CAPS, PGDN, LEFT, DOWN, RGHT, DEL, BSPC, \
160 ____,M_UNDO, M_CUT,M_COPY,M_PASTE,XXXX, ____, ____, XXXX, M_LSTRT, XXXX, M_LEND, XXXX, ____, \
161 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ \
162),
163[_W_RAISE] = LAYOUT_kc( \
164 ____, ____ , ____ , ____ , ____ , ____, ____, ____ , ____, ____ , ____ , ____, \
165 ____, INS, PSCR, APP, XXXX, XXXX, PGUP, W_PRVWD, UP,W_NXTWD,W_DLINE, BSPC, \
166 ____, LALT, LCTL, LSFT, XXXX, CAPS, PGDN, LEFT, DOWN, RGHT, DEL, BSPC, \
167 ____,W_UNDO, W_CUT,W_COPY,W_PASTE,XXXX, ____, ____, XXXX, W_LSTRT, XXXX, W_LEND, XXXX, ____, \
168 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ \
169),
170/* ADJUST
171 * ,-----------------------------------------. ,-----------------------------------------.
172 * | | | | | | | | | | | | | |
173 * |------+------+------+------+------+------| |------+------+------+------+------+------|
174 * | RESET| |MACQWR|MACCOL| | | | | | | | | |
175 * |------+------+------+------+------+------| |------+------+------+------+------+------|
176 * | | |WINQWR|WINCOL| | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
177 * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------|
178 * | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | |
179 * `-----------------------------------------/ / \ \-----------------------------------------'
180 * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI |
181 * | | | | |/ / \ \ | | | | |
182 * `----------------------------------' '------''---------------------------'
183 */
184 [_ADJUST] = LAYOUT_kc( \
185 XXXX , XXXX, XXXX , XXXX , XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \
186 RESET, XXXX,M_QWERTY,M_COLEMAK, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \
187 XXXX , XXXX,W_QWERTY,W_COLEMAK, XXXX, XXXX, XXXX, VOLD, MUTE, VOLU, XXXX, XXXX, \
188 XXXX , XXXX, XXXX , XXXX , XXXX, XXXX, XXXX, XXXX, XXXX, MPRV, MPLY, MNXT, XXXX, XXXX, \
189 ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ \
190 )
191};
192
193#ifdef OLED_DRIVER_ENABLE
194
195static void render_logo(void) {
196 static const char PROGMEM qmk_logo[] = {
197 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
198 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
199 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0
200 };
201
202 oled_write_P(qmk_logo, false);
203}
204
205static void print_status_narrow(void) {
206 // Print current mode
207 oled_write_P(PSTR("\n\n"), false);
208 oled_write_ln_P(PSTR("MODE"), false);
209 oled_write_ln_P(PSTR(""), false);
210 switch (biton32(default_layer_state)) {
211 case _W_QWERTY:
212 oled_write_P(PSTR("Qwrt\nLinux"), false);
213 break;
214 case _M_QWERTY:
215 oled_write_P(PSTR("Qwrt\nMac\n"), false);
216 break;
217 case _W_COLEMAK:
218 oled_write_P(PSTR("Clmk\nLinux"), false);
219 break;
220 case _M_COLEMAK:
221 oled_write_P(PSTR("Clmk\nMac\n"), false);
222 break;
223 default:
224 oled_write_P(PSTR("Undefined\n"), false);
225 }
226 oled_write_P(PSTR("\n\n"), false);
227 // Print current layer
228 oled_write_ln_P(PSTR("LAYER"), false);
229 switch (biton32(layer_state)) {
230 case _M_COLEMAK:
231 case _W_COLEMAK:
232 case _M_QWERTY:
233 case _W_QWERTY:
234 oled_write_P(PSTR("Base\n"), false);
235 break;
236 case _M_RAISE:
237 case _W_RAISE:
238 oled_write_P(PSTR("Raise"), false);
239 break;
240 case _M_LOWER:
241 case _W_LOWER:
242 oled_write_P(PSTR("Lower"), false);
243 break;
244 case _ADJUST:
245 oled_write_P(PSTR("Adj\n"), false);
246 break;
247 default:
248 oled_write_ln_P(PSTR("Undef"), false);
249 }
250 oled_write_P(PSTR("\n\n"), false);
251 uint8_t led_usb_state = host_keyboard_leds();
252 oled_write_ln_P(led_usb_state & (1 << USB_LED_CAPS_LOCK) ? PSTR("CPSLK") : PSTR(" "), false);
253}
254
255oled_rotation_t oled_init_user(oled_rotation_t rotation) {
256 if (is_keyboard_master()) {
257 return OLED_ROTATION_270;
258 }
259 return rotation;
260}
261
262void oled_task_user(void) {
263 if (is_keyboard_master()) {
264 print_status_narrow();
265 } else {
266 render_logo();
267 }
268}
269
270#endif
271
272bool process_record_user(uint16_t keycode, keyrecord_t *record) {
273 switch (keycode) {
274 case KC_W_QWERTY:
275 if (record->event.pressed) {
276 set_single_persistent_default_layer(_W_QWERTY);
277 }
278 return false;
279 break;
280 case KC_M_QWERTY:
281 if (record->event.pressed) {
282 set_single_persistent_default_layer(_M_QWERTY);
283 }
284 return false;
285 break;
286 case KC_W_COLEMAK:
287 if (record->event.pressed) {
288 set_single_persistent_default_layer(_W_COLEMAK);
289 }
290 return false;
291 break;
292 case KC_M_COLEMAK:
293 if (record->event.pressed) {
294 set_single_persistent_default_layer(_M_COLEMAK);
295 }
296 return false;
297 break;
298 case KC_M_LOWER:
299 if (record->event.pressed) {
300 layer_on(_M_LOWER);
301 update_tri_layer(_M_LOWER, _M_RAISE, _ADJUST);
302 } else {
303 layer_off(_M_LOWER);
304 update_tri_layer(_M_LOWER, _M_RAISE, _ADJUST);
305 }
306 return false;
307 break;
308 case KC_M_RAISE:
309 if (record->event.pressed) {
310 layer_on(_M_RAISE);
311 update_tri_layer(_M_LOWER, _M_RAISE, _ADJUST);
312 } else {
313 layer_off(_M_RAISE);
314 update_tri_layer(_M_LOWER, _M_RAISE, _ADJUST);
315 }
316 return false;
317 break;
318 case KC_W_LOWER:
319 if (record->event.pressed) {
320 layer_on(_W_LOWER);
321 update_tri_layer(_W_LOWER, _W_RAISE, _ADJUST);
322 } else {
323 layer_off(_W_LOWER);
324 update_tri_layer(_W_LOWER, _W_RAISE, _ADJUST);
325 }
326 return false;
327 break;
328 case KC_W_RAISE:
329 if (record->event.pressed) {
330 layer_on(_W_RAISE);
331 update_tri_layer(_W_LOWER, _W_RAISE, _ADJUST);
332 } else {
333 layer_off(_W_RAISE);
334 update_tri_layer(_W_LOWER, _W_RAISE, _ADJUST);
335 }
336 return false;
337 break;
338 case KC_ADJUST:
339 if (record->event.pressed) {
340 layer_on(_ADJUST);
341 } else {
342 layer_off(_ADJUST);
343 }
344 return false;
345 break;
346 }
347 return true;
348}
349
350#ifdef ENCODER_ENABLE
351
352void encoder_update_user(uint8_t index, bool clockwise) {
353 if (index == 0) {
354 if (clockwise) {
355 tap_code(KC_VOLU);
356 } else {
357 tap_code(KC_VOLD);
358 }
359 } else if (index == 1) {
360 if (clockwise) {
361 tap_code(KC_PGDOWN);
362 } else {
363 tap_code(KC_PGUP);
364 }
365 }
366}
367
368#endif
369
diff --git a/keyboards/sofle/keymaps/default/readme.md b/keyboards/sofle/keymaps/default/readme.md
new file mode 100644
index 000000000..e409040ac
--- /dev/null
+++ b/keyboards/sofle/keymaps/default/readme.md
@@ -0,0 +1,20 @@
1![SofleKeyboard defualt keymap](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard.png)
2![SofleKeyboard adjust layer](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard_layout_adjust.png)
3
4
5# Default keymap for Sofle Keyboard
6
7Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4)
8
9
10Features:
11
12- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift)
13- Various modes, can be switched (using Adjust layer and the selected one is stored in EEPROM.
14- Modes for Qwerty and Colemak support
15- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often.
16- The OLED on master half shows selected mode and caps lock state and is rotated.
17- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN.
18
19
20
diff --git a/keyboards/sofle/keymaps/default/rules.mk b/keyboards/sofle/keymaps/default/rules.mk
new file mode 100644
index 000000000..6da1df16f
--- /dev/null
+++ b/keyboards/sofle/keymaps/default/rules.mk
@@ -0,0 +1,5 @@
1
2OLED_DRIVER_ENABLE = yes
3ENCODER_ENABLE = yes
4CONSOLE_ENABLE = yes
5EXTRAKEY_ENABLE = yes
diff --git a/keyboards/sofle/readme.md b/keyboards/sofle/readme.md
new file mode 100644
index 000000000..27071e6f3
--- /dev/null
+++ b/keyboards/sofle/readme.md
@@ -0,0 +1,27 @@
1# Sofle Keyboard
2
3![SofleKeyboard version 1](https://raw.githubusercontent.com/josefadamcik/SofleKeyboard/master/Images/IMG_20200126_114622.jpg)
4
5Sofle is 6×4+5 keys column-staggered split keyboard. Based on Lily58, Corne and Helix keyboards.
6
7More details about the keyboard on my blog: [Let me introduce you SofleKeyboard - a split keyboard based on Lily58 and Crkbd](https://josef-adamcik.cz/electronics/let-me-introduce-you-sofle-keyboard-split-keyboard-based-on-lily58.html)
8
9The current (temporary) build guide and a build log is available here: [SofleKeyboard build log/guide](https://josef-adamcik.cz/electronics/soflekeyboard-build-log-and-build-guide.html)
10
11* Keyboard Maintainer: [Josef Adamcik](https://josef-adamcik.cz) [Twitter:@josefadamcik](https://twitter.com/josefadamcik)
12* Hardware Supported: SofleKeyboard PCB, ProMicro
13* Hardware Availability: [PCB & Case Data](https://github.com/josefadamcik/SofleKeyboard)
14
15Make example for this keyboard (after setting up your build environment):
16
17 make sofle:default
18
19Flash the default keymap:
20
21 make sofle:default:avrdude
22
23Press reset button on he keyboard when asked.
24
25Disconnect the first half, connect the second one and repeat the process.
26
27See 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/sofle/rev1/config.h b/keyboards/sofle/rev1/config.h
new file mode 100644
index 000000000..154d1fae1
--- /dev/null
+++ b/keyboards/sofle/rev1/config.h
@@ -0,0 +1,38 @@
1#pragma once
2
3/* USB Device descriptor parameter */
4#define VENDOR_ID 0xFC32
5#define PRODUCT_ID 0x0287
6#define DEVICE_VER 0x0001
7#define MANUFACTURER JosefAdamcik
8#define PRODUCT Sofle
9#define DESCRIPTION Sofle is 6×4+5keys+encoder column-staggered split keyboard.
10
11/* key matrix size */
12// Rows are doubled-up
13#define MATRIX_ROWS 10
14#define MATRIX_COLS 6
15
16// wiring of each half
17#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
18#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
19#define DIODE_DIRECTION COL2ROW
20
21#define TAPPING_TERM 100
22#define DEBOUNCE 5
23
24/* encoder support */
25#define ENCODERS_PAD_A { F5 }
26#define ENCODERS_PAD_B { F4 }
27#define ENCODERS_PAD_A_RIGHT { F4 }
28#define ENCODERS_PAD_B_RIGHT { F5 }
29#define ENCODER_RESOLUTION 2
30
31/* communication between sides */
32#define USE_SERIAL
33#define SERIAL_USE_MULTI_TRANSACTION
34#define SOFT_SERIAL_PIN D2
35
36#define NO_ACTION_MACRO
37#define NO_ACTION_FUNCTION
38
diff --git a/keyboards/sofle/rev1/info.json b/keyboards/sofle/rev1/info.json
new file mode 100644
index 000000000..0a495dd3b
--- /dev/null
+++ b/keyboards/sofle/rev1/info.json
@@ -0,0 +1,19 @@
1{
2 "keyboard_name": "Sofle",
3 "url": "https://github.com/josefadamcik/SofleKeyboard",
4 "maintainer": "Josef Adamcik <josef.adamcik@gmail.com>",
5 "width": 16.5,
6 "height": 5.25,
7 "layouts": {
8 "LAYOUT": {
9 "key_count": 60,
10 "layout": [
11 {"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5},
12 {"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5},
13 {"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5},
14 {"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5},
15 {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.125}, {"x":14, "y":4.375}
16 ]
17 }
18 }
19}
diff --git a/keyboards/sofle/rev1/rev1.c b/keyboards/sofle/rev1/rev1.c
new file mode 100644
index 000000000..bbb014c4d
--- /dev/null
+++ b/keyboards/sofle/rev1/rev1.c
@@ -0,0 +1 @@
#include "sofle.h"
diff --git a/keyboards/sofle/rev1/rev1.h b/keyboards/sofle/rev1/rev1.h
new file mode 100644
index 000000000..86924e4d2
--- /dev/null
+++ b/keyboards/sofle/rev1/rev1.h
@@ -0,0 +1,37 @@
1#pragma once
2#include "quantum.h"
3
4#define LAYOUT( \
5 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
6 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
7 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
8 L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \
9 L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \
10 ) \
11 { \
12 { L00, L01, L02, L03, L04, L05 }, \
13 { L10, L11, L12, L13, L14, L15 }, \
14 { L20, L21, L22, L23, L24, L25 }, \
15 { L30, L31, L32, L33, L34, L35 }, \
16 { L40, L41, L42, L43, L44, L45 }, \
17 { R05, R04, R03, R02, R01, R00 }, \
18 { R15, R14, R13, R12, R11, R10 }, \
19 { R25, R24, R23, R22, R21, R20 }, \
20 { R35, R34, R33, R32, R31, R30 }, \
21 { R45, R44, R43, R42, R41, R40 } \
22 }
23
24#define LAYOUT_kc( \
25 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
26 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
27 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
28 L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \
29 L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \
30 ) \
31 LAYOUT( \
32 KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
33 KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
34 KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
35 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L45, KC_##R40, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 , \
36 KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
37)
diff --git a/keyboards/sofle/rev1/rules.mk b/keyboards/sofle/rev1/rules.mk
new file mode 100644
index 000000000..2ba231d86
--- /dev/null
+++ b/keyboards/sofle/rev1/rules.mk
@@ -0,0 +1,2 @@
1ENCODER_ENABLE = yes
2OLED_DRIVER_ENABLE = yes
diff --git a/keyboards/sofle/rules.mk b/keyboards/sofle/rules.mk
new file mode 100644
index 000000000..820061832
--- /dev/null
+++ b/keyboards/sofle/rules.mk
@@ -0,0 +1,4 @@
1MCU = atmega32u4
2BOOTLOADER = caterina
3SPLIT_KEYBOARD = yes
4DEFAULT_FOLDER = sofle/rev1
diff --git a/keyboards/sofle/sofle.c b/keyboards/sofle/sofle.c
new file mode 100644
index 000000000..9d61b0e58
--- /dev/null
+++ b/keyboards/sofle/sofle.c
@@ -0,0 +1,5 @@
1#include "sofle.h"
2
3bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
4 return process_record_user(keycode, record);
5}
diff --git a/keyboards/sofle/sofle.h b/keyboards/sofle/sofle.h
new file mode 100644
index 000000000..67bd529a1
--- /dev/null
+++ b/keyboards/sofle/sofle.h
@@ -0,0 +1,5 @@
1#pragma once
2
3#ifdef KEYBOARD_sofle_rev1
4 #include "rev1.h"
5#endif