diff options
author | marksard <38324387+marksard@users.noreply.github.com> | 2020-09-04 19:31:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 03:31:36 -0700 |
commit | 6a79d99ea2d4c72200953b35d51bb9b9d784a54b (patch) | |
tree | f57fac0467325428232b5a30f3c81aaaf7f26f28 | |
parent | 2e4a75e2bcfc275ba4e5cc8dde6a6761296ede5b (diff) | |
download | qmk_firmware-6a79d99ea2d4c72200953b35d51bb9b9d784a54b.tar.gz qmk_firmware-6a79d99ea2d4c72200953b35d51bb9b9d784a54b.zip |
[Keyboard] add leftover30 by marksard (#10140)
* Keyboard: add treeadstone48
* rename layout defines
* Use of pragma once
* move common include code
* fixed info.json
* change keymap layout from kc to normal
* fix alpha revision keymap
* fixed info.json
* remove USE_Link_Time_Optimization
* Add keyboard leftover30
* update keymap
* Update keyboards/marksard/leftover30/config.h
I guess I was mistaken. Thank you.
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/leftover30.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* Update keyboards/marksard/leftover30/keymaps/default/keymap.c
* changed user led custom method
* Update keyboards/marksard/leftover30/config.h
* Update keyboards/marksard/leftover30/config.h
* Update keyboards/marksard/leftover30/keymaps/default/rules.mk
* Update keyboards/marksard/leftover30/rules.mk
* Update from other review
* Update keyboards/marksard/leftover30/readme.md
* fixed kanji key procedure
* Update keyboards/marksard/leftover30/config.h
* Update keyboards/marksard/leftover30/config.h
* Update keyboards/marksard/leftover30/config.h
* fixed by review
-rw-r--r-- | keyboards/marksard/leftover30/config.h | 138 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/info.json | 198 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/keymaps/default/config.h | 24 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/keymaps/default/keymap.c | 162 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/keymaps/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/leftover30.c | 37 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/leftover30.h | 45 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/readme.md | 17 | ||||
-rw-r--r-- | keyboards/marksard/leftover30/rules.mk | 22 |
10 files changed, 645 insertions, 0 deletions
diff --git a/keyboards/marksard/leftover30/config.h b/keyboards/marksard/leftover30/config.h new file mode 100644 index 000000000..42c6c6287 --- /dev/null +++ b/keyboards/marksard/leftover30/config.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | Copyright 2020 marksard | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0xFEED | ||
24 | #define PRODUCT_ID 0xDFA8 | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER marksard | ||
27 | #define PRODUCT leftover30 | ||
28 | |||
29 | /* Encoder */ | ||
30 | #define ENCODERS_PAD_A { F4 } | ||
31 | #define ENCODERS_PAD_B { F5 } | ||
32 | // #define ENCODER_DIRECTION_FLIP | ||
33 | |||
34 | /* key matrix size */ | ||
35 | #define MATRIX_ROWS 8 | ||
36 | #define MATRIX_COLS 5 | ||
37 | |||
38 | /* | ||
39 | * Keyboard Matrix Assignments | ||
40 | * | ||
41 | * Change this to how you wired your keyboard | ||
42 | * COLS: AVR pins used for columns, left to right | ||
43 | * ROWS: AVR pins used for rows, top to bottom | ||
44 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
45 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
46 | * | ||
47 | */ | ||
48 | #define MATRIX_ROW_PINS { B6, B2, F7, F6, B3, B1, D4, D0 } | ||
49 | #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } | ||
50 | #define UNUSED_PINS | ||
51 | |||
52 | /* COL2ROW, ROW2COL*/ | ||
53 | #define DIODE_DIRECTION COL2ROW | ||
54 | |||
55 | #define RGB_DI_PIN D3 | ||
56 | #ifdef RGB_DI_PIN | ||
57 | #define RGBLED_NUM 6 | ||
58 | #define RGBLIGHT_HUE_STEP 8 | ||
59 | #define RGBLIGHT_SAT_STEP 8 | ||
60 | #define RGBLIGHT_VAL_STEP 8 | ||
61 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
62 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
63 | /*== all animations enable ==*/ | ||
64 | #define RGBLIGHT_ANIMATIONS | ||
65 | /*== or choose animations ==*/ | ||
66 | // #define RGBLIGHT_EFFECT_BREATHING | ||
67 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
68 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
69 | // #define RGBLIGHT_EFFECT_SNAKE | ||
70 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
71 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
72 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
73 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
74 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
75 | /*== customize breathing effect ==*/ | ||
76 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
77 | #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
78 | /*==== use exp() and sin() ====*/ | ||
79 | #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
80 | #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
81 | #endif | ||
82 | |||
83 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
84 | #define DEBOUNCE 5 | ||
85 | |||
86 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
87 | //#define MATRIX_HAS_GHOST | ||
88 | |||
89 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
90 | #define LOCKING_SUPPORT_ENABLE | ||
91 | /* Locking resynchronize hack */ | ||
92 | #define LOCKING_RESYNC_ENABLE | ||
93 | |||
94 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
95 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
96 | */ | ||
97 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
98 | |||
99 | /* | ||
100 | * Force NKRO | ||
101 | * | ||
102 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
103 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
104 | * makefile for this to work.) | ||
105 | * | ||
106 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
107 | * until the next keyboard reset. | ||
108 | * | ||
109 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
110 | * fully operational during normal computer usage. | ||
111 | * | ||
112 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
113 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
114 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
115 | * power-up. | ||
116 | * | ||
117 | */ | ||
118 | //#define FORCE_NKRO | ||
119 | |||
120 | /* | ||
121 | * Feature disable options | ||
122 | * These options are also useful to firmware size reduction. | ||
123 | */ | ||
124 | |||
125 | /* disable debug print */ | ||
126 | //#define NO_DEBUG | ||
127 | |||
128 | /* disable print */ | ||
129 | //#define NO_PRINT | ||
130 | |||
131 | /* disable action features */ | ||
132 | //#define NO_ACTION_LAYER | ||
133 | //#define NO_ACTION_TAPPING | ||
134 | //#define NO_ACTION_ONESHOT | ||
135 | |||
136 | /* disable these deprecated features by default */ | ||
137 | #define NO_ACTION_MACRO | ||
138 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/marksard/leftover30/info.json b/keyboards/marksard/leftover30/info.json new file mode 100644 index 000000000..700d08d9d --- /dev/null +++ b/keyboards/marksard/leftover30/info.json | |||
@@ -0,0 +1,198 @@ | |||
1 | { | ||
2 | "keyboard_name": "Leftover30", | ||
3 | "url": "https://github.com/marksard/Keyboards", | ||
4 | "maintainer": "marksard", | ||
5 | "width": 11.5, | ||
6 | "height": 4, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | { | ||
11 | "label": "Q", | ||
12 | "x": 0.5, | ||
13 | "y": 0 | ||
14 | }, | ||
15 | { | ||
16 | "label": "W", | ||
17 | "x": 1.5, | ||
18 | "y": 0 | ||
19 | }, | ||
20 | { | ||
21 | "label": "E", | ||
22 | "x": 2.5, | ||
23 | "y": 0 | ||
24 | }, | ||
25 | { | ||
26 | "label": "R", | ||
27 | "x": 3.5, | ||
28 | "y": 0 | ||
29 | }, | ||
30 | { | ||
31 | "label": "T", | ||
32 | "x": 4.5, | ||
33 | "y": 0 | ||
34 | }, | ||
35 | { | ||
36 | "label": "Y", | ||
37 | "x": 5.5, | ||
38 | "y": 0 | ||
39 | }, | ||
40 | { | ||
41 | "label": "U", | ||
42 | "x": 6.5, | ||
43 | "y": 0 | ||
44 | }, | ||
45 | { | ||
46 | "label": "I", | ||
47 | "x": 7.5, | ||
48 | "y": 0 | ||
49 | }, | ||
50 | { | ||
51 | "label": "O", | ||
52 | "x": 8.5, | ||
53 | "y": 0 | ||
54 | }, | ||
55 | { | ||
56 | "label": "P", | ||
57 | "x": 9.5, | ||
58 | "y": 0 | ||
59 | }, | ||
60 | { | ||
61 | "label": "BS", | ||
62 | "x": 10.5, | ||
63 | "y": 0 | ||
64 | }, | ||
65 | { | ||
66 | "label": "A", | ||
67 | "x": 0.75, | ||
68 | "y": 1 | ||
69 | }, | ||
70 | { | ||
71 | "label": "S", | ||
72 | "x": 1.75, | ||
73 | "y": 1 | ||
74 | }, | ||
75 | { | ||
76 | "label": "D", | ||
77 | "x": 2.75, | ||
78 | "y": 1 | ||
79 | }, | ||
80 | { | ||
81 | "label": "F", | ||
82 | "x": 3.75, | ||
83 | "y": 1 | ||
84 | }, | ||
85 | { | ||
86 | "label": "G", | ||
87 | "x": 4.75, | ||
88 | "y": 1 | ||
89 | }, | ||
90 | { | ||
91 | "label": "H", | ||
92 | "x": 5.75, | ||
93 | "y": 1 | ||
94 | }, | ||
95 | { | ||
96 | "label": "J", | ||
97 | "x": 6.75, | ||
98 | "y": 1 | ||
99 | }, | ||
100 | { | ||
101 | "label": "K", | ||
102 | "x": 7.75, | ||
103 | "y": 1 | ||
104 | }, | ||
105 | { | ||
106 | "label": "L", | ||
107 | "x": 8.75, | ||
108 | "y": 1 | ||
109 | }, | ||
110 | { | ||
111 | "label": "Enter", | ||
112 | "x": 9.75, | ||
113 | "y": 1, | ||
114 | "w": 1.75 | ||
115 | }, | ||
116 | { | ||
117 | "label": "Z", | ||
118 | "x": 1.25, | ||
119 | "y": 2 | ||
120 | }, | ||
121 | { | ||
122 | "label": "X", | ||
123 | "x": 2.25, | ||
124 | "y": 2 | ||
125 | }, | ||
126 | { | ||
127 | "label": "C", | ||
128 | "x": 3.25, | ||
129 | "y": 2 | ||
130 | }, | ||
131 | { | ||
132 | "label": "V", | ||
133 | "x": 4.25, | ||
134 | "y": 2 | ||
135 | }, | ||
136 | { | ||
137 | "label": "B", | ||
138 | "x": 5.25, | ||
139 | "y": 2 | ||
140 | }, | ||
141 | { | ||
142 | "label": "N", | ||
143 | "x": 6.25, | ||
144 | "y": 2 | ||
145 | }, | ||
146 | { | ||
147 | "label": "M", | ||
148 | "x": 7.25, | ||
149 | "y": 2 | ||
150 | }, | ||
151 | { | ||
152 | "label": "<", | ||
153 | "x": 8.25, | ||
154 | "y": 2 | ||
155 | }, | ||
156 | { | ||
157 | "label": ">", | ||
158 | "x": 9.25, | ||
159 | "y": 2 | ||
160 | }, | ||
161 | { | ||
162 | "label": "?", | ||
163 | "x": 10.25, | ||
164 | "y": 2, | ||
165 | "w": 1.25 | ||
166 | }, | ||
167 | { | ||
168 | "label": "", | ||
169 | "x": 0, | ||
170 | "y": 3 | ||
171 | }, | ||
172 | { | ||
173 | "label": "Alt", | ||
174 | "x": 1.5, | ||
175 | "y": 3, | ||
176 | "w": 1.25 | ||
177 | }, | ||
178 | { | ||
179 | "label": "", | ||
180 | "x": 2.75, | ||
181 | "y": 3, | ||
182 | "w": 6.25 | ||
183 | }, | ||
184 | { | ||
185 | "label": "Fn1", | ||
186 | "x": 9, | ||
187 | "y": 3 | ||
188 | }, | ||
189 | { | ||
190 | "label": "Ctrl", | ||
191 | "x": 10, | ||
192 | "y": 3, | ||
193 | "w": 1.5 | ||
194 | } | ||
195 | ] | ||
196 | } | ||
197 | } | ||
198 | } | ||
diff --git a/keyboards/marksard/leftover30/keymaps/default/config.h b/keyboards/marksard/leftover30/keymaps/default/config.h new file mode 100644 index 000000000..8bffbbb3b --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/config.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* Copyright 2020 marksard | ||
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 | // place overrides here | ||
20 | #define TAPPING_TERM 200 | ||
21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
22 | |||
23 | #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term | ||
24 | #define TAPPING_TERM_PER_KEY | ||
diff --git a/keyboards/marksard/leftover30/keymaps/default/keymap.c b/keyboards/marksard/leftover30/keymaps/default/keymap.c new file mode 100644 index 000000000..60751cd1c --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/keymap.c | |||
@@ -0,0 +1,162 @@ | |||
1 | /* Copyright 2020 marksard | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | enum layer_number { | ||
19 | _BASE, | ||
20 | _LOWER, | ||
21 | _RAISE, | ||
22 | _ADJUST, | ||
23 | }; | ||
24 | |||
25 | enum custom_keycodes { | ||
26 | RGBRST = SAFE_RANGE, | ||
27 | LOWER, | ||
28 | RAISE, | ||
29 | KANJI, | ||
30 | }; | ||
31 | |||
32 | // #define KC_ESAD LT(_ADJUST, KC_ESC) | ||
33 | // #define KC_BSLO LT(_LOWER, KC_BSPC) | ||
34 | #define KC_LOWR MO(_LOWER) | ||
35 | #define KC_SPRA LT(_RAISE, KC_SPC) | ||
36 | #define KC_AJST MO(_ADJUST) | ||
37 | |||
38 | #define KC_Q_AL LALT_T(KC_Q) | ||
39 | #define KC_A_CT LCTL_T(KC_A) | ||
40 | #define KC_Z_SF LSFT_T(KC_Z) | ||
41 | #define KC_X_AL LALT_T(KC_X) | ||
42 | #define KC_ENSF RSFT_T(KC_ENT) | ||
43 | #define KC_SLSF RSFT_T(KC_SLSH) | ||
44 | |||
45 | #define KC_F1AL LALT_T(KC_F1) | ||
46 | #define KC_F6CT LCTL_T(KC_F6) | ||
47 | #define KC_11SF LSFT_T(KC_F11) | ||
48 | #define KC_12AL LALT_T(KC_F12) | ||
49 | #define KC_QUSF RCTL_T(KC_QUOT) | ||
50 | #define KC_ROSF RSFT_T(KC_RO) | ||
51 | |||
52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
53 | [_BASE] = LAYOUT_all( | ||
54 | //,-----------------------------------------------------------------------------------------------------------. | ||
55 | KC_Q_AL, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
56 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
57 | KC_A_CT, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, | ||
58 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
59 | KC_Z_SF, KC_X_AL, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSF, | ||
60 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
61 | KC_LCTL, KC_LGUI, KC_SPRA, KC_LOWR, KC_RCTL | ||
62 | //`-----------------------------------------------------------------------------------------------------------' | ||
63 | ), | ||
64 | |||
65 | [_LOWER] = LAYOUT_all( | ||
66 | //,-----------------------------------------------------------------------------------------------------------. | ||
67 | KC_F1AL, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_BSLS, | ||
68 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
69 | KC_F6CT, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUSF, | ||
70 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
71 | KC_11SF, KC_12AL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, KC_RO, KC_SLSH, KC_ROSF, | ||
72 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
73 | _______, _______, KC_AJST, _______, _______ | ||
74 | //`-----------------------------------------------------------------------------------------------------------' | ||
75 | ), | ||
76 | |||
77 | [_RAISE] = LAYOUT_all( | ||
78 | //,-----------------------------------------------------------------------------------------------------------. | ||
79 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | ||
80 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
81 | KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, | ||
82 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
83 | KC_LSFT, XXXXXXX, KC_ESC, KC_TAB, KANJI, KC_DEL, KC_COMM, KC_DOT, KC_BSLS, KC_ROSF, | ||
84 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
85 | _______, _______, _______, KC_AJST, _______ | ||
86 | //`-----------------------------------------------------------------------------------------------------------' | ||
87 | ), | ||
88 | |||
89 | [_ADJUST] = LAYOUT_all( | ||
90 | //,-----------------------------------------------------------------------------------------------------------. | ||
91 | RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, KC_PSCR, | ||
92 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
93 | RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NLCK, | ||
94 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
95 | RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, KC_CAPS, | ||
96 | //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| | ||
97 | _______, _______, _______, _______, KC_CAPS | ||
98 | //`-----------------------------------------------------------------------------------------------------------' | ||
99 | ) | ||
100 | }; | ||
101 | |||
102 | uint16_t get_tapping_term(uint16_t keycode) { | ||
103 | switch (keycode) { | ||
104 | case KC_SPRA: | ||
105 | return TAPPING_LAYER_TERM; | ||
106 | default: | ||
107 | return TAPPING_TERM; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
112 | |||
113 | bool result = false; | ||
114 | switch (keycode) { | ||
115 | case KANJI: | ||
116 | if (record->event.pressed) { | ||
117 | register_code16(keymap_config.swap_lalt_lgui ? A(KC_GRV) : KC_LANG2); | ||
118 | } else { | ||
119 | unregister_code16(keymap_config.swap_lalt_lgui ? A(KC_GRV) : KC_LANG2); | ||
120 | } | ||
121 | break; | ||
122 | #ifdef RGBLIGHT_ENABLE | ||
123 | case RGBRST: | ||
124 | if (record->event.pressed) { | ||
125 | eeconfig_update_rgblight_default(); | ||
126 | rgblight_enable(); | ||
127 | } | ||
128 | break; | ||
129 | #endif | ||
130 | default: | ||
131 | result = true; | ||
132 | break; | ||
133 | } | ||
134 | |||
135 | return result; | ||
136 | } | ||
137 | |||
138 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
139 | if (index == 0) { | ||
140 | if (IS_LAYER_ON(_ADJUST)) { | ||
141 | if (clockwise) { | ||
142 | rgblight_increase_hue_noeeprom(); | ||
143 | } else { | ||
144 | rgblight_decrease_hue_noeeprom(); | ||
145 | } | ||
146 | } else if (IS_LAYER_ON(_LOWER)) { | ||
147 | tap_code16((clockwise == true) ? LCTL(KC_Y) : LCTL(KC_Z)); | ||
148 | } else if (IS_LAYER_ON(_RAISE)) { | ||
149 | tap_code16((clockwise == true) ? S(KC_DOWN) : S(KC_UP)); | ||
150 | } else { | ||
151 | tap_code((clockwise == true) ? KC_WH_D : KC_WH_U); | ||
152 | } | ||
153 | |||
154 | } | ||
155 | } | ||
156 | |||
157 | // for exsample customize of LED inducator | ||
158 | // bool led_update_user(led_t led_state) { | ||
159 | // writePin(D2, IS_LAYER_ON(_LOWER)); | ||
160 | // writePin(D1, IS_LAYER_ON(_RAISE)); | ||
161 | // return false; | ||
162 | // } | ||
diff --git a/keyboards/marksard/leftover30/keymaps/default/readme.md b/keyboards/marksard/leftover30/keymaps/default/readme.md new file mode 100644 index 000000000..05dcdc3d1 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/readme.md | |||
@@ -0,0 +1 @@ | |||
# The default keymap for leftover30 | |||
diff --git a/keyboards/marksard/leftover30/keymaps/default/rules.mk b/keyboards/marksard/leftover30/keymaps/default/rules.mk new file mode 100644 index 000000000..5af1ba853 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/rules.mk | |||
@@ -0,0 +1 @@ | |||
ENCODER_ENABLE = yes | |||
diff --git a/keyboards/marksard/leftover30/leftover30.c b/keyboards/marksard/leftover30/leftover30.c new file mode 100644 index 000000000..df8152144 --- /dev/null +++ b/keyboards/marksard/leftover30/leftover30.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* Copyright 2020 marksard | ||
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 "leftover30.h" | ||
18 | |||
19 | // Optional override functions below. | ||
20 | // You can leave any or all of these undefined. | ||
21 | // These are only required if you want to perform custom actions. | ||
22 | |||
23 | void keyboard_pre_init_user(void) { | ||
24 | /* Set CAPSLOCK indicator pin as output */ | ||
25 | setPinOutput(D1); | ||
26 | /* Set NUMLOCK indicator pin as output */ | ||
27 | setPinOutput(D2); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | bool res = led_update_user(led_state); | ||
32 | if(res) { | ||
33 | writePin(D2, led_state.num_lock); | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | } | ||
36 | return res; | ||
37 | } | ||
diff --git a/keyboards/marksard/leftover30/leftover30.h b/keyboards/marksard/leftover30/leftover30.h new file mode 100644 index 000000000..901b9b570 --- /dev/null +++ b/keyboards/marksard/leftover30/leftover30.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* Copyright 2020 marksard | ||
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 | /* This is a shortcut to help you visually see your layout. | ||
22 | * | ||
23 | * The first section contains all of the arguments representing the physical | ||
24 | * layout of the board and position of the keys. | ||
25 | * | ||
26 | * The second converts the arguments into a two-dimensional array which | ||
27 | * represents the switch matrix. | ||
28 | */ | ||
29 | #define LAYOUT_all( \ | ||
30 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a,\ | ||
31 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\ | ||
32 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\ | ||
33 | k30, k31, k32, k33, k34\ | ||
34 | ) \ | ||
35 | { \ | ||
36 | { k09, k08, k07, k06, k05 }, \ | ||
37 | { k19, k18, k17, k16, k15 }, \ | ||
38 | { k29, k28, k27, k26, k25 }, \ | ||
39 | { k0a, k34, k33, k32, k31 }, \ | ||
40 | \ | ||
41 | { k04, k03, k02, k01, k00 }, \ | ||
42 | { k14, k13, k12, k11, k10 }, \ | ||
43 | { k24, k23, k22, k21, k20 }, \ | ||
44 | { KC_NO, KC_NO, KC_NO, KC_NO, k30 } \ | ||
45 | } | ||
diff --git a/keyboards/marksard/leftover30/readme.md b/keyboards/marksard/leftover30/readme.md new file mode 100644 index 000000000..6fefb057f --- /dev/null +++ b/keyboards/marksard/leftover30/readme.md | |||
@@ -0,0 +1,17 @@ | |||
1 | # leftover30 | ||
2 | |||
3 |  | ||
4 | |||
5 | A 30% mini keyboard. | ||
6 | |||
7 | * Keyboard Maintainer: [marksard](https://github.com/marksard) | ||
8 | * Hardware Supported: LEFTOVER30 PCB (with Pro Micro) | ||
9 | * Hardware Availability: [Mark's Garage](https://marksard.booth.pm/) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make marksard/leftover30:default | ||
14 | |||
15 | 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. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
16 | |||
17 | [Build guide](https://github.com/marksard/Keyboards/blob/master/leftover30/documents/leftover30_buildguide.md) | ||
diff --git a/keyboards/marksard/leftover30/rules.mk b/keyboards/marksard/leftover30/rules.mk new file mode 100644 index 000000000..dd52fe113 --- /dev/null +++ b/keyboards/marksard/leftover30/rules.mk | |||
@@ -0,0 +1,22 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = caterina | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
22 | AUDIO_ENABLE = no # Audio output | ||