diff options
| -rw-r--r-- | keyboards/wanten/config.h | 161 | ||||
| -rw-r--r-- | keyboards/wanten/info.json | 152 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/2u_bars/config.h | 27 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/2u_bars/keymap.c | 104 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/2u_bars/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/625_bar/config.h | 27 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/625_bar/keymap.c | 104 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/625_bar/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/default/config.h | 27 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/default/keymap.c | 104 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/wanten/keymaps/default/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/wanten/readme.md | 27 | ||||
| -rw-r--r-- | keyboards/wanten/rules.mk | 22 | ||||
| -rw-r--r-- | keyboards/wanten/wanten.c | 17 | ||||
| -rw-r--r-- | keyboards/wanten/wanten.h | 65 |
16 files changed, 841 insertions, 0 deletions
diff --git a/keyboards/wanten/config.h b/keyboards/wanten/config.h new file mode 100644 index 000000000..ed6294f73 --- /dev/null +++ b/keyboards/wanten/config.h | |||
| @@ -0,0 +1,161 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 qpockets | ||
| 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 0x7170 //qp | ||
| 24 | #define PRODUCT_ID 0x7774 //wt | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER qpockets | ||
| 27 | #define PRODUCT wanten | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 4 | ||
| 31 | #define MATRIX_COLS 12 | ||
| 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 { F0, F7, B3, D5 } | ||
| 44 | #define MATRIX_COL_PINS { F4, F1, B5, B6, C6, C7, D4, E6, D2, B1, B2, D3 } | ||
| 45 | #define UNUSED_PINS | ||
| 46 | |||
| 47 | /* COL2ROW, ROW2COL */ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 50 | /* ROTARY ENCODERS */ | ||
| 51 | #define ENCODERS_PAD_A { F5, D6 } | ||
| 52 | #define ENCODERS_PAD_B { F6, D7 } | ||
| 53 | |||
| 54 | #define ENCODER_RESOLUTION 4 | ||
| 55 | //#define ENCODER_DIRECTION_FLIP | ||
| 56 | |||
| 57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 58 | #define DEBOUNCE 4 | ||
| 59 | |||
| 60 | /*nothing below here is needed for wanten unless enabling RGB. the correct RGB_DI_PIN is defined, the rest is up to you o7 */ | ||
| 61 | |||
| 62 | //#define RGB_DI_PIN B0 | ||
| 63 | //#ifdef RGB_DI_PIN | ||
| 64 | //# define RGBLED_NUM 16 | ||
| 65 | //# define RGBLIGHT_HUE_STEP 8 | ||
| 66 | //# define RGBLIGHT_SAT_STEP 8 | ||
| 67 | //# define RGBLIGHT_VAL_STEP 8 | ||
| 68 | //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 69 | //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 70 | /*== all animations enable ==*/ | ||
| 71 | //# define RGBLIGHT_ANIMATIONS | ||
| 72 | /*== or choose animations ==*/ | ||
| 73 | //# define RGBLIGHT_EFFECT_BREATHING | ||
| 74 | //# define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 75 | //# define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 76 | //# define RGBLIGHT_EFFECT_SNAKE | ||
| 77 | //# define RGBLIGHT_EFFECT_KNIGHT | ||
| 78 | //# define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 79 | //# define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 80 | //# define RGBLIGHT_EFFECT_RGB_TEST | ||
| 81 | //# define RGBLIGHT_EFFECT_ALTERNATING | ||
| 82 | /*== customize breathing effect ==*/ | ||
| 83 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 84 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 85 | /*==== use exp() and sin() ====*/ | ||
| 86 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 87 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 88 | //#endif | ||
| 89 | |||
| 90 | /* | ||
| 91 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
| 92 | */ | ||
| 93 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | ||
| 94 | |||
| 95 | //#define LED_NUM_LOCK_PIN B0 | ||
| 96 | //#define LED_CAPS_LOCK_PIN B1 | ||
| 97 | //#define LED_SCROLL_LOCK_PIN B2 | ||
| 98 | //#define LED_COMPOSE_PIN B3 | ||
| 99 | //#define LED_KANA_PIN B4 | ||
| 100 | |||
| 101 | //#define BACKLIGHT_PIN B7 | ||
| 102 | //#define BACKLIGHT_LEVELS 3 | ||
| 103 | //#define BACKLIGHT_BREATHING | ||
| 104 | |||
| 105 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 106 | //#define MATRIX_HAS_GHOST | ||
| 107 | |||
| 108 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 109 | //#define LOCKING_SUPPORT_ENABLE | ||
| 110 | /* Locking resynchronize hack */ | ||
| 111 | //#define LOCKING_RESYNC_ENABLE | ||
| 112 | |||
| 113 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 114 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 115 | */ | ||
| 116 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
| 117 | |||
| 118 | /* | ||
| 119 | * Force NKRO | ||
| 120 | * | ||
| 121 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 122 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 123 | * makefile for this to work.) | ||
| 124 | * | ||
| 125 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 126 | * until the next keyboard reset. | ||
| 127 | * | ||
| 128 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 129 | * fully operational during normal computer usage. | ||
| 130 | * | ||
| 131 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 132 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 133 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 134 | * power-up. | ||
| 135 | * | ||
| 136 | */ | ||
| 137 | //#define FORCE_NKRO | ||
| 138 | |||
| 139 | /* | ||
| 140 | * Feature disable options | ||
| 141 | * These options are also useful to firmware size reduction. | ||
| 142 | */ | ||
| 143 | |||
| 144 | /* disable debug print */ | ||
| 145 | //#define NO_DEBUG | ||
| 146 | |||
| 147 | /* disable print */ | ||
| 148 | //#define NO_PRINT | ||
| 149 | |||
| 150 | /* disable action features */ | ||
| 151 | //#define NO_ACTION_LAYER | ||
| 152 | //#define NO_ACTION_TAPPING | ||
| 153 | //#define NO_ACTION_ONESHOT | ||
| 154 | |||
| 155 | /* disable these deprecated features by default */ | ||
| 156 | #define NO_ACTION_MACRO | ||
| 157 | #define NO_ACTION_FUNCTION | ||
| 158 | |||
| 159 | /* Bootmagic Lite key configuration */ | ||
| 160 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 161 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/wanten/info.json b/keyboards/wanten/info.json new file mode 100644 index 000000000..e68376158 --- /dev/null +++ b/keyboards/wanten/info.json | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "wanten", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qpockets", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT_default": { | ||
| 7 | "layout": [ | ||
| 8 | {"label":"Play", "x":0, "y":0}, | ||
| 9 | {"label":"q", "x":1, "y":0}, | ||
| 10 | {"label":"w", "x":2, "y":0}, | ||
| 11 | {"label":"e", "x":3, "y":0}, | ||
| 12 | {"label":"r", "x":4, "y":0}, | ||
| 13 | {"label":"t", "x":5, "y":0}, | ||
| 14 | {"label":"Del", "x":6, "y":0, "w":1.75}, | ||
| 15 | {"label":"y", "x":7.75, "y":0}, | ||
| 16 | {"label":"u", "x":8.75, "y":0}, | ||
| 17 | {"label":"i", "x":9.75, "y":0}, | ||
| 18 | {"label":"o", "x":10.75, "y":0}, | ||
| 19 | {"label":"p", "x":11.75, "y":0}, | ||
| 20 | {"label":"Next", "x":0, "y":1}, | ||
| 21 | {"label":"a", "x":1, "y":1}, | ||
| 22 | {"label":"s", "x":2, "y":1}, | ||
| 23 | {"label":"d", "x":3, "y":1}, | ||
| 24 | {"label":"f", "x":4, "y":1}, | ||
| 25 | {"label":"g", "x":5, "y":1}, | ||
| 26 | {"label":"Tab", "x":6, "y":1, "w":1.75}, | ||
| 27 | {"label":"h", "x":7.75, "y":1}, | ||
| 28 | {"label":"j", "x":8.75, "y":1}, | ||
| 29 | {"label":"k", "x":9.75, "y":1}, | ||
| 30 | {"label":"l", "x":10.75, "y":1}, | ||
| 31 | {"label":"\"", "x":11.75, "y":1}, | ||
| 32 | {"label":"Prev", "x":0, "y":2}, | ||
| 33 | {"label":"z", "x":1, "y":2}, | ||
| 34 | {"label":"x", "x":2, "y":2}, | ||
| 35 | {"label":"c", "x":3, "y":2}, | ||
| 36 | {"label":"v", "x":4, "y":2}, | ||
| 37 | {"label":"b", "x":5, "y":2}, | ||
| 38 | {"label":"Shift", "x":6, "y":2, "w":1.75}, | ||
| 39 | {"label":"n", "x":7.75, "y":2}, | ||
| 40 | {"label":"m", "x":8.75, "y":2}, | ||
| 41 | {"label":"<", "x":9.75, "y":2}, | ||
| 42 | {"label":">", "x":10.75, "y":2}, | ||
| 43 | {"label":"?", "x":11.75, "y":2}, | ||
| 44 | {"label":"LCtrl", "x":0, "y":3, "w":1.25}, | ||
| 45 | {"label":"LGui", "x":1.25, "y":3, "w":1.25}, | ||
| 46 | {"label":"LAlt", "x":2.5, "y":3, "w":1.25}, | ||
| 47 | {"label":"Back", "x":3.75, "y":3, "w":3}, | ||
| 48 | {"label":"Space", "x":6.75, "y":3, "w":3}, | ||
| 49 | {"label":"RCtrl", "x":9.75, "y":3}, | ||
| 50 | {"label":"RGui", "x":10.75, "y":3}, | ||
| 51 | {"label":"RAlt", "x":11.75, "y":3} | ||
| 52 | ] | ||
| 53 | }, | ||
| 54 | |||
| 55 | "LAYOUT_2u_bars": { | ||
| 56 | "layout": [ | ||
| 57 | {"label":"Play", "x":0, "y":0}, | ||
| 58 | {"label":"q", "x":1, "y":0}, | ||
| 59 | {"label":"w", "x":2, "y":0}, | ||
| 60 | {"label":"e", "x":3, "y":0}, | ||
| 61 | {"label":"r", "x":4, "y":0}, | ||
| 62 | {"label":"t", "x":5, "y":0}, | ||
| 63 | {"label":"Del", "x":6, "y":0, "w":1.75}, | ||
| 64 | {"label":"y", "x":7.75, "y":0}, | ||
| 65 | {"label":"u", "x":8.75, "y":0}, | ||
| 66 | {"label":"i", "x":9.75, "y":0}, | ||
| 67 | {"label":"o", "x":10.75, "y":0}, | ||
| 68 | {"label":"p", "x":11.75, "y":0}, | ||
| 69 | {"label":"Next", "x":0, "y":1}, | ||
| 70 | {"label":"a", "x":1, "y":1}, | ||
| 71 | {"label":"s", "x":2, "y":1}, | ||
| 72 | {"label":"d", "x":3, "y":1}, | ||
| 73 | {"label":"f", "x":4, "y":1}, | ||
| 74 | {"label":"g", "x":5, "y":1}, | ||
| 75 | {"label":"Tab", "x":6, "y":1, "w":1.75}, | ||
| 76 | {"label":"h", "x":7.75, "y":1}, | ||
| 77 | {"label":"j", "x":8.75, "y":1}, | ||
| 78 | {"label":"k", "x":9.75, "y":1}, | ||
| 79 | {"label":"l", "x":10.75, "y":1}, | ||
| 80 | {"label":"\"", "x":11.75, "y":1}, | ||
| 81 | {"label":"Prev", "x":0, "y":2}, | ||
| 82 | {"label":"z", "x":1, "y":2}, | ||
| 83 | {"label":"x", "x":2, "y":2}, | ||
| 84 | {"label":"c", "x":3, "y":2}, | ||
| 85 | {"label":"v", "x":4, "y":2}, | ||
| 86 | {"label":"b", "x":5, "y":2}, | ||
| 87 | {"label":"Shift", "x":6, "y":2, "w":1.75}, | ||
| 88 | {"label":"n", "x":7.75, "y":2}, | ||
| 89 | {"label":"m", "x":8.75, "y":2}, | ||
| 90 | {"label":"<", "x":9.75, "y":2}, | ||
| 91 | {"label":">", "x":10.75, "y":2}, | ||
| 92 | {"label":"?", "x":11.75, "y":2}, | ||
| 93 | {"label":"PSCR", "x":0, "y":3, "w":1.25}, | ||
| 94 | {"label":"LAlt", "x":1.25, "y":3, "w":1.25}, | ||
| 95 | {"label":"LGui", "x":2.5, "y":3, "w":1.25}, | ||
| 96 | {"label":"LCtl", "x":3.75, "y":3}, | ||
| 97 | {"label":"Back", "x":4.75, "y":3, "w":2}, | ||
| 98 | {"label":"Space", "x":6.75, "y":3, "w":2.25}, | ||
| 99 | {"label":"RCtrl", "x":9, "y":3}, | ||
| 100 | {"label":"RGui", "x":10, "y":3, "w":1.25}, | ||
| 101 | {"label":"RAlt", "x":11.25, "y":3, "w":1.5} | ||
| 102 | ] | ||
| 103 | }, | ||
| 104 | |||
| 105 | "LAYOUT_625_bar": { | ||
| 106 | "layout": [ | ||
| 107 | {"label":"Play", "x":0, "y":0}, | ||
| 108 | {"label":"q", "x":1, "y":0}, | ||
| 109 | {"label":"w", "x":2, "y":0}, | ||
| 110 | {"label":"e", "x":3, "y":0}, | ||
| 111 | {"label":"r", "x":4, "y":0}, | ||
| 112 | {"label":"t", "x":5, "y":0}, | ||
| 113 | {"label":"Del", "x":6, "y":0, "w":1.75}, | ||
| 114 | {"label":"y", "x":7.75, "y":0}, | ||
| 115 | {"label":"u", "x":8.75, "y":0}, | ||
| 116 | {"label":"i", "x":9.75, "y":0}, | ||
| 117 | {"label":"o", "x":10.75, "y":0}, | ||
| 118 | {"label":"p", "x":11.75, "y":0}, | ||
| 119 | {"label":"Next", "x":0, "y":1}, | ||
| 120 | {"label":"a", "x":1, "y":1}, | ||
| 121 | {"label":"s", "x":2, "y":1}, | ||
| 122 | {"label":"d", "x":3, "y":1}, | ||
| 123 | {"label":"f", "x":4, "y":1}, | ||
| 124 | {"label":"g", "x":5, "y":1}, | ||
| 125 | {"label":"Tab", "x":6, "y":1, "w":1.75}, | ||
| 126 | {"label":"h", "x":7.75, "y":1}, | ||
| 127 | {"label":"j", "x":8.75, "y":1}, | ||
| 128 | {"label":"k", "x":9.75, "y":1}, | ||
| 129 | {"label":"l", "x":10.75, "y":1}, | ||
| 130 | {"label":"\"", "x":11.75, "y":1}, | ||
| 131 | {"label":"Prev", "x":0, "y":2}, | ||
| 132 | {"label":"z", "x":1, "y":2}, | ||
| 133 | {"label":"x", "x":2, "y":2}, | ||
| 134 | {"label":"c", "x":3, "y":2}, | ||
| 135 | {"label":"v", "x":4, "y":2}, | ||
| 136 | {"label":"b", "x":5, "y":2}, | ||
| 137 | {"label":"Shift", "x":6, "y":2, "w":1.75}, | ||
| 138 | {"label":"n", "x":7.75, "y":2}, | ||
| 139 | {"label":"m", "x":8.75, "y":2}, | ||
| 140 | {"label":"<", "x":9.75, "y":2}, | ||
| 141 | {"label":">", "x":10.75, "y":2}, | ||
| 142 | {"label":"?", "x":11.75, "y":2}, | ||
| 143 | {"label":"LAlt", "x":0, "y":3, "w":1.25}, | ||
| 144 | {"label":"LGui", "x":1.25, "y":3, "w":1.25}, | ||
| 145 | {"label":"LCtrl", "x":2.5, "y":3, "w":1.25}, | ||
| 146 | {"label":"Space", "x":3.75, "y":3, "w":6.25}, | ||
| 147 | {"label":"RAlt", "x":10, "y":3, "w":1.25}, | ||
| 148 | {"label":"RCtrl", "x":11.25, "y":3, "w":1.5} | ||
| 149 | ] | ||
| 150 | } | ||
| 151 | } | ||
| 152 | } \ No newline at end of file | ||
diff --git a/keyboards/wanten/keymaps/2u_bars/config.h b/keyboards/wanten/keymaps/2u_bars/config.h new file mode 100644 index 000000000..51e54382a --- /dev/null +++ b/keyboards/wanten/keymaps/2u_bars/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | /*Modtaps*/ | ||
| 20 | #define TAPPING_TERM 145 | ||
| 21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 22 | |||
| 23 | /*Combos*/ | ||
| 24 | #ifdef COMBO_ENABLE | ||
| 25 | # define COMBO_COUNT 5 | ||
| 26 | # define COMBO_TERM 25 | ||
| 27 | #endif | ||
diff --git a/keyboards/wanten/keymaps/2u_bars/keymap.c b/keyboards/wanten/keymaps/2u_bars/keymap.c new file mode 100644 index 000000000..5e2dd8aa0 --- /dev/null +++ b/keyboards/wanten/keymaps/2u_bars/keymap.c | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | _BASE, | ||
| 21 | _GAME, | ||
| 22 | _SYM, | ||
| 23 | _NAV | ||
| 24 | |||
| 25 | }; | ||
| 26 | |||
| 27 | enum combo_events { | ||
| 28 | COMBO_BSPC, | ||
| 29 | COMBO_ENT, | ||
| 30 | COMBO_TAB, | ||
| 31 | COMBO_ESC, | ||
| 32 | COMBO_DEL | ||
| 33 | }; | ||
| 34 | #define KC_DN_BSPC LT(_NAV, KC_BSPC) | ||
| 35 | #define KC_UP_SPC LT(_SYM, KC_SPC) | ||
| 36 | #define KC_GUP_BSPC LT(_SYM, KC_BSPC) | ||
| 37 | #define KC_SF LSFT_T(KC_F) | ||
| 38 | #define KC_SJ RSFT_T(KC_J) | ||
| 39 | #define SNIP S(G(KC_S)) | ||
| 40 | |||
| 41 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 42 | [_BASE] = LAYOUT_2u_bars( | ||
| 43 | KC_MPLY, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 44 | KC_MNXT, KC_A, KC_S, KC_D, KC_SF, KC_G, KC_RGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 45 | KC_MPRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 46 | SNIP, KC_LGUI, KC_LCTL, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, TG(_GAME), KC_MUTE | ||
| 47 | ), | ||
| 48 | |||
| 49 | [_GAME] = LAYOUT_2u_bars( | ||
| 50 | KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 51 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 52 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 53 | KC_LCTRL, KC_LGUI, KC_LALT, KC_ESC, KC_SPC, KC_GUP_BSPC, KC_RALT, KC_TRNS, KC_BSPC | ||
| 54 | ), | ||
| 55 | |||
| 56 | [_SYM] = LAYOUT_2u_bars( | ||
| 57 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 58 | KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
| 59 | KC_TRNS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, | ||
| 60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 61 | ), | ||
| 62 | |||
| 63 | [_NAV] = LAYOUT_2u_bars( | ||
| 64 | KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, | ||
| 65 | KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB, | ||
| 66 | KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, | ||
| 67 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 68 | ), | ||
| 69 | |||
| 70 | }; | ||
| 71 | |||
| 72 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 73 | if (index == 0) { /* left encoder */ | ||
| 74 | if (clockwise) { | ||
| 75 | tap_code(KC_VOLU); | ||
| 76 | } else { | ||
| 77 | tap_code(KC_VOLD); | ||
| 78 | } | ||
| 79 | } else if (index == 1) { /* center encoder */ | ||
| 80 | if (clockwise) { | ||
| 81 | tap_code(KC_WH_U); | ||
| 82 | } else { | ||
| 83 | tap_code(KC_WH_D); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | return true; | ||
| 87 | } | ||
| 88 | |||
| 89 | #ifdef COMBO_ENABLE | ||
| 90 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
| 91 | const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; | ||
| 92 | const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; | ||
| 93 | const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; | ||
| 94 | const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; | ||
| 95 | |||
| 96 | combo_t key_combos[COMBO_COUNT] = { | ||
| 97 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
| 98 | [COMBO_ENT] = COMBO(combo_ent,KC_ENT), | ||
| 99 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
| 100 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
| 101 | [COMBO_DEL] = COMBO(combo_del,KC_DEL) | ||
| 102 | }; | ||
| 103 | #endif | ||
| 104 | |||
diff --git a/keyboards/wanten/keymaps/2u_bars/rules.mk b/keyboards/wanten/keymaps/2u_bars/rules.mk new file mode 100644 index 000000000..ab1e43818 --- /dev/null +++ b/keyboards/wanten/keymaps/2u_bars/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| COMBO_ENABLE = yes | |||
diff --git a/keyboards/wanten/keymaps/625_bar/config.h b/keyboards/wanten/keymaps/625_bar/config.h new file mode 100644 index 000000000..51e54382a --- /dev/null +++ b/keyboards/wanten/keymaps/625_bar/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | /*Modtaps*/ | ||
| 20 | #define TAPPING_TERM 145 | ||
| 21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 22 | |||
| 23 | /*Combos*/ | ||
| 24 | #ifdef COMBO_ENABLE | ||
| 25 | # define COMBO_COUNT 5 | ||
| 26 | # define COMBO_TERM 25 | ||
| 27 | #endif | ||
diff --git a/keyboards/wanten/keymaps/625_bar/keymap.c b/keyboards/wanten/keymaps/625_bar/keymap.c new file mode 100644 index 000000000..b1cc213d1 --- /dev/null +++ b/keyboards/wanten/keymaps/625_bar/keymap.c | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | _BASE, | ||
| 21 | _GAME, | ||
| 22 | _SYM, | ||
| 23 | _NAV | ||
| 24 | |||
| 25 | }; | ||
| 26 | |||
| 27 | enum combo_events { | ||
| 28 | COMBO_BSPC, | ||
| 29 | COMBO_ENT, | ||
| 30 | COMBO_TAB, | ||
| 31 | COMBO_ESC, | ||
| 32 | COMBO_DEL | ||
| 33 | }; | ||
| 34 | #define KC_DZ LT(_NAV, KC_Z) | ||
| 35 | #define KC_UP_SPC LT(_SYM, KC_SPC) | ||
| 36 | //#define KC_GUP_BSPC LT(_SYM, KC_BSPC) | ||
| 37 | #define KC_SF LSFT_T(KC_F) | ||
| 38 | #define KC_SJ RSFT_T(KC_J) | ||
| 39 | #define SNIP S(G(KC_S)) | ||
| 40 | |||
| 41 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 42 | [_BASE] = LAYOUT_625_bar( | ||
| 43 | KC_MPLY, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 44 | KC_MNXT, KC_A, KC_S, KC_D, KC_SF, KC_G, KC_RGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 45 | KC_MPRV, KC_DZ, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 46 | SNIP, KC_LGUI, KC_LCTL, KC_UP_SPC, KC_RALT, TG(_GAME) | ||
| 47 | ), | ||
| 48 | |||
| 49 | [_GAME] = LAYOUT_625_bar( | ||
| 50 | KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 51 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 52 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 53 | KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_TRNS | ||
| 54 | ), | ||
| 55 | |||
| 56 | [_SYM] = LAYOUT_625_bar( | ||
| 57 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 58 | KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
| 59 | KC_TRNS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, | ||
| 60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 61 | ), | ||
| 62 | |||
| 63 | [_NAV] = LAYOUT_625_bar( | ||
| 64 | KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, | ||
| 65 | KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB, | ||
| 66 | KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, | ||
| 67 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 68 | ), | ||
| 69 | |||
| 70 | }; | ||
| 71 | |||
| 72 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 73 | if (index == 0) { /* left encoder */ | ||
| 74 | if (clockwise) { | ||
| 75 | tap_code(KC_VOLU); | ||
| 76 | } else { | ||
| 77 | tap_code(KC_VOLD); | ||
| 78 | } | ||
| 79 | } else if (index == 1) { /* center encoder */ | ||
| 80 | if (clockwise) { | ||
| 81 | tap_code(KC_WH_D); | ||
| 82 | } else { | ||
| 83 | tap_code(KC_WH_U); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | return true; | ||
| 87 | } | ||
| 88 | |||
| 89 | #ifdef COMBO_ENABLE | ||
| 90 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
| 91 | const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; | ||
| 92 | const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; | ||
| 93 | const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; | ||
| 94 | const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; | ||
| 95 | |||
| 96 | combo_t key_combos[COMBO_COUNT] = { | ||
| 97 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
| 98 | [COMBO_ENT] = COMBO(combo_ent,KC_ENT), | ||
| 99 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
| 100 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
| 101 | [COMBO_DEL] = COMBO(combo_del,KC_DEL) | ||
| 102 | }; | ||
| 103 | #endif | ||
| 104 | |||
diff --git a/keyboards/wanten/keymaps/625_bar/rules.mk b/keyboards/wanten/keymaps/625_bar/rules.mk new file mode 100644 index 000000000..ab1e43818 --- /dev/null +++ b/keyboards/wanten/keymaps/625_bar/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| COMBO_ENABLE = yes | |||
diff --git a/keyboards/wanten/keymaps/default/config.h b/keyboards/wanten/keymaps/default/config.h new file mode 100644 index 000000000..51e54382a --- /dev/null +++ b/keyboards/wanten/keymaps/default/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | /*Modtaps*/ | ||
| 20 | #define TAPPING_TERM 145 | ||
| 21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 22 | |||
| 23 | /*Combos*/ | ||
| 24 | #ifdef COMBO_ENABLE | ||
| 25 | # define COMBO_COUNT 5 | ||
| 26 | # define COMBO_TERM 25 | ||
| 27 | #endif | ||
diff --git a/keyboards/wanten/keymaps/default/keymap.c b/keyboards/wanten/keymaps/default/keymap.c new file mode 100644 index 000000000..f0cec2cc4 --- /dev/null +++ b/keyboards/wanten/keymaps/default/keymap.c | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | _BASE, | ||
| 21 | _GAME, | ||
| 22 | _SYM, | ||
| 23 | _NAV | ||
| 24 | |||
| 25 | }; | ||
| 26 | |||
| 27 | enum combo_events { | ||
| 28 | COMBO_BSPC, | ||
| 29 | COMBO_ENT, | ||
| 30 | COMBO_TAB, | ||
| 31 | COMBO_ESC, | ||
| 32 | COMBO_DEL | ||
| 33 | }; | ||
| 34 | #define KC_DN_BSPC LT(_NAV, KC_BSPC) | ||
| 35 | #define KC_UP_SPC LT(_SYM, KC_SPC) | ||
| 36 | #define KC_GUP_BSPC LT(_SYM, KC_BSPC) | ||
| 37 | #define KC_SF LSFT_T(KC_F) | ||
| 38 | #define KC_SJ RSFT_T(KC_J) | ||
| 39 | #define SNIP S(G(KC_S)) | ||
| 40 | |||
| 41 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 42 | [_BASE] = LAYOUT_default( | ||
| 43 | KC_MPLY, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 44 | KC_MNXT, KC_A, KC_S, KC_D, KC_SF, KC_G, KC_RGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 45 | KC_MPRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 46 | SNIP, KC_LGUI, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, TG(_GAME), KC_MUTE | ||
| 47 | ), | ||
| 48 | |||
| 49 | [_GAME] = LAYOUT_default( | ||
| 50 | KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 51 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 52 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 53 | KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_GUP_BSPC, KC_RALT, KC_TRNS, KC_BSPC | ||
| 54 | ), | ||
| 55 | |||
| 56 | [_SYM] = LAYOUT_default( | ||
| 57 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 58 | KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
| 59 | KC_TRNS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, | ||
| 60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 61 | ), | ||
| 62 | |||
| 63 | [_NAV] = LAYOUT_default( | ||
| 64 | KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, | ||
| 65 | KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB, | ||
| 66 | KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, | ||
| 67 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 68 | ), | ||
| 69 | |||
| 70 | }; | ||
| 71 | |||
| 72 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 73 | if (index == 0) { /* left encoder */ | ||
| 74 | if (clockwise) { | ||
| 75 | tap_code(KC_VOLU); | ||
| 76 | } else { | ||
| 77 | tap_code(KC_VOLD); | ||
| 78 | } | ||
| 79 | } else if (index == 1) { /* center encoder */ | ||
| 80 | if (clockwise) { | ||
| 81 | tap_code(KC_WH_U); | ||
| 82 | } else { | ||
| 83 | tap_code(KC_WH_D); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | return true; | ||
| 87 | } | ||
| 88 | |||
| 89 | #ifdef COMBO_ENABLE | ||
| 90 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
| 91 | const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; | ||
| 92 | const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; | ||
| 93 | const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; | ||
| 94 | const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; | ||
| 95 | |||
| 96 | combo_t key_combos[COMBO_COUNT] = { | ||
| 97 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
| 98 | [COMBO_ENT] = COMBO(combo_ent,KC_ENT), | ||
| 99 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
| 100 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
| 101 | [COMBO_DEL] = COMBO(combo_del,KC_DEL) | ||
| 102 | }; | ||
| 103 | #endif | ||
| 104 | |||
diff --git a/keyboards/wanten/keymaps/default/readme.md b/keyboards/wanten/keymaps/default/readme.md new file mode 100644 index 000000000..5a2b63c0b --- /dev/null +++ b/keyboards/wanten/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for wanten | |||
diff --git a/keyboards/wanten/keymaps/default/rules.mk b/keyboards/wanten/keymaps/default/rules.mk new file mode 100644 index 000000000..ab1e43818 --- /dev/null +++ b/keyboards/wanten/keymaps/default/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| COMBO_ENABLE = yes | |||
diff --git a/keyboards/wanten/readme.md b/keyboards/wanten/readme.md new file mode 100644 index 000000000..90dd1ae13 --- /dev/null +++ b/keyboards/wanten/readme.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # wanten | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | an ortho drop in PCB for Van cases | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [qpockets](https://github.com/qpockets) | ||
| 8 | * Hardware Supported: V1 wanten PCB | ||
| 9 | * Hardware Availability: [pocketspace discord server](https://discord.gg/fKbTxraHc6) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make wanten:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make wanten: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. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
| 20 | |||
| 21 | ## Bootloader | ||
| 22 | |||
| 23 | Enter the bootloader in 3 ways: | ||
| 24 | |||
| 25 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key or encoder) and plug in the keyboard | ||
| 26 | * **Physical reset button**: Briefly press the button on the back of the PCB | ||
| 27 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
diff --git a/keyboards/wanten/rules.mk b/keyboards/wanten/rules.mk new file mode 100644 index 000000000..3e05a4ed7 --- /dev/null +++ b/keyboards/wanten/rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 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 = yes # Enable Bootmagic Lite | ||
| 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 = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | AUDIO_ENABLE = no # Audio output | ||
| 22 | ENCODER_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/wanten/wanten.c b/keyboards/wanten/wanten.c new file mode 100644 index 000000000..15f3e64cb --- /dev/null +++ b/keyboards/wanten/wanten.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 "wanten.h" | ||
diff --git a/keyboards/wanten/wanten.h b/keyboards/wanten/wanten.h new file mode 100644 index 000000000..e6db44fea --- /dev/null +++ b/keyboards/wanten/wanten.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | #define XXX KC_NO | ||
| 22 | |||
| 23 | /* This is a shortcut to help you visually see your layout. | ||
| 24 | * | ||
| 25 | * The first section contains all of the arguments representing the physical | ||
| 26 | * layout of the board and position of the keys. | ||
| 27 | * | ||
| 28 | * The second converts the arguments into a two-dimensional array which | ||
| 29 | * represents the switch matrix. | ||
| 30 | */ | ||
| 31 | #define LAYOUT_default( \ | ||
| 32 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, \ | ||
| 33 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, \ | ||
| 34 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, \ | ||
| 35 | k30, k31, k32, k35, k37, k39, k80, k81 \ | ||
| 36 | ) { \ | ||
| 37 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, }, \ | ||
| 38 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, }, \ | ||
| 39 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, }, \ | ||
| 40 | { k30, k31, k32, XXX, XXX, k35, XXX, k37, XXX, k39, k80, k81, } \ | ||
| 41 | } | ||
| 42 | |||
| 43 | #define LAYOUT_625_bar( \ | ||
| 44 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, \ | ||
| 45 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, \ | ||
| 46 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, \ | ||
| 47 | k30, k31, k32, k36, k39, k81 \ | ||
| 48 | ) { \ | ||
| 49 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, }, \ | ||
| 50 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, }, \ | ||
| 51 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, }, \ | ||
| 52 | { k30, k31, k32, XXX, XXX, XXX, k36, XXX, XXX, k39, XXX, k81, } \ | ||
| 53 | } | ||
| 54 | |||
| 55 | #define LAYOUT_2u_bars( \ | ||
| 56 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, \ | ||
| 57 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, \ | ||
| 58 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, \ | ||
| 59 | k30, k31, k32, k34, k35, k37, k38, k39, k81 \ | ||
| 60 | ) { \ | ||
| 61 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, }, \ | ||
| 62 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, }, \ | ||
| 63 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, }, \ | ||
| 64 | { k30, k31, k32, XXX, k34, k35, XXX, k37, k38, k39, XXX, k81, } \ | ||
| 65 | } | ||
