diff options
author | QMK Bot <hello@qmk.fm> | 2021-07-20 17:47:04 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-07-20 17:47:04 +0000 |
commit | 32a44b6a2c8f1f49f78cea8635b9358e1d1eb0b8 (patch) | |
tree | 2cfbb4190eb32767a404efbacb60c571012bd468 | |
parent | 362bbe53c77da05446bf4f81bfb616e11500bd34 (diff) | |
parent | 3591312fa3d41cf18bc873a974698af3a59afcca (diff) | |
download | qmk_firmware-32a44b6a2c8f1f49f78cea8635b9358e1d1eb0b8.tar.gz qmk_firmware-32a44b6a2c8f1f49f78cea8635b9358e1d1eb0b8.zip |
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r-- | keyboards/massdrop/alt/keymaps/ewersp/README.md | 14 | ||||
-rw-r--r-- | keyboards/massdrop/alt/keymaps/ewersp/keymap.c | 134 | ||||
-rw-r--r-- | keyboards/momoka_ergo/config.h | 131 | ||||
-rw-r--r-- | keyboards/momoka_ergo/info.json | 82 | ||||
-rw-r--r-- | keyboards/momoka_ergo/keymaps/default/keymap.c | 55 | ||||
-rw-r--r-- | keyboards/momoka_ergo/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/momoka_ergo/momoka_ergo.c | 17 | ||||
-rw-r--r-- | keyboards/momoka_ergo/momoka_ergo.h | 53 | ||||
-rw-r--r-- | keyboards/momoka_ergo/readme.md | 29 | ||||
-rw-r--r-- | keyboards/momoka_ergo/rules.mk | 23 |
10 files changed, 488 insertions, 51 deletions
diff --git a/keyboards/massdrop/alt/keymaps/ewersp/README.md b/keyboards/massdrop/alt/keymaps/ewersp/README.md index d2e691a9e..8a19bb6c1 100644 --- a/keyboards/massdrop/alt/keymaps/ewersp/README.md +++ b/keyboards/massdrop/alt/keymaps/ewersp/README.md | |||
@@ -6,11 +6,13 @@ This keymap is very similar to the default keymap for the Drop ALT, but it overl | |||
6 | 6 | ||
7 | ### For example: | 7 | ### For example: |
8 | ``` | 8 | ``` |
9 | LeftAlt + 1...N -> F1...FN | 9 | LeftAlt + 1...N -> F1...FN |
10 | LeftAlt + L/R Arrows -> Home/End | 10 | LeftAlt + L/R Arrows -> Home/End |
11 | LeftAlt + Home -> End | 11 | LeftAlt + Home -> End |
12 | LeftAlt + Backspace -> Delete | 12 | LeftAlt + Backspace -> Delete |
13 | LeftAlt + Esc -> Backtick (`) | 13 | LeftAlt + Esc -> Backtick (`) |
14 | LeftAlt + Shift + Esc -> Tilde (~) | ||
15 | LeftAlt + LeftShift + 4 -> Alt+F4 | ||
14 | ``` | 16 | ``` |
15 | 17 | ||
16 | The novel part of this keymap is that it **preserves the default functionality** of the left alt key, so ```'alt + tab', 'ctrl + alt + del', 'alt + f4'```, etc. all work as expected without using any janky timers. | 18 | The novel part of this keymap is that it **preserves the default functionality** of the left alt key, so ```'alt + tab', 'ctrl + alt + del', 'alt + f4'```, etc. all work as expected without using any janky timers. |
@@ -23,8 +25,6 @@ And finally, the original alt key functionality can be toggled at any time by pr | |||
23 | 25 | ||
24 | This keymap was based on the 'default' Drop ALT keymap (and _not_ 'default_md') which means it supports all the fancy QMK RGB patterns, and isn't limited to the stock options that come with the board. | 26 | This keymap was based on the 'default' Drop ALT keymap (and _not_ 'default_md') which means it supports all the fancy QMK RGB patterns, and isn't limited to the stock options that come with the board. |
25 | 27 | ||
26 | It's also worth noting that this keymap fixes an outstanding issue where the caps lock LED flickers when the RGB mode is keylight or underglow. I could not find a general purpose fix, but the one included here works quite well. | ||
27 | |||
28 | If you have any questions, feel free to reach out to me at: ewersp [at] gmail [dot] com. | 28 | If you have any questions, feel free to reach out to me at: ewersp [at] gmail [dot] com. |
29 | 29 | ||
30 | Enjoy! **<3** | 30 | Enjoy! **<3** |
diff --git a/keyboards/massdrop/alt/keymaps/ewersp/keymap.c b/keyboards/massdrop/alt/keymaps/ewersp/keymap.c index 483ea3cfb..d4f05b9f3 100644 --- a/keyboards/massdrop/alt/keymaps/ewersp/keymap.c +++ b/keyboards/massdrop/alt/keymaps/ewersp/keymap.c | |||
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
38 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, | 38 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, |
39 | _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, | 39 | _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, |
40 | _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, | 40 | _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, |
41 | _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, TG(ALT), _______, _______, KC_PGUP, KC_VOLD, | 41 | _______, RGB_TOG, _______, _______, EEP_RST, MD_BOOT, NK_TOGG, DBG_TOG, _______, TG(ALT), _______, _______, KC_PGUP, KC_VOLD, |
42 | _______, _______, KC_LALT, _______, _______, _______, KC_HOME, KC_PGDN, KC_END | 42 | _______, _______, KC_LALT, _______, _______, _______, KC_HOME, KC_PGDN, KC_END |
43 | ), | 43 | ), |
44 | [SUPR] = LAYOUT_65_ansi_blocker( | 44 | [SUPR] = LAYOUT_65_ansi_blocker( |
@@ -50,34 +50,56 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
50 | ) | 50 | ) |
51 | }; | 51 | }; |
52 | 52 | ||
53 | // If the super alt layer is the active layer | 53 | // EEPROM storage mode |
54 | bool super_alt_layer_active = false; | 54 | enum alt_rgb_mode { |
55 | RGB_MODE_ALL, | ||
56 | RGB_MODE_KEYLIGHT, | ||
57 | RGB_MODE_UNDERGLOW, | ||
58 | RGB_MODE_NONE, | ||
59 | }; | ||
55 | 60 | ||
56 | // If we need to unregister alt when leaving the super alt layer | 61 | // EEPROM storage type |
57 | bool need_to_unregister_alt = false; | 62 | typedef union { |
63 | uint32_t raw; | ||
64 | struct { | ||
65 | uint8_t rgb_mode :8; | ||
66 | }; | ||
67 | } alt_config_t; | ||
68 | |||
69 | alt_config_t alt_config; | ||
70 | |||
71 | // Read from EEPROM on init to load the last saved mode | ||
72 | void keyboard_post_init_kb(void) { | ||
73 | alt_config.raw = eeconfig_read_user(); | ||
74 | switch (alt_config.rgb_mode) { | ||
75 | case RGB_MODE_ALL: | ||
76 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
77 | rgb_matrix_enable_noeeprom(); | ||
78 | break; | ||
79 | case RGB_MODE_KEYLIGHT: | ||
80 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | ||
81 | rgb_matrix_set_color_all(0, 0, 0); | ||
82 | break; | ||
83 | case RGB_MODE_UNDERGLOW: | ||
84 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
85 | rgb_matrix_set_color_all(0, 0, 0); | ||
86 | break; | ||
87 | case RGB_MODE_NONE: | ||
88 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
89 | rgb_matrix_disable_noeeprom(); | ||
90 | break; | ||
91 | } | ||
92 | } | ||
58 | 93 | ||
59 | #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) | 94 | #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) |
60 | #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) | 95 | #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) |
61 | #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) | 96 | #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) |
62 | 97 | ||
63 | // Taken from 'g_led_config' in config_led.c | 98 | // If the super alt layer is the active layer |
64 | #define CAPS_LOCK_LED_ID 30 | 99 | bool super_alt_layer_active = false; |
65 | |||
66 | // This runs every matrix scan (every 'frame') | ||
67 | void rgb_matrix_indicators_user(void) { | ||
68 | led_flags_t flags = rgb_matrix_get_flags(); | ||
69 | |||
70 | // If we're in either keylight or underglow modes (but not both simultaneously) | ||
71 | if (HAS_FLAGS(flags, LED_FLAG_KEYLIGHT) != HAS_FLAGS(flags, LED_FLAG_UNDERGLOW)) { | ||
72 | 100 | ||
73 | // This fixes a bug where the caps lock LED flickers when toggled in either keylight or underglow modes | 101 | // If we need to unregister alt when leaving the super alt layer |
74 | if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { | 102 | bool need_to_unregister_alt = false; |
75 | rgb_matrix_set_color(CAPS_LOCK_LED_ID, RGB_WHITE); | ||
76 | } else { | ||
77 | rgb_matrix_set_color(CAPS_LOCK_LED_ID, 0, 0, 0); | ||
78 | } | ||
79 | } | ||
80 | } | ||
81 | 103 | ||
82 | // This runs code every time that the layers get changed | 104 | // This runs code every time that the layers get changed |
83 | layer_state_t layer_state_set_user(layer_state_t state) { | 105 | layer_state_t layer_state_set_user(layer_state_t state) { |
@@ -118,6 +140,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
118 | } | 140 | } |
119 | // We still want to process the keycode normally | 141 | // We still want to process the keycode normally |
120 | return true; | 142 | return true; |
143 | case KC_F4: | ||
144 | // Map alt+shift+4 to alt+f4 | ||
145 | if (super_alt_layer_active && (get_mods() & MOD_BIT(KC_LSHIFT))) { | ||
146 | if (record->event.pressed) { | ||
147 | register_code(KC_LALT); | ||
148 | } else { | ||
149 | unregister_code(KC_LALT); | ||
150 | } | ||
151 | } | ||
152 | return true; | ||
121 | case ALT_DEL: | 153 | case ALT_DEL: |
122 | if (record->event.pressed) { | 154 | if (record->event.pressed) { |
123 | register_code(KC_DEL); | 155 | register_code(KC_DEL); |
@@ -164,30 +196,44 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
164 | } | 196 | } |
165 | } | 197 | } |
166 | return false; | 198 | return false; |
199 | case EEP_RST: | ||
200 | if (record->event.pressed) { | ||
201 | key_timer = timer_read32(); | ||
202 | } else { | ||
203 | if (timer_elapsed32(key_timer) >= 500) { | ||
204 | eeconfig_init(); | ||
205 | } | ||
206 | } | ||
207 | return false; | ||
167 | case RGB_TOG: | 208 | case RGB_TOG: |
168 | if (record->event.pressed) { | 209 | if (record->event.pressed) { |
169 | switch (rgb_matrix_get_flags()) { | 210 | switch (rgb_matrix_get_flags()) { |
170 | case LED_FLAG_ALL: { | 211 | case LED_FLAG_ALL: { |
171 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | 212 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); |
172 | rgb_matrix_set_color_all(0, 0, 0); | 213 | rgb_matrix_set_color_all(0, 0, 0); |
173 | } | 214 | alt_config.rgb_mode = RGB_MODE_KEYLIGHT; |
174 | break; | 215 | break; |
175 | case LED_FLAG_KEYLIGHT: { | 216 | } |
176 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | 217 | case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { |
177 | rgb_matrix_set_color_all(0, 0, 0); | 218 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); |
178 | } | 219 | rgb_matrix_set_color_all(0, 0, 0); |
179 | break; | 220 | alt_config.rgb_mode = RGB_MODE_UNDERGLOW; |
180 | case LED_FLAG_UNDERGLOW: { | 221 | break; |
181 | rgb_matrix_set_flags(LED_FLAG_NONE); | 222 | } |
182 | rgb_matrix_disable_noeeprom(); | 223 | case LED_FLAG_UNDERGLOW: { |
183 | } | 224 | rgb_matrix_set_flags(LED_FLAG_NONE); |
184 | break; | 225 | rgb_matrix_disable_noeeprom(); |
185 | default: { | 226 | alt_config.rgb_mode = RGB_MODE_NONE; |
186 | rgb_matrix_set_flags(LED_FLAG_ALL); | 227 | break; |
187 | rgb_matrix_enable_noeeprom(); | 228 | } |
188 | } | 229 | default: { |
189 | break; | 230 | rgb_matrix_set_flags(LED_FLAG_ALL); |
190 | } | 231 | rgb_matrix_enable_noeeprom(); |
232 | alt_config.rgb_mode = RGB_MODE_ALL; | ||
233 | break; | ||
234 | } | ||
235 | } | ||
236 | eeconfig_update_user(alt_config.raw); | ||
191 | } | 237 | } |
192 | return false; | 238 | return false; |
193 | default: | 239 | default: |
diff --git a/keyboards/momoka_ergo/config.h b/keyboards/momoka_ergo/config.h new file mode 100644 index 000000000..3c22e3fc8 --- /dev/null +++ b/keyboards/momoka_ergo/config.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | Copyright 2021 StefanGrindelwald | ||
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 0x0000 | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER StefanGrindelwald | ||
27 | #define PRODUCT Momoka Ergo | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 14 | ||
31 | #define MATRIX_COLS 6 | ||
32 | |||
33 | /* | ||
34 | * Keyboard Matrix Assignments | ||
35 | * | ||
36 | * Change this to how you wired your keyboard | ||
37 | * COLS: AVR pins used for columns, left to right | ||
38 | * ROWS: AVR pins used for rows, top to bottom | ||
39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
41 | * | ||
42 | */ | ||
43 | #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5, B6, B7 } | ||
44 | #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 } | ||
45 | #define UNUSED_PINS | ||
46 | |||
47 | /* COL2ROW, ROW2COL */ | ||
48 | #define DIODE_DIRECTION COL2ROW | ||
49 | #define SELECT_SOFT_SERIAL_SPEED 5 | ||
50 | /* | ||
51 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
52 | */ | ||
53 | #define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6 | ||
54 | |||
55 | #define RGB_DI_PIN C7 | ||
56 | #define RGBLIGHT_ANIMATIONS | ||
57 | #define RGBLED_NUM 22 | ||
58 | #define RGBLED_SPLIT { 11, 11 } | ||
59 | #define RGBLIGHT_HUE_STEP 8 | ||
60 | #define RGBLIGHT_SAT_STEP 8 | ||
61 | #define RGBLIGHT_VAL_STEP 8 | ||
62 | |||
63 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
64 | #define DEBOUNCE 3 | ||
65 | |||
66 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
67 | //#define MATRIX_HAS_GHOST | ||
68 | |||
69 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
70 | #define LOCKING_SUPPORT_ENABLE | ||
71 | /* Locking resynchronize hack */ | ||
72 | #define LOCKING_RESYNC_ENABLE | ||
73 | |||
74 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
75 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
76 | */ | ||
77 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
78 | |||
79 | /* | ||
80 | * Force NKRO | ||
81 | * | ||
82 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
83 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
84 | * makefile for this to work.) | ||
85 | * | ||
86 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
87 | * until the next keyboard reset. | ||
88 | * | ||
89 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
90 | * fully operational during normal computer usage. | ||
91 | * | ||
92 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
93 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
94 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
95 | * power-up. | ||
96 | * | ||
97 | */ | ||
98 | //#define FORCE_NKRO | ||
99 | |||
100 | /* | ||
101 | * Feature disable options | ||
102 | * These options are also useful to firmware size reduction. | ||
103 | */ | ||
104 | |||
105 | /* disable debug print */ | ||
106 | //#define NO_DEBUG | ||
107 | |||
108 | /* disable print */ | ||
109 | //#define NO_PRINT | ||
110 | |||
111 | /* disable action features */ | ||
112 | //#define NO_ACTION_LAYER | ||
113 | //#define NO_ACTION_TAPPING | ||
114 | //#define NO_ACTION_ONESHOT | ||
115 | |||
116 | /* disable these deprecated features by default */ | ||
117 | #define NO_ACTION_MACRO | ||
118 | #define NO_ACTION_FUNCTION | ||
119 | |||
120 | /* Bootmagic Lite key configuration */ | ||
121 | //#define BOOTMAGIC_LITE_ROW 0 | ||
122 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
123 | #define BOOTMAGIC_KEY_SALT KC_RSFT||KC_LSFT | ||
124 | #define BOOTMAGIC_KEY_SKIP KC_ESC | ||
125 | #define BOOTMAGIC_KEY_EEPROM_CLEAR KC_NO | ||
126 | #define OOTMAGIC_KEY_BOOTLOADER KC_RCTL||KC_LCTL | ||
127 | #define BOOTMAGIC_KEY_EE_HANDS_LEFT KC_T | ||
128 | #define BOOTMAGIC_KEY_EE_HANDS_RIGHT KC_Y | ||
129 | #define USE_SERIAL | ||
130 | #define SPLIT_USB_DETECT | ||
131 | #define EE_HANDS | ||
diff --git a/keyboards/momoka_ergo/info.json b/keyboards/momoka_ergo/info.json new file mode 100644 index 000000000..ecbae947b --- /dev/null +++ b/keyboards/momoka_ergo/info.json | |||
@@ -0,0 +1,82 @@ | |||
1 | { | ||
2 | "keyboard_name": "MOMOKA_ERGO", | ||
3 | "url": "", | ||
4 | "maintainer": "StefanGrindelwald", | ||
5 | "width": 19.5, | ||
6 | "height": 9.375, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | {"label":"L02", "x":3.5, "y":0}, | ||
11 | {"label":"R03", "x":15, "y":0}, | ||
12 | {"label":"L03", "x":2.5, "y":0.125}, | ||
13 | {"label":"L01", "x":4.5, "y":0.125}, | ||
14 | {"label":"R04", "x":14, "y":0.125}, | ||
15 | {"label":"R02", "x":16, "y":0.125}, | ||
16 | {"label":"L00", "x":5.5, "y":0.25}, | ||
17 | {"label":"R05", "x":13, "y":0.25}, | ||
18 | {"label":"L05", "x":0, "y":0.375, "w":1.5}, | ||
19 | {"label":"L04", "x":1.5, "y":0.375}, | ||
20 | {"label":"R01", "x":17, "y":0.375}, | ||
21 | {"label":"R00", "x":18, "y":0.375, "w":1.5}, | ||
22 | {"label":"L12", "x":3.5, "y":1}, | ||
23 | {"label":"R13", "x":15, "y":1}, | ||
24 | {"label":"L13", "x":2.5, "y":1.125}, | ||
25 | {"label":"L11", "x":4.5, "y":1.125}, | ||
26 | {"label":"R14", "x":14, "y":1.125}, | ||
27 | {"label":"R12", "x":16, "y":1.125}, | ||
28 | {"label":"L10", "x":5.5, "y":1.25}, | ||
29 | {"label":"R15", "x":13, "y":1.25}, | ||
30 | {"label":"L15", "x":0, "y":1.375, "w":1.5}, | ||
31 | {"label":"L14", "x":1.5, "y":1.375}, | ||
32 | {"label":"R11", "x":17, "y":1.375}, | ||
33 | {"label":"R10", "x":18, "y":1.375, "w":1.5}, | ||
34 | {"label":"L22", "x":3.5, "y":2}, | ||
35 | {"label":"R23", "x":15, "y":2}, | ||
36 | {"label":"L23", "x":2.5, "y":2.125}, | ||
37 | {"label":"L21", "x":4.5, "y":2.125}, | ||
38 | {"label":"R24", "x":14, "y":2.125}, | ||
39 | {"label":"R22", "x":16, "y":2.125}, | ||
40 | {"label":"L20", "x":5.5, "y":2.25}, | ||
41 | {"label":"R25", "x":13, "y":2.25}, | ||
42 | {"label":"L25", "x":0, "y":2.375, "w":1.5}, | ||
43 | {"label":"L24", "x":1.5, "y":2.375}, | ||
44 | {"label":"R21", "x":17, "y":2.375}, | ||
45 | {"label":"R20", "x":18, "y":2.375, "w":1.5}, | ||
46 | {"label":"L32", "x":3.5, "y":3}, | ||
47 | {"label":"R33", "x":15, "y":3}, | ||
48 | {"label":"L33", "x":2.5, "y":3.125}, | ||
49 | {"label":"L31", "x":4.5, "y":3.125}, | ||
50 | {"label":"R34", "x":14, "y":3.125}, | ||
51 | {"label":"R32", "x":16, "y":3.125}, | ||
52 | {"label":"L30", "x":5.5, "y":3.25}, | ||
53 | {"label":"R35", "x":13, "y":3.25}, | ||
54 | {"label":"L35", "x":0, "y":3.375, "w":1.5}, | ||
55 | {"label":"L34", "x":1.5, "y":3.375}, | ||
56 | {"label":"R31", "x":17, "y":3.375}, | ||
57 | {"label":"R30", "x":18, "y":3.375, "w":1.5}, | ||
58 | {"label":"L42", "x":3.5, "y":4}, | ||
59 | {"label":"R43", "x":15, "y":4}, | ||
60 | {"label":"L43", "x":2.5, "y":4.125}, | ||
61 | {"label":"L41", "x":4.5, "y":4.125}, | ||
62 | {"label":"R44", "x":14, "y":4.125}, | ||
63 | {"label":"R42", "x":16, "y":4.125}, | ||
64 | {"label":"L45", "x":0.5, "y":4.375}, | ||
65 | {"label":"L44", "x":1.5, "y":4.375}, | ||
66 | {"label":"R41", "x":17, "y":4.375}, | ||
67 | {"label":"R40", "x":18, "y":4.375}, | ||
68 | {"label":"L51", "x":1, "y":4.375}, | ||
69 | {"label":"L40", "x":2, "y":4.375}, | ||
70 | {"label":"L52", "x":0, "y":5.375, "h":2}, | ||
71 | {"label":"L61", "x":1, "y":5.375, "h":2}, | ||
72 | {"label":"L50", "x":2, "y":5.375}, | ||
73 | {"label":"L60", "x":2, "y":6.375}, | ||
74 | {"label":"R45", "x":-3.0, "y":6.375}, | ||
75 | {"label":"R54", "x":-2, "y":6.375}, | ||
76 | {"label":"R55", "x":-3.0, "y":7.375}, | ||
77 | {"label":"R64", "x":-2, "y":7.375, "h":2}, | ||
78 | {"label":"R53", "x":-1.0, "y":7.375, "h":2}, | ||
79 | {"label":"R65", "x":-3.0, "y":8.375}] | ||
80 | } | ||
81 | } | ||
82 | } | ||
diff --git a/keyboards/momoka_ergo/keymaps/default/keymap.c b/keyboards/momoka_ergo/keymaps/default/keymap.c new file mode 100644 index 000000000..ca1131ba2 --- /dev/null +++ b/keyboards/momoka_ergo/keymaps/default/keymap.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* Copyright 2021 StefanGrindelwald | ||
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 | // Defines names for use in layer keycodes and the keymap | ||
19 | enum layer_names { | ||
20 | _BASE, | ||
21 | _FN1, | ||
22 | _FN2 | ||
23 | }; | ||
24 | |||
25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
26 | /* Base */ | ||
27 | [_BASE] = LAYOUT( | ||
28 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | ||
29 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
30 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
31 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
32 | MO(_FN1), KC_GRV, KC_EQL, KC_LEFT, KC_RGHT, KC_LALT, KC_RGUI, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MO(_FN1), | ||
33 | KC_BSPC, KC_LCTL, KC_HOME, KC_PGUP, KC_RCTL, KC_SPC, | ||
34 | KC_DEL, KC_END, KC_PGDN, KC_ENT | ||
35 | ), | ||
36 | [_FN1] = LAYOUT( | ||
37 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
38 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
39 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
40 | MO(_FN2), _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, RGB_TOG, MO(_FN2), | ||
41 | _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, RGB_VAD, RGB_SAI, RGB_SAD, _______, | ||
42 | _______, _______, _______, RGB_HUI, _______, _______, | ||
43 | _______, _______, RGB_HUD, _______ | ||
44 | ), | ||
45 | [_FN2] = LAYOUT( | ||
46 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
47 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
48 | _______, _______, _______, RESET, _______, _______, _______, _______, RESET, _______, _______, _______, | ||
49 | _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, RGB_TOG, _______, | ||
50 | _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, RGB_VAD, RGB_SAI, RGB_SAD, _______, | ||
51 | _______, _______, _______, RGB_HUI, _______, _______, | ||
52 | _______, _______, RGB_HUD, _______ | ||
53 | ) | ||
54 | |||
55 | }; | ||
diff --git a/keyboards/momoka_ergo/keymaps/default/readme.md b/keyboards/momoka_ergo/keymaps/default/readme.md new file mode 100644 index 000000000..390149d6b --- /dev/null +++ b/keyboards/momoka_ergo/keymaps/default/readme.md | |||
@@ -0,0 +1 @@ | |||
# The default keymap for momoka_ergo | |||
diff --git a/keyboards/momoka_ergo/momoka_ergo.c b/keyboards/momoka_ergo/momoka_ergo.c new file mode 100644 index 000000000..8069d7f51 --- /dev/null +++ b/keyboards/momoka_ergo/momoka_ergo.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2021 StefanGrindelwald | ||
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 "momoka_ergo.h" | ||
diff --git a/keyboards/momoka_ergo/momoka_ergo.h b/keyboards/momoka_ergo/momoka_ergo.h new file mode 100644 index 000000000..93faad449 --- /dev/null +++ b/keyboards/momoka_ergo/momoka_ergo.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* Copyright 2021 StefanGrindelwald | ||
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( \ | ||
30 | L05, L04, L03, L02, L01, L00, R05, R04, R03, R02, R01, R00, \ | ||
31 | L15, L14, L13, L12, L11, L10, R15, R14, R13, R12, R11, R10, \ | ||
32 | L25, L24, L23, L22, L21, L20, R25, R24, R23, R22, R21, R20, \ | ||
33 | L35, L34, L33, L32, L31, L30, R35, R34, R33, R32, R31, R30, \ | ||
34 | L45, L44, L43, L42, L41, L40, R45, R44, R43, R42, R41, R40, \ | ||
35 | L52, L51, L50, R55, R54, R53, \ | ||
36 | L61, L60, R65, R64 \ | ||
37 | ) \ | ||
38 | { \ | ||
39 | { L00, L01, L02, L03, L04, L05 }, \ | ||
40 | { L10, L11, L12, L13, L14, L15 }, \ | ||
41 | { L20, L21, L22, L23, L24, L25 }, \ | ||
42 | { L30, L31, L32, L33, L34, L35 }, \ | ||
43 | { L40, L41, L42, L43, L44, L45 },\ | ||
44 | { L50, L51, L52, KC_NO,KC_NO,KC_NO },\ | ||
45 | { L60, L61,KC_NO,KC_NO,KC_NO,KC_NO },\ | ||
46 | { R05, R04, R03, R02, R01, R00 }, \ | ||
47 | { R15, R14, R13, R12, R11, R10 }, \ | ||
48 | { R25, R24, R23, R22, R21, R20 }, \ | ||
49 | { R35, R34, R33, R32, R31, R30 }, \ | ||
50 | { R45, R44, R43, R42, R41, R40 },\ | ||
51 | { R55, R54, R53, KC_NO, KC_NO, KC_NO }, \ | ||
52 | { R65, R64, KC_NO, KC_NO, KC_NO, KC_NO } \ | ||
53 | } | ||
diff --git a/keyboards/momoka_ergo/readme.md b/keyboards/momoka_ergo/readme.md new file mode 100644 index 000000000..d0a289aba --- /dev/null +++ b/keyboards/momoka_ergo/readme.md | |||
@@ -0,0 +1,29 @@ | |||
1 | # momoka_ergo | ||
2 | |||
3 |  | ||
4 | |||
5 | The MOMOKA Ergo is a split keyboard that is based on the Ergodox standard layout. It has 35 keys and 11 RGB backlights on each part. The two parts of the keyboard is connected by a TRRS cable. | ||
6 | |||
7 | * Keyboard Maintainer: [StefanGrindelwald](https://github.com/StefanGrindelwald) | ||
8 | * Hardware Supported: momoka.co/ergo | ||
9 | * Hardware Availability: momoka.co/ergo | ||
10 | |||
11 | Bootloader: | ||
12 | |||
13 | With the default keymap, you can easily use FN+Shift+D to enter the bootloader in left side and FN+shift+K in right side. Or you can just use the microswitch in the PCB. | ||
14 | |||
15 | Make example for this keyboard (after setting up your build environment): | ||
16 | |||
17 | make momoka_ergo:default | ||
18 | |||
19 | Flashing example for this keyboard(Note that you need flash the both side keyboard respectively): | ||
20 | |||
21 | For the left side: | ||
22 | |||
23 | make momoka_ergo:default:dfu-split-left | ||
24 | |||
25 | For the right side: | ||
26 | |||
27 | make momoka_ergo:default:dfu-split-right | ||
28 | |||
29 | 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). | ||
diff --git a/keyboards/momoka_ergo/rules.mk b/keyboards/momoka_ergo/rules.mk new file mode 100644 index 000000000..402f5b199 --- /dev/null +++ b/keyboards/momoka_ergo/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration | ||
11 | MOUSEKEY_ENABLE = no # 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 | ||
23 | SPLIT_KEYBOARD = yes | ||