1
0
Fork 0

[Keyboard] add wanten keyboard to QMK (#14410)

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
qpockets 2021-09-21 17:16:16 -04:00 committed by GitHub
parent bd0040068e
commit be273bd003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 841 additions and 0 deletions

161
keyboards/wanten/config.h Normal file
View file

@ -0,0 +1,161 @@
/*
Copyright 2021 qpockets
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0x7170 //qp
#define PRODUCT_ID 0x7774 //wt
#define DEVICE_VER 0x0001
#define MANUFACTURER qpockets
#define PRODUCT wanten
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 12
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { F0, F7, B3, D5 }
#define MATRIX_COL_PINS { F4, F1, B5, B6, C6, C7, D4, E6, D2, B1, B2, D3 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* ROTARY ENCODERS */
#define ENCODERS_PAD_A { F5, D6 }
#define ENCODERS_PAD_B { F6, D7 }
#define ENCODER_RESOLUTION 4
//#define ENCODER_DIRECTION_FLIP
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 4
/*nothing below here is needed for wanten unless enabling RGB. the correct RGB_DI_PIN is defined, the rest is up to you o7 */
//#define RGB_DI_PIN B0
//#ifdef RGB_DI_PIN
//# define RGBLED_NUM 16
//# define RGBLIGHT_HUE_STEP 8
//# define RGBLIGHT_SAT_STEP 8
//# define RGBLIGHT_VAL_STEP 8
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
//# define RGBLIGHT_ANIMATIONS
/*== or choose animations ==*/
//# define RGBLIGHT_EFFECT_BREATHING
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//# define RGBLIGHT_EFFECT_SNAKE
//# define RGBLIGHT_EFFECT_KNIGHT
//# define RGBLIGHT_EFFECT_CHRISTMAS
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
//# define RGBLIGHT_EFFECT_RGB_TEST
//# define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
//#endif
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
//#define LED_NUM_LOCK_PIN B0
//#define LED_CAPS_LOCK_PIN B1
//#define LED_SCROLL_LOCK_PIN B2
//#define LED_COMPOSE_PIN B3
//#define LED_KANA_PIN B4
//#define BACKLIGHT_PIN B7
//#define BACKLIGHT_LEVELS 3
//#define BACKLIGHT_BREATHING
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
//#define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
*/
//#define GRAVE_ESC_CTRL_OVERRIDE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0

152
keyboards/wanten/info.json Normal file
View file

@ -0,0 +1,152 @@
{
"keyboard_name": "wanten",
"url": "",
"maintainer": "qpockets",
"layouts": {
"LAYOUT_default": {
"layout": [
{"label":"Play", "x":0, "y":0},
{"label":"q", "x":1, "y":0},
{"label":"w", "x":2, "y":0},
{"label":"e", "x":3, "y":0},
{"label":"r", "x":4, "y":0},
{"label":"t", "x":5, "y":0},
{"label":"Del", "x":6, "y":0, "w":1.75},
{"label":"y", "x":7.75, "y":0},
{"label":"u", "x":8.75, "y":0},
{"label":"i", "x":9.75, "y":0},
{"label":"o", "x":10.75, "y":0},
{"label":"p", "x":11.75, "y":0},
{"label":"Next", "x":0, "y":1},
{"label":"a", "x":1, "y":1},
{"label":"s", "x":2, "y":1},
{"label":"d", "x":3, "y":1},
{"label":"f", "x":4, "y":1},
{"label":"g", "x":5, "y":1},
{"label":"Tab", "x":6, "y":1, "w":1.75},
{"label":"h", "x":7.75, "y":1},
{"label":"j", "x":8.75, "y":1},
{"label":"k", "x":9.75, "y":1},
{"label":"l", "x":10.75, "y":1},
{"label":"\"", "x":11.75, "y":1},
{"label":"Prev", "x":0, "y":2},
{"label":"z", "x":1, "y":2},
{"label":"x", "x":2, "y":2},
{"label":"c", "x":3, "y":2},
{"label":"v", "x":4, "y":2},
{"label":"b", "x":5, "y":2},
{"label":"Shift", "x":6, "y":2, "w":1.75},
{"label":"n", "x":7.75, "y":2},
{"label":"m", "x":8.75, "y":2},
{"label":"<", "x":9.75, "y":2},
{"label":">", "x":10.75, "y":2},
{"label":"?", "x":11.75, "y":2},
{"label":"LCtrl", "x":0, "y":3, "w":1.25},
{"label":"LGui", "x":1.25, "y":3, "w":1.25},
{"label":"LAlt", "x":2.5, "y":3, "w":1.25},
{"label":"Back", "x":3.75, "y":3, "w":3},
{"label":"Space", "x":6.75, "y":3, "w":3},
{"label":"RCtrl", "x":9.75, "y":3},
{"label":"RGui", "x":10.75, "y":3},
{"label":"RAlt", "x":11.75, "y":3}
]
},
"LAYOUT_2u_bars": {
"layout": [
{"label":"Play", "x":0, "y":0},
{"label":"q", "x":1, "y":0},
{"label":"w", "x":2, "y":0},
{"label":"e", "x":3, "y":0},
{"label":"r", "x":4, "y":0},
{"label":"t", "x":5, "y":0},
{"label":"Del", "x":6, "y":0, "w":1.75},
{"label":"y", "x":7.75, "y":0},
{"label":"u", "x":8.75, "y":0},
{"label":"i", "x":9.75, "y":0},
{"label":"o", "x":10.75, "y":0},
{"label":"p", "x":11.75, "y":0},
{"label":"Next", "x":0, "y":1},
{"label":"a", "x":1, "y":1},
{"label":"s", "x":2, "y":1},
{"label":"d", "x":3, "y":1},
{"label":"f", "x":4, "y":1},
{"label":"g", "x":5, "y":1},
{"label":"Tab", "x":6, "y":1, "w":1.75},
{"label":"h", "x":7.75, "y":1},
{"label":"j", "x":8.75, "y":1},
{"label":"k", "x":9.75, "y":1},
{"label":"l", "x":10.75, "y":1},
{"label":"\"", "x":11.75, "y":1},
{"label":"Prev", "x":0, "y":2},
{"label":"z", "x":1, "y":2},
{"label":"x", "x":2, "y":2},
{"label":"c", "x":3, "y":2},
{"label":"v", "x":4, "y":2},
{"label":"b", "x":5, "y":2},
{"label":"Shift", "x":6, "y":2, "w":1.75},
{"label":"n", "x":7.75, "y":2},
{"label":"m", "x":8.75, "y":2},
{"label":"<", "x":9.75, "y":2},
{"label":">", "x":10.75, "y":2},
{"label":"?", "x":11.75, "y":2},
{"label":"PSCR", "x":0, "y":3, "w":1.25},
{"label":"LAlt", "x":1.25, "y":3, "w":1.25},
{"label":"LGui", "x":2.5, "y":3, "w":1.25},
{"label":"LCtl", "x":3.75, "y":3},
{"label":"Back", "x":4.75, "y":3, "w":2},
{"label":"Space", "x":6.75, "y":3, "w":2.25},
{"label":"RCtrl", "x":9, "y":3},
{"label":"RGui", "x":10, "y":3, "w":1.25},
{"label":"RAlt", "x":11.25, "y":3, "w":1.5}
]
},
"LAYOUT_625_bar": {
"layout": [
{"label":"Play", "x":0, "y":0},
{"label":"q", "x":1, "y":0},
{"label":"w", "x":2, "y":0},
{"label":"e", "x":3, "y":0},
{"label":"r", "x":4, "y":0},
{"label":"t", "x":5, "y":0},
{"label":"Del", "x":6, "y":0, "w":1.75},
{"label":"y", "x":7.75, "y":0},
{"label":"u", "x":8.75, "y":0},
{"label":"i", "x":9.75, "y":0},
{"label":"o", "x":10.75, "y":0},
{"label":"p", "x":11.75, "y":0},
{"label":"Next", "x":0, "y":1},
{"label":"a", "x":1, "y":1},
{"label":"s", "x":2, "y":1},
{"label":"d", "x":3, "y":1},
{"label":"f", "x":4, "y":1},
{"label":"g", "x":5, "y":1},
{"label":"Tab", "x":6, "y":1, "w":1.75},
{"label":"h", "x":7.75, "y":1},
{"label":"j", "x":8.75, "y":1},
{"label":"k", "x":9.75, "y":1},
{"label":"l", "x":10.75, "y":1},
{"label":"\"", "x":11.75, "y":1},
{"label":"Prev", "x":0, "y":2},
{"label":"z", "x":1, "y":2},
{"label":"x", "x":2, "y":2},
{"label":"c", "x":3, "y":2},
{"label":"v", "x":4, "y":2},
{"label":"b", "x":5, "y":2},
{"label":"Shift", "x":6, "y":2, "w":1.75},
{"label":"n", "x":7.75, "y":2},
{"label":"m", "x":8.75, "y":2},
{"label":"<", "x":9.75, "y":2},
{"label":">", "x":10.75, "y":2},
{"label":"?", "x":11.75, "y":2},
{"label":"LAlt", "x":0, "y":3, "w":1.25},
{"label":"LGui", "x":1.25, "y":3, "w":1.25},
{"label":"LCtrl", "x":2.5, "y":3, "w":1.25},
{"label":"Space", "x":3.75, "y":3, "w":6.25},
{"label":"RAlt", "x":10, "y":3, "w":1.25},
{"label":"RCtrl", "x":11.25, "y":3, "w":1.5}
]
}
}
}

View file

@ -0,0 +1,27 @@
/* Copyright 2021 qpockets
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*Modtaps*/
#define TAPPING_TERM 145
#define IGNORE_MOD_TAP_INTERRUPT
/*Combos*/
#ifdef COMBO_ENABLE
# define COMBO_COUNT 5
# define COMBO_TERM 25
#endif

View file

@ -0,0 +1,104 @@
/* Copyright 2021 qpockets
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum layers{
_BASE,
_GAME,
_SYM,
_NAV
};
enum combo_events {
COMBO_BSPC,
COMBO_ENT,
COMBO_TAB,
COMBO_ESC,
COMBO_DEL
};
#define KC_DN_BSPC LT(_NAV, KC_BSPC)
#define KC_UP_SPC LT(_SYM, KC_SPC)
#define KC_GUP_BSPC LT(_SYM, KC_BSPC)
#define KC_SF LSFT_T(KC_F)
#define KC_SJ RSFT_T(KC_J)
#define SNIP S(G(KC_S))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_2u_bars(
KC_MPLY, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_MNXT, KC_A, KC_S, KC_D, KC_SF, KC_G, KC_RGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT,
KC_MPRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
SNIP, KC_LGUI, KC_LCTL, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, TG(_GAME), KC_MUTE
),
[_GAME] = LAYOUT_2u_bars(
KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTRL, KC_LGUI, KC_LALT, KC_ESC, KC_SPC, KC_GUP_BSPC, KC_RALT, KC_TRNS, KC_BSPC
),
[_SYM] = LAYOUT_2u_bars(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
KC_TRNS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_NAV] = LAYOUT_2u_bars(
KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC,
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB,
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* left encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* center encoder */
if (clockwise) {
tap_code(KC_WH_U);
} else {
tap_code(KC_WH_D);
}
}
return true;
}
#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END};
const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END};
const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END};
const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END};
const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
[COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC),
[COMBO_ENT] = COMBO(combo_ent,KC_ENT),
[COMBO_TAB] = COMBO(combo_tab,KC_TAB),
[COMBO_ESC] = COMBO(combo_esc,KC_ESC),
[COMBO_DEL] = COMBO(combo_del,KC_DEL)
};
#endif

View file

@ -0,0 +1 @@
COMBO_ENABLE = yes

View file

@ -0,0 +1,27 @@
/* Copyright 2021 qpockets
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*Modtaps*/
#define TAPPING_TERM 145
#define IGNORE_MOD_TAP_INTERRUPT
/*Combos*/
#ifdef COMBO_ENABLE
# define COMBO_COUNT 5
# define COMBO_TERM 25
#endif

View file

@ -0,0 +1,104 @@
/* Copyright 2021 qpockets
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum layers{
_BASE,
_GAME,
_SYM,
_NAV
};
enum combo_events {
COMBO_BSPC,
COMBO_ENT,
COMBO_TAB,
COMBO_ESC,
COMBO_DEL
};
#define KC_DZ LT(_NAV, KC_Z)
#define KC_UP_SPC LT(_SYM, KC_SPC)
//#define KC_GUP_BSPC LT(_SYM, KC_BSPC)
#define KC_SF LSFT_T(KC_F)
#define KC_SJ RSFT_T(KC_J)
#define SNIP S(G(KC_S))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_625_bar(
KC_MPLY, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_MNXT, KC_A, KC_S, KC_D, KC_SF, KC_G, KC_RGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT,
KC_MPRV, KC_DZ, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
SNIP, KC_LGUI, KC_LCTL, KC_UP_SPC, KC_RALT, TG(_GAME)
),
[_GAME] = LAYOUT_625_bar(
KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_TRNS
),
[_SYM] = LAYOUT_625_bar(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
KC_TRNS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_NAV] = LAYOUT_625_bar(
KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC,
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB,
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* left encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* center encoder */
if (clockwise) {
tap_code(KC_WH_D);
} else {
tap_code(KC_WH_U);
}
}
return true;
}
#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END};
const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END};
const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END};
const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END};
const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
[COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC),
[COMBO_ENT] = COMBO(combo_ent,KC_ENT),
[COMBO_TAB] = COMBO(combo_tab,KC_TAB),
[COMBO_ESC] = COMBO(combo_esc,KC_ESC),
[COMBO_DEL] = COMBO(combo_del,KC_DEL)
};
#endif

View file

@ -0,0 +1 @@
COMBO_ENABLE = yes

View file

@ -0,0 +1,27 @@
/* Copyright 2021 qpockets
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*Modtaps*/
#define TAPPING_TERM 145
#define IGNORE_MOD_TAP_INTERRUPT
/*Combos*/
#ifdef COMBO_ENABLE
# define COMBO_COUNT 5
# define COMBO_TERM 25
#endif

View file

@ -0,0 +1,104 @@
/* Copyright 2021 qpockets
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum layers{
_BASE,
_GAME,
_SYM,
_NAV
};
enum combo_events {
COMBO_BSPC,
COMBO_ENT,
COMBO_TAB,
COMBO_ESC,
COMBO_DEL
};
#define KC_DN_BSPC LT(_NAV, KC_BSPC)
#define KC_UP_SPC LT(_SYM, KC_SPC)
#define KC_GUP_BSPC LT(_SYM, KC_BSPC)
#define KC_SF LSFT_T(KC_F)
#define KC_SJ RSFT_T(KC_J)
#define SNIP S(G(KC_S))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_default(
KC_MPLY, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_MNXT, KC_A, KC_S, KC_D, KC_SF, KC_G, KC_RGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT,
KC_MPRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
SNIP, KC_LGUI, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, TG(_GAME), KC_MUTE
),
[_GAME] = LAYOUT_default(
KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_GUP_BSPC, KC_RALT, KC_TRNS, KC_BSPC
),
[_SYM] = LAYOUT_default(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
KC_TRNS, KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_NAV] = LAYOUT_default(
KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC,
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB,
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* left encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* center encoder */
if (clockwise) {
tap_code(KC_WH_U);
} else {
tap_code(KC_WH_D);
}
}
return true;
}
#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END};
const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END};
const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END};
const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END};
const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {
[COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC),
[COMBO_ENT] = COMBO(combo_ent,KC_ENT),
[COMBO_TAB] = COMBO(combo_tab,KC_TAB),
[COMBO_ESC] = COMBO(combo_esc,KC_ESC),
[COMBO_DEL] = COMBO(combo_del,KC_DEL)
};
#endif

View file

@ -0,0 +1 @@
# The default keymap for wanten

View file

@ -0,0 +1 @@
COMBO_ENABLE = yes

View file

@ -0,0 +1,27 @@
# wanten
![wanten](https://i.imgur.com/d7o1Edf.png)
an ortho drop in PCB for Van cases
* Keyboard Maintainer: [qpockets](https://github.com/qpockets)
* Hardware Supported: V1 wanten PCB
* Hardware Availability: [pocketspace discord server](https://discord.gg/fKbTxraHc6)
Make example for this keyboard (after setting up your build environment):
make wanten:default
Flashing example for this keyboard:
make wanten:default:flash
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).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key or encoder) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `RESET` if it is available

22
keyboards/wanten/rules.mk Normal file
View file

@ -0,0 +1,22 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes

17
keyboards/wanten/wanten.c Normal file
View file

@ -0,0 +1,17 @@
/* Copyright 2021 qpockets
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wanten.h"

65
keyboards/wanten/wanten.h Normal file
View file

@ -0,0 +1,65 @@
/* Copyright 2021 qpockets
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define XXX KC_NO
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_default( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, \
k30, k31, k32, k35, k37, k39, k80, k81 \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, }, \
{ k30, k31, k32, XXX, XXX, k35, XXX, k37, XXX, k39, k80, k81, } \
}
#define LAYOUT_625_bar( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, \
k30, k31, k32, k36, k39, k81 \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, }, \
{ k30, k31, k32, XXX, XXX, XXX, k36, XXX, XXX, k39, XXX, k81, } \
}
#define LAYOUT_2u_bars( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, \
k30, k31, k32, k34, k35, k37, k38, k39, k81 \
) { \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k50, k51, }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k60, k61, }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k70, k71, }, \
{ k30, k31, k32, XXX, k34, k35, XXX, k37, k38, k39, XXX, k81, } \
}