Skip to content

Commit 77a2641

Browse files
SmollChungusdrashnafauxpark
authored andcommitted
[Keyboard] add Lefty keyboard (qmk#14898)
Co-authored-by: Drashna Jaelre <[email protected]> Co-authored-by: Ryan <[email protected]>
1 parent 9614b0f commit 77a2641

File tree

13 files changed

+429
-0
lines changed

13 files changed

+429
-0
lines changed

keyboards/lefty/config.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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+
#include "config_common.h"
20+
21+
/* USB Device descriptor parameter */
22+
#define VENDOR_ID 0x5363 // Sc for Smollchungus
23+
#define PRODUCT_ID 0x0001
24+
#define DEVICE_VER 0x0001
25+
#define MANUFACTURER SmollChungus
26+
#define PRODUCT Lefty
27+
28+
/* key matrix size */
29+
#define MATRIX_ROWS 5
30+
#define MATRIX_COLS 8
31+
32+
/* key matrix pins are in subfolders v1/v2 */
33+
34+
/* Diode direction */
35+
#define DIODE_DIRECTION COL2ROW
36+
37+
/* Set 0 if debouncing isn't needed */
38+
#define DEBOUNCE 5
39+
40+
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
41+
#define LOCKING_SUPPORT_ENABLE
42+
43+
/* Locking resynchronize hack */
44+
#define LOCKING_RESYNC_ENABLE

keyboards/lefty/info.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"keyboard_name": "lefty",
3+
"url": "https://github.com/smollchungus",
4+
"maintainer": "smollchungus",
5+
"layouts": {
6+
"LAYOUT_all": {
7+
"layout": [
8+
{"label":"F1", "x":0.5, "y":0},
9+
{"label":"Escape", "x":2, "y":0},
10+
{"label":"1", "x":3, "y":0},
11+
{"label":"2", "x":4, "y":0},
12+
{"label":"3", "x":5, "y":0},
13+
{"label":"4", "x":6, "y":0},
14+
{"label":"5", "x":7, "y":0},
15+
{"label":"6", "x":8, "y":0},
16+
{"label":"F2", "x":0.25, "y":1},
17+
{"label":"Tab", "x":1.75, "y":1, "w":1.5},
18+
{"label":"Q", "x":3.25, "y":1},
19+
{"label":"W", "x":4.25, "y":1},
20+
{"label":"E", "x":5.25, "y":1},
21+
{"label":"R", "x":6.25, "y":1},
22+
{"label":"T", "x":7.25, "y":1},
23+
{"label":"F3", "x":0, "y":2},
24+
{"label":"Caps Lock", "x":1.5, "y":2, "w":1.75},
25+
{"label":"A", "x":3.25, "y":2},
26+
{"label":"S", "x":4.25, "y":2},
27+
{"label":"D", "x":5.25, "y":2},
28+
{"label":"F", "x":6.25, "y":2},
29+
{"label":"G", "x":7.25, "y":2},
30+
{"label":"Shift", "x":1.25, "y":3, "w":2.25},
31+
{"label":"Z", "x":3.5, "y":3},
32+
{"label":"X", "x":4.5, "y":3},
33+
{"label":"C", "x":5.5, "y":3},
34+
{"label":"V", "x":6.5, "y":3},
35+
{"label":"B", "x":7.5, "y":3},
36+
{"label":"Control", "x":1.25, "y":4, "w":1.25},
37+
{"label":"Alt", "x":4.5, "y":4, "w":1.25},
38+
{"label":"Layer2", "x":5.75, "y":4, "w":2},
39+
{"label":"Layer3", "x":7.75, "y":4, "w":1.25}
40+
]
41+
}
42+
}
43+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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+
19+
enum layers {
20+
_QWERTY,
21+
_LOWER,
22+
_RAISE,
23+
_SPECIAL,
24+
};
25+
26+
#define LOWER MO(_LOWER)
27+
#define RAISE MO(_RAISE)
28+
#define SPECIAL MO(_SPECIAL)
29+
30+
31+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32+
33+
[_QWERTY] = LAYOUT_all(
34+
KC_UP, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
35+
KC_DOWN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
36+
KC_RGHT, LOWER, KC_A, KC_S, KC_D, KC_F, KC_G,
37+
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
38+
KC_LCTL, KC_LALT, RAISE, SPECIAL
39+
),
40+
41+
[_LOWER] = LAYOUT_all(
42+
____, ____, ____, ____, ____, ____, ____, ____,
43+
____, ____, ____, ____, ____, ____, ____,
44+
____, ____, ____, ____, ____, ____, ____,
45+
____, ____, ____, ____, ____, ____,
46+
____, ____, ____, ____
47+
),
48+
49+
[_RAISE] = LAYOUT_all(
50+
____, ____, ____, ____, ____, ____, ____, ____,
51+
____, ____, ____, ____, ____, ____, ____,
52+
____, ____, ____, ____, ____, ____, ____,
53+
____, ____, ____, ____, ____, ____,
54+
____, ____, ____, ____
55+
),
56+
57+
[_SPECIAL] = LAYOUT_all(
58+
____, ____, ____, ____, ____, ____, ____, ____,
59+
____, ____, ____, ____, ____, ____, ____,
60+
____, ____, ____, ____, ____, ____, ____,
61+
____, ____, ____, ____, ____, ____,
62+
____, ____, ____, ____
63+
)
64+
};
65+

keyboards/lefty/keymaps/via/keymap.c

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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+
19+
20+
enum layers {
21+
_QWERTY,
22+
_LOWER,
23+
_RAISE,
24+
_SPECIAL,
25+
};
26+
27+
#define LOWER MO(_LOWER)
28+
#define RAISE MO(_RAISE)
29+
#define SPECIAL MO(_SPECIAL)
30+
31+
32+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33+
34+
[_QWERTY] = LAYOUT_all(
35+
KC_UP, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
36+
KC_DOWN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
37+
KC_RGHT, LOWER, KC_A, KC_S, KC_D, KC_F, KC_G,
38+
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
39+
KC_LCTL, KC_LALT, RAISE, SPECIAL
40+
),
41+
42+
[_LOWER] = LAYOUT_all(
43+
____, ____, ____, ____, ____, ____, ____, ____,
44+
____, ____, ____, ____, ____, ____, ____,
45+
____, ____, ____, ____, ____, ____, ____,
46+
____, ____, ____, ____, ____, ____,
47+
____, ____, ____, ____
48+
),
49+
50+
[_RAISE] = LAYOUT_all(
51+
____, ____, ____, ____, ____, ____, ____, ____,
52+
____, ____, ____, ____, ____, ____, ____,
53+
____, ____, ____, ____, ____, ____, ____,
54+
____, ____, ____, ____, ____, ____,
55+
____, ____, ____, ____
56+
),
57+
58+
[_SPECIAL] = LAYOUT_all(
59+
____, ____, ____, ____, ____, ____, ____, ____,
60+
____, ____, ____, ____, ____, ____, ____,
61+
____, ____, ____, ____, ____, ____, ____,
62+
____, ____, ____, ____, ____, ____,
63+
____, ____, ____, ____
64+
)
65+
};

keyboards/lefty/keymaps/via/rules.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VIA_ENABLE = yes

keyboards/lefty/lefty.c

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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 "lefty.h"
18+
19+
#ifdef OLED_ENABLE
20+
__attribute__((weak)) void oled_task_user(void) {
21+
// Host Keyboard Layer Status
22+
oled_write_P(PSTR("Layer: "), false);
23+
24+
switch (get_highest_layer(layer_state)) {
25+
case 0:
26+
oled_write_P(PSTR("Default\n"), false);
27+
break;
28+
case 1:
29+
oled_write_P(PSTR("LOWER\n"), false);
30+
break;
31+
case 2:
32+
oled_write_P(PSTR("RAISE\n"), false);
33+
break;
34+
case 3:
35+
oled_write_P(PSTR("SPECIAL\n"), false);
36+
break;
37+
default:
38+
// Or use the write_ln shortcut over adding '\n' to the end of your string
39+
oled_write_ln_P(PSTR("Undefined"), false);
40+
}
41+
42+
}
43+
#endif

keyboards/lefty/lefty.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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+
#include "quantum.h"
20+
21+
// keymap
22+
#define LAYOUT_all( \
23+
K00, K01, K02, K03, K04, K05, K06, K07, \
24+
K10, K11, K12, K13, K14, K15, K16, \
25+
K20, K21, K22, K23, K24, K25, K26, \
26+
K31, K32, K33, K34, K35, K36, \
27+
K41, K43, K44, K46 \
28+
) \
29+
{ \
30+
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
31+
{ K10, K11, K12, K13, K14, K15, K16, KC_NO }, \
32+
{ K20, K21, K22, K23, K24, K25, K26, KC_NO }, \
33+
{ KC_NO, K31, K32, K33, K34, K35, K36, KC_NO }, \
34+
{ KC_NO, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO } \
35+
}
36+
37+
#define LAYOUT LAYOUT

keyboards/lefty/readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# lefty
2+
3+
![lefty](https://i.imgur.com/nMmJCJMh.jpeg)
4+
5+
Half an alice used as a macropad.
6+
7+
* Keyboard Maintainer: [SmollChungus](https://github.com/smollchungus/)
8+
9+
* Hardware Supported: Lefty PCB rev1 and rev2
10+
11+
Make example for this keyboard (after setting up your build environment):
12+
13+
make lefty:default
14+
15+
Flashing example for this keyboard:
16+
17+
make lefty:default:flash
18+
19+
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
20+
Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
21+
22+
# Bootloader
23+
Enter the bootloader in 3 ways:
24+
25+
Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
26+
Physical reset button: Briefly press the button on the back of the PCB - some may have pads you must short instead
27+
Keycode in layout: Press the key mapped to RESET if it is available

keyboards/lefty/rev1/config.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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+
/* key matrix pins */
20+
21+
#define MATRIX_ROW_PINS { F0, F1, C7, D5, B7 }
22+
#define MATRIX_COL_PINS { D4, B5, F5, F6, F7, B1, B3, F4 }

keyboards/lefty/rev1/rev1.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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 "lefty.h"

keyboards/lefty/rev2/config.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Copyright 2021 Smoll Chungus (@smollchungus)
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+
/* key matrix pins */
20+
#define MATRIX_ROW_PINS { B2, B6, D7, E6, B4 }
21+
#define MATRIX_COL_PINS { D4, B5, F5, F6, F7, B1, B3, F4 }

0 commit comments

Comments
 (0)