Skip to content

Commit

Permalink
[Keyboard] Add new keyboard quick17 (qmk#13703)
Browse files Browse the repository at this point in the history
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: keyaki-namiki <[email protected]>
  • Loading branch information
4 people authored and cori committed Sep 19, 2021
1 parent a6e9b09 commit 3a58be6
Show file tree
Hide file tree
Showing 14 changed files with 808 additions and 0 deletions.
143 changes: 143 additions & 0 deletions keyboards/yushakobo/quick17/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
Copyright 2021 yushakobo
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 <https://www.gnu.org/licenses/>.
*/

#pragma once

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0x3265
#define PRODUCT_ID 0x0006
#define DEVICE_VER 0x0001
#define MANUFACTURER yushakobo
#define PRODUCT quick17

/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 6

/*
* 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 { F4, B3, B6 }
#define MATRIX_COL_PINS { F5, D4, E6, F7, C6, D7 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

/*
* 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 BACKLIGHT_PIN B7
//#define BACKLIGHT_LEVELS 3
//#define BACKLIGHT_BREATHING

#define RGB_DI_PIN D2
#define RGBLED_NUM 18

#ifdef RGB_MATRIX_ENABLE
# define DRIVER_LED_TOTAL RGBLED_NUM
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
// HSV_TEAL
// #define RGB_MATRIX_STARTUP_HUE 128
// #define RGB_MATRIX_STARTUP_SAT 255
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_MATRIX_HUE_STEP 8
# define RGB_MATRIX_SAT_STEP 8
# define RGB_MATRIX_VAL_STEP 8
# define RGB_MATRIX_SPD_STEP 10
#endif




#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_LED_MAP {\
6, 7, 12, 13, 14, 15,\
16, 17, 11, 10, 9, 8,\
0, 1, 2, 3, 4, 5\
}
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_LIMIT_VAL 150 /* 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

#define RGBLIGHT_LAYERS
#define RGBLIGHT_MAX_LAYERS 8

#endif

#ifdef ENCODER_ENABLE
#define ENCODERS_PAD_A { B4 }
#define ENCODERS_PAD_B { B5 }
#endif

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST


/* 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
14 changes: 14 additions & 0 deletions keyboards/yushakobo/quick17/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"keyboard_name": "quick17",
"url": "https://shop.yushakobo.jp/products/quick17",
"maintainer": "yushakobo",
"layouts": {
"LAYOUT": {
"layout": [
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0},
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1},
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}
]
}
}
}
113 changes: 113 additions & 0 deletions keyboards/yushakobo/quick17/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/* Copyright 2021 yushakobo
*
* 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 <https://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H

// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
KC_LANG
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_CONTROL] = LAYOUT(
KC_TAB, KC_PGUP,KC_UP, KC_PGDN,KC_HOME,KC_INS,
KC_LCTL,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, KC_DEL,
KC_LSFT,KC_LGUI,KC_ESC, KC_LALT,LT(3,KC_SPC),TO(1)
),
[_EDIT1] = LAYOUT(
KC_ESC, KC_W, KC_E, KC_R, KC_Y, KC_BSPC,
KC_LCTL,KC_A, KC_D, KC_F, KC_H, LCTL(KC_Z),
KC_LSFT,KC_X, KC_V, KC_B, LT(2,KC_SPC),LCTL(KC_S)
),
[_EDIT2] = LAYOUT(
KC_ESC, KC_Q, KC_BTN3,KC_INS, KC_ENT, KC_DEL,
KC_LCTL,KC_LBRC,KC_RBRC,KC_PGDN,KC_PGUP,LCTL(KC_Y),
KC_LSFT,TO(3), RGB_TOG,TO(0), _______,KC_NO
),
[_FN] = LAYOUT(
KC_ESC, KC_LANG,KC_NO, RGB_TOG,KC_MNXT,KC_VOLU,
KC_CAPS,KC_NLCK,KC_NO, RGB_MOD,KC_MPRV,KC_VOLD,
CG_NORM,LCG_SWP,EEP_RST,RESET, TO(0), KC_MUTE
)
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_LANG:
if (record->event.pressed){
if (keymap_config.swap_lctl_lgui == false){
tap_code16(LALT(KC_GRV));
} else {
if(input_mode()){
register_code(KC_LANG2);
set_input_mode(false);
} else {
register_code(KC_LANG1);
set_input_mode(true);
}
}
} else {
unregister_code(KC_LANG1);
unregister_code(KC_LANG2);
}
break;
default:
break;
}
return true;
}

bool encoder_update_user(uint8_t index, bool clockwise){
if (index == 0) {
if (IS_LAYER_ON(_EDIT2)){
if (clockwise) {
tap_code(KC_LBRC);
} else {
tap_code(KC_RBRC);
}
} else if (IS_LAYER_ON(_EDIT1)){
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (IS_LAYER_ON(_FN)){
if (clockwise) {
tap_code(KC_MNXT);
} else {
tap_code(KC_MPRV);
}
} else { // IS_LAYER_ON(_CONTROL)
if (clockwise) {
tap_code(KC_WH_U);
} else {
tap_code(KC_WH_D);
}
}
}
return false;
}

#ifdef RGB_MATRIX_ENABLE
void keyboard_post_init_user(void){
rgb_matrix_mode(RGB_MATRIX_CUSTOM_quick17_rgbm_effect);
set_input_mode(false);
}
#else
void keyboard_post_init_user(void){
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
set_input_mode(false);
}
#endif
64 changes: 64 additions & 0 deletions keyboards/yushakobo/quick17/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# The default keymap for quick17

## CONTROL(default) Layer
```
,-----------------------------------------------.
| Tab | PgUp | Up | PgDn | Home | Ins |
|-------+-------+-------+-------+-------+-------|
| Ctrl | Left | Down | Right | End | Del |
|-------+-------+-------+-------+-------+-------|
| Shift | GUI | Esc | Alt | FN/Spc| EDIT1 |
`-----------------------------------------------'
```

## EDIT1 Layer
```
,--------------------------------------------------.
| Esc | W | E | R | Y | Bspc |
|-------+-------+-------+-------+---------+--------|
| Ctrl | A | D | F | H | Ctrl+Z |
|-------+-------+-------+-------+---------+--------|
| Shift | X | V | B |EDIT2/Spc| Ctrl+S |
`--------------------------------------------------'
```

## EDIT2 Layer
```
,-------------------------------------------------.
| Esc | Q | BTN3 | Ins | Enter | Bspc |
|-------+-------+-------+-------+--------+--------|
| Ctrl | [ | ] | PgDn | PgUp | Ctrl+Z |
|-------+-------+-------+-------+--------+--------|
| Shift | FN |RGB_TOG|CONTROL| (NONE) | (NONE) |
`-------------------------------------------------'
```

## FN Layer
```
,---------------------------------------------------.
| Esc | LANG | (NONE) |RGB_TOG| Media > | Vol+ |
|-------+-------+--------+-------+---------+--------|
| Caps | Numlk | (NONE) |RGB_MOD| Media < | Vol- |
|-------+-------+--------+-------+---------+--------|
| Win | mac | EEP_RST| RESET | CONTROL | Mute |
`---------------------------------------------------'
```
### difference between mac-Mode and Win-Mode
- In mac Mode, `Ctrl` key will be changed into `command` key.
- `LANG` key will change its behaviour.

### "LANG" key behaviour

|LED-sign|Blue|Red|Green|
|---|---|---|---|
|mac Mode|-|かな|英数|
|Win Mode|半角/全角(Alt+`)|-|-|

## Rotary encoder behaviour

|On layer...|Clockwise|C-Clockwise|
|---|---|---|
|CONTROL|Scroll Up|Scroll Down|
|EDIT1|Vol+|Vol-|
|EDIT2|[|]|
|FN|Media >|Media <|
Loading

0 comments on commit 3a58be6

Please sign in to comment.