diff options
| author | QMK Bot <hello@qmk.fm> | 2021-09-18 19:29:10 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2021-09-18 19:29:10 +0000 |
| commit | 82ff1e1e12b0b03232b7fb67ff1f66d2fe2c75ab (patch) | |
| tree | 126cf111101e923a13ac20f96217bdce69ffab11 | |
| parent | 0b9cebe5ada6b47b5c23cbe2156df33164ba454f (diff) | |
| parent | c2f3c418f33bf5d8d60e005de4d076949a7c7098 (diff) | |
| download | qmk_firmware-82ff1e1e12b0b03232b7fb67ff1f66d2fe2c75ab.tar.gz qmk_firmware-82ff1e1e12b0b03232b7fb67ff1f66d2fe2c75ab.zip | |
Merge remote-tracking branch 'origin/master' into develop
| -rw-r--r-- | keyboards/yushakobo/quick17/config.h | 143 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/info.json | 14 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/keymaps/default/keymap.c | 113 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/keymaps/default/readme.md | 64 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/keymaps/via/keymap.c | 113 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/keymaps/via/readme.md | 62 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/keymaps/via/rules.mk | 3 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/quick17.c | 37 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/quick17.h | 38 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/quick17_prefs.c | 29 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/quick17_prefs.h | 28 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/readme.md | 19 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/rgb_matrix_kb.inc | 117 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick17/rules.mk | 28 |
14 files changed, 808 insertions, 0 deletions
diff --git a/keyboards/yushakobo/quick17/config.h b/keyboards/yushakobo/quick17/config.h new file mode 100644 index 000000000..ab33c8408 --- /dev/null +++ b/keyboards/yushakobo/quick17/config.h | |||
| @@ -0,0 +1,143 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 yushakobo | ||
| 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 0x3265 | ||
| 24 | #define PRODUCT_ID 0x0006 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER yushakobo | ||
| 27 | #define PRODUCT quick17 | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 3 | ||
| 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 { F4, B3, B6 } | ||
| 44 | #define MATRIX_COL_PINS { F5, D4, E6, F7, C6, D7 } | ||
| 45 | #define UNUSED_PINS | ||
| 46 | |||
| 47 | /* COL2ROW, ROW2COL */ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 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 D0 // or D1, D2, D3, E6 | ||
| 54 | |||
| 55 | //#define BACKLIGHT_PIN B7 | ||
| 56 | //#define BACKLIGHT_LEVELS 3 | ||
| 57 | //#define BACKLIGHT_BREATHING | ||
| 58 | |||
| 59 | #define RGB_DI_PIN D2 | ||
| 60 | #define RGBLED_NUM 18 | ||
| 61 | |||
| 62 | #ifdef RGB_MATRIX_ENABLE | ||
| 63 | # define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 64 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses | ||
| 65 | // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) | ||
| 66 | // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
| 67 | # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
| 68 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 69 | // # 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) | ||
| 70 | // # 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) | ||
| 71 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | ||
| 72 | // HSV_TEAL | ||
| 73 | // #define RGB_MATRIX_STARTUP_HUE 128 | ||
| 74 | // #define RGB_MATRIX_STARTUP_SAT 255 | ||
| 75 | #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 76 | # define RGB_MATRIX_HUE_STEP 8 | ||
| 77 | # define RGB_MATRIX_SAT_STEP 8 | ||
| 78 | # define RGB_MATRIX_VAL_STEP 8 | ||
| 79 | # define RGB_MATRIX_SPD_STEP 10 | ||
| 80 | #endif | ||
| 81 | |||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | #ifdef RGBLIGHT_ENABLE | ||
| 86 | # define RGBLIGHT_LED_MAP {\ | ||
| 87 | 6, 7, 12, 13, 14, 15,\ | ||
| 88 | 16, 17, 11, 10, 9, 8,\ | ||
| 89 | 0, 1, 2, 3, 4, 5\ | ||
| 90 | } | ||
| 91 | # define RGBLIGHT_HUE_STEP 8 | ||
| 92 | # define RGBLIGHT_SAT_STEP 8 | ||
| 93 | # define RGBLIGHT_VAL_STEP 8 | ||
| 94 | # define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ | ||
| 95 | //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 96 | /*== all animations enable ==*/ | ||
| 97 | //# define RGBLIGHT_ANIMATIONS | ||
| 98 | /*== or choose animations ==*/ | ||
| 99 | //# define RGBLIGHT_EFFECT_BREATHING | ||
| 100 | # define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 101 | # define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 102 | //# define RGBLIGHT_EFFECT_SNAKE | ||
| 103 | //# define RGBLIGHT_EFFECT_KNIGHT | ||
| 104 | # define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 105 | # define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 106 | # define RGBLIGHT_EFFECT_RGB_TEST | ||
| 107 | //# define RGBLIGHT_EFFECT_ALTERNATING | ||
| 108 | /*== customize breathing effect ==*/ | ||
| 109 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 110 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 111 | /*==== use exp() and sin() ====*/ | ||
| 112 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 113 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 114 | |||
| 115 | #define RGBLIGHT_LAYERS | ||
| 116 | #define RGBLIGHT_MAX_LAYERS 8 | ||
| 117 | |||
| 118 | #endif | ||
| 119 | |||
| 120 | #ifdef ENCODER_ENABLE | ||
| 121 | #define ENCODERS_PAD_A { B4 } | ||
| 122 | #define ENCODERS_PAD_B { B5 } | ||
| 123 | #endif | ||
| 124 | |||
| 125 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 126 | #define DEBOUNCE 5 | ||
| 127 | |||
| 128 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 129 | //#define MATRIX_HAS_GHOST | ||
| 130 | |||
| 131 | |||
| 132 | /* disable action features */ | ||
| 133 | //#define NO_ACTION_LAYER | ||
| 134 | //#define NO_ACTION_TAPPING | ||
| 135 | //#define NO_ACTION_ONESHOT | ||
| 136 | |||
| 137 | /* disable these deprecated features by default */ | ||
| 138 | #define NO_ACTION_MACRO | ||
| 139 | #define NO_ACTION_FUNCTION | ||
| 140 | |||
| 141 | /* Bootmagic Lite key configuration */ | ||
| 142 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 143 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/yushakobo/quick17/info.json b/keyboards/yushakobo/quick17/info.json new file mode 100644 index 000000000..eb971110c --- /dev/null +++ b/keyboards/yushakobo/quick17/info.json | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "quick17", | ||
| 3 | "url": "https://shop.yushakobo.jp/products/quick17", | ||
| 4 | "maintainer": "yushakobo", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT": { | ||
| 7 | "layout": [ | ||
| 8 | {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, | ||
| 9 | {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, | ||
| 10 | {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2} | ||
| 11 | ] | ||
| 12 | } | ||
| 13 | } | ||
| 14 | } | ||
diff --git a/keyboards/yushakobo/quick17/keymaps/default/keymap.c b/keyboards/yushakobo/quick17/keymaps/default/keymap.c new file mode 100644 index 000000000..a3873bc1e --- /dev/null +++ b/keyboards/yushakobo/quick17/keymaps/default/keymap.c | |||
| @@ -0,0 +1,113 @@ | |||
| 1 | /* Copyright 2021 yushakobo | ||
| 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 the keycodes used by our macros in process_record_user | ||
| 19 | enum custom_keycodes { | ||
| 20 | KC_LANG | ||
| 21 | }; | ||
| 22 | |||
| 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 24 | [_CONTROL] = LAYOUT( | ||
| 25 | KC_TAB, KC_PGUP,KC_UP, KC_PGDN,KC_HOME,KC_INS, | ||
| 26 | KC_LCTL,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, KC_DEL, | ||
| 27 | KC_LSFT,KC_LGUI,KC_ESC, KC_LALT,LT(3,KC_SPC),TO(1) | ||
| 28 | ), | ||
| 29 | [_EDIT1] = LAYOUT( | ||
| 30 | KC_ESC, KC_W, KC_E, KC_R, KC_Y, KC_BSPC, | ||
| 31 | KC_LCTL,KC_A, KC_D, KC_F, KC_H, LCTL(KC_Z), | ||
| 32 | KC_LSFT,KC_X, KC_V, KC_B, LT(2,KC_SPC),LCTL(KC_S) | ||
| 33 | ), | ||
| 34 | [_EDIT2] = LAYOUT( | ||
| 35 | KC_ESC, KC_Q, KC_BTN3,KC_INS, KC_ENT, KC_DEL, | ||
| 36 | KC_LCTL,KC_LBRC,KC_RBRC,KC_PGDN,KC_PGUP,LCTL(KC_Y), | ||
| 37 | KC_LSFT,TO(3), RGB_TOG,TO(0), _______,KC_NO | ||
| 38 | ), | ||
| 39 | [_FN] = LAYOUT( | ||
| 40 | KC_ESC, KC_LANG,KC_NO, RGB_TOG,KC_MNXT,KC_VOLU, | ||
| 41 | KC_CAPS,KC_NLCK,KC_NO, RGB_MOD,KC_MPRV,KC_VOLD, | ||
| 42 | CG_NORM,LCG_SWP,EEP_RST,RESET, TO(0), KC_MUTE | ||
| 43 | ) | ||
| 44 | }; | ||
| 45 | |||
| 46 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 47 | switch (keycode) { | ||
| 48 | case KC_LANG: | ||
| 49 | if (record->event.pressed){ | ||
| 50 | if (keymap_config.swap_lctl_lgui == false){ | ||
| 51 | tap_code16(LALT(KC_GRV)); | ||
| 52 | } else { | ||
| 53 | if(input_mode()){ | ||
| 54 | register_code(KC_LANG2); | ||
| 55 | set_input_mode(false); | ||
| 56 | } else { | ||
| 57 | register_code(KC_LANG1); | ||
| 58 | set_input_mode(true); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } else { | ||
| 62 | unregister_code(KC_LANG1); | ||
| 63 | unregister_code(KC_LANG2); | ||
| 64 | } | ||
| 65 | break; | ||
| 66 | default: | ||
| 67 | break; | ||
| 68 | } | ||
| 69 | return true; | ||
| 70 | } | ||
| 71 | |||
| 72 | bool encoder_update_user(uint8_t index, bool clockwise){ | ||
| 73 | if (index == 0) { | ||
| 74 | if (IS_LAYER_ON(_EDIT2)){ | ||
| 75 | if (clockwise) { | ||
| 76 | tap_code(KC_LBRC); | ||
| 77 | } else { | ||
| 78 | tap_code(KC_RBRC); | ||
| 79 | } | ||
| 80 | } else if (IS_LAYER_ON(_EDIT1)){ | ||
| 81 | if (clockwise) { | ||
| 82 | tap_code(KC_VOLU); | ||
| 83 | } else { | ||
| 84 | tap_code(KC_VOLD); | ||
| 85 | } | ||
| 86 | } else if (IS_LAYER_ON(_FN)){ | ||
| 87 | if (clockwise) { | ||
| 88 | tap_code(KC_MNXT); | ||
| 89 | } else { | ||
| 90 | tap_code(KC_MPRV); | ||
| 91 | } | ||
| 92 | } else { // IS_LAYER_ON(_CONTROL) | ||
| 93 | if (clockwise) { | ||
| 94 | tap_code(KC_WH_U); | ||
| 95 | } else { | ||
| 96 | tap_code(KC_WH_D); | ||
| 97 | } | ||
| 98 | } | ||
| 99 | } | ||
| 100 | return false; | ||
| 101 | } | ||
| 102 | |||
| 103 | #ifdef RGB_MATRIX_ENABLE | ||
| 104 | void keyboard_post_init_user(void){ | ||
| 105 | rgb_matrix_mode(RGB_MATRIX_CUSTOM_quick17_rgbm_effect); | ||
| 106 | set_input_mode(false); | ||
| 107 | } | ||
| 108 | #else | ||
| 109 | void keyboard_post_init_user(void){ | ||
| 110 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); | ||
| 111 | set_input_mode(false); | ||
| 112 | } | ||
| 113 | #endif | ||
diff --git a/keyboards/yushakobo/quick17/keymaps/default/readme.md b/keyboards/yushakobo/quick17/keymaps/default/readme.md new file mode 100644 index 000000000..5a5066ed5 --- /dev/null +++ b/keyboards/yushakobo/quick17/keymaps/default/readme.md | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | # The default keymap for quick17 | ||
| 2 | |||
| 3 | ## CONTROL(default) Layer | ||
| 4 | ``` | ||
| 5 | ,-----------------------------------------------. | ||
| 6 | | Tab | PgUp | Up | PgDn | Home | Ins | | ||
| 7 | |-------+-------+-------+-------+-------+-------| | ||
| 8 | | Ctrl | Left | Down | Right | End | Del | | ||
| 9 | |-------+-------+-------+-------+-------+-------| | ||
| 10 | | Shift | GUI | Esc | Alt | FN/Spc| EDIT1 | | ||
| 11 | `-----------------------------------------------' | ||
| 12 | ``` | ||
| 13 | |||
| 14 | ## EDIT1 Layer | ||
| 15 | ``` | ||
| 16 | ,--------------------------------------------------. | ||
| 17 | | Esc | W | E | R | Y | Bspc | | ||
| 18 | |-------+-------+-------+-------+---------+--------| | ||
| 19 | | Ctrl | A | D | F | H | Ctrl+Z | | ||
| 20 | |-------+-------+-------+-------+---------+--------| | ||
| 21 | | Shift | X | V | B |EDIT2/Spc| Ctrl+S | | ||
| 22 | `--------------------------------------------------' | ||
| 23 | ``` | ||
| 24 | |||
| 25 | ## EDIT2 Layer | ||
| 26 | ``` | ||
| 27 | ,-------------------------------------------------. | ||
| 28 | | Esc | Q | BTN3 | Ins | Enter | Bspc | | ||
| 29 | |-------+-------+-------+-------+--------+--------| | ||
| 30 | | Ctrl | [ | ] | PgDn | PgUp | Ctrl+Z | | ||
| 31 | |-------+-------+-------+-------+--------+--------| | ||
| 32 | | Shift | FN |RGB_TOG|CONTROL| (NONE) | (NONE) | | ||
| 33 | `-------------------------------------------------' | ||
| 34 | ``` | ||
| 35 | |||
| 36 | ## FN Layer | ||
| 37 | ``` | ||
| 38 | ,---------------------------------------------------. | ||
| 39 | | Esc | LANG | (NONE) |RGB_TOG| Media > | Vol+ | | ||
| 40 | |-------+-------+--------+-------+---------+--------| | ||
| 41 | | Caps | Numlk | (NONE) |RGB_MOD| Media < | Vol- | | ||
| 42 | |-------+-------+--------+-------+---------+--------| | ||
| 43 | | Win | mac | EEP_RST| RESET | CONTROL | Mute | | ||
| 44 | `---------------------------------------------------' | ||
| 45 | ``` | ||
| 46 | ### difference between mac-Mode and Win-Mode | ||
| 47 | - In mac Mode, `Ctrl` key will be changed into `command` key. | ||
| 48 | - `LANG` key will change its behaviour. | ||
| 49 | |||
| 50 | ### "LANG" key behaviour | ||
| 51 | |||
| 52 | |LED-sign|Blue|Red|Green| | ||
| 53 | |---|---|---|---| | ||
| 54 | |mac Mode|-|かな|英数| | ||
| 55 | |Win Mode|半角/全角(Alt+`)|-|-| | ||
| 56 | |||
| 57 | ## Rotary encoder behaviour | ||
| 58 | |||
| 59 | |On layer...|Clockwise|C-Clockwise| | ||
| 60 | |---|---|---| | ||
| 61 | |CONTROL|Scroll Up|Scroll Down| | ||
| 62 | |EDIT1|Vol+|Vol-| | ||
| 63 | |EDIT2|[|]| | ||
| 64 | |FN|Media >|Media <| | ||
diff --git a/keyboards/yushakobo/quick17/keymaps/via/keymap.c b/keyboards/yushakobo/quick17/keymaps/via/keymap.c new file mode 100644 index 000000000..a3873bc1e --- /dev/null +++ b/keyboards/yushakobo/quick17/keymaps/via/keymap.c | |||
| @@ -0,0 +1,113 @@ | |||
| 1 | /* Copyright 2021 yushakobo | ||
| 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 the keycodes used by our macros in process_record_user | ||
| 19 | enum custom_keycodes { | ||
| 20 | KC_LANG | ||
| 21 | }; | ||
| 22 | |||
| 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 24 | [_CONTROL] = LAYOUT( | ||
| 25 | KC_TAB, KC_PGUP,KC_UP, KC_PGDN,KC_HOME,KC_INS, | ||
| 26 | KC_LCTL,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, KC_DEL, | ||
| 27 | KC_LSFT,KC_LGUI,KC_ESC, KC_LALT,LT(3,KC_SPC),TO(1) | ||
| 28 | ), | ||
| 29 | [_EDIT1] = LAYOUT( | ||
| 30 | KC_ESC, KC_W, KC_E, KC_R, KC_Y, KC_BSPC, | ||
| 31 | KC_LCTL,KC_A, KC_D, KC_F, KC_H, LCTL(KC_Z), | ||
| 32 | KC_LSFT,KC_X, KC_V, KC_B, LT(2,KC_SPC),LCTL(KC_S) | ||
| 33 | ), | ||
| 34 | [_EDIT2] = LAYOUT( | ||
| 35 | KC_ESC, KC_Q, KC_BTN3,KC_INS, KC_ENT, KC_DEL, | ||
| 36 | KC_LCTL,KC_LBRC,KC_RBRC,KC_PGDN,KC_PGUP,LCTL(KC_Y), | ||
| 37 | KC_LSFT,TO(3), RGB_TOG,TO(0), _______,KC_NO | ||
| 38 | ), | ||
| 39 | [_FN] = LAYOUT( | ||
| 40 | KC_ESC, KC_LANG,KC_NO, RGB_TOG,KC_MNXT,KC_VOLU, | ||
| 41 | KC_CAPS,KC_NLCK,KC_NO, RGB_MOD,KC_MPRV,KC_VOLD, | ||
| 42 | CG_NORM,LCG_SWP,EEP_RST,RESET, TO(0), KC_MUTE | ||
| 43 | ) | ||
| 44 | }; | ||
| 45 | |||
| 46 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 47 | switch (keycode) { | ||
| 48 | case KC_LANG: | ||
| 49 | if (record->event.pressed){ | ||
| 50 | if (keymap_config.swap_lctl_lgui == false){ | ||
| 51 | tap_code16(LALT(KC_GRV)); | ||
| 52 | } else { | ||
| 53 | if(input_mode()){ | ||
| 54 | register_code(KC_LANG2); | ||
| 55 | set_input_mode(false); | ||
| 56 | } else { | ||
| 57 | register_code(KC_LANG1); | ||
| 58 | set_input_mode(true); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } else { | ||
| 62 | unregister_code(KC_LANG1); | ||
| 63 | unregister_code(KC_LANG2); | ||
| 64 | } | ||
| 65 | break; | ||
| 66 | default: | ||
| 67 | break; | ||
| 68 | } | ||
| 69 | return true; | ||
| 70 | } | ||
| 71 | |||
| 72 | bool encoder_update_user(uint8_t index, bool clockwise){ | ||
| 73 | if (index == 0) { | ||
| 74 | if (IS_LAYER_ON(_EDIT2)){ | ||
| 75 | if (clockwise) { | ||
| 76 | tap_code(KC_LBRC); | ||
| 77 | } else { | ||
| 78 | tap_code(KC_RBRC); | ||
| 79 | } | ||
| 80 | } else if (IS_LAYER_ON(_EDIT1)){ | ||
| 81 | if (clockwise) { | ||
| 82 | tap_code(KC_VOLU); | ||
| 83 | } else { | ||
| 84 | tap_code(KC_VOLD); | ||
| 85 | } | ||
| 86 | } else if (IS_LAYER_ON(_FN)){ | ||
| 87 | if (clockwise) { | ||
| 88 | tap_code(KC_MNXT); | ||
| 89 | } else { | ||
| 90 | tap_code(KC_MPRV); | ||
| 91 | } | ||
| 92 | } else { // IS_LAYER_ON(_CONTROL) | ||
| 93 | if (clockwise) { | ||
| 94 | tap_code(KC_WH_U); | ||
| 95 | } else { | ||
| 96 | tap_code(KC_WH_D); | ||
| 97 | } | ||
| 98 | } | ||
| 99 | } | ||
| 100 | return false; | ||
| 101 | } | ||
| 102 | |||
| 103 | #ifdef RGB_MATRIX_ENABLE | ||
| 104 | void keyboard_post_init_user(void){ | ||
| 105 | rgb_matrix_mode(RGB_MATRIX_CUSTOM_quick17_rgbm_effect); | ||
| 106 | set_input_mode(false); | ||
| 107 | } | ||
| 108 | #else | ||
| 109 | void keyboard_post_init_user(void){ | ||
| 110 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); | ||
| 111 | set_input_mode(false); | ||
| 112 | } | ||
| 113 | #endif | ||
diff --git a/keyboards/yushakobo/quick17/keymaps/via/readme.md b/keyboards/yushakobo/quick17/keymaps/via/readme.md new file mode 100644 index 000000000..da0923539 --- /dev/null +++ b/keyboards/yushakobo/quick17/keymaps/via/readme.md | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | # The via keymap for quick17 | ||
| 2 | |||
| 3 | ## CONTROL(default) Layer | ||
| 4 | ``` | ||
| 5 | ,-----------------------------------------------. | ||
| 6 | | Tab | PgUp | Up | PgDn | Home | Ins | | ||
| 7 | |-------+-------+-------+-------+-------+-------| | ||
| 8 | | Ctrl | Left | Down | Right | End | Del | | ||
| 9 | |-------+-------+-------+-------+-------+-------| | ||
| 10 | | Shift | GUI | Esc | Alt | FN/Spc| EDIT1 | | ||
| 11 | `-----------------------------------------------' | ||
| 12 | ``` | ||
| 13 | |||
| 14 | ## EDIT1 Layer | ||
| 15 | ``` | ||
| 16 | ,--------------------------------------------------. | ||
| 17 | | Esc | W | E | R | Y | Bspc | | ||
| 18 | |-------+-------+-------+-------+---------+--------| | ||
| 19 | | Ctrl | A | D | F | H | Ctrl+Z | | ||
| 20 | |-------+-------+-------+-------+---------+--------| | ||
| 21 | | Shift | X | V | B |EDIT2/Spc| Ctrl+S | | ||
| 22 | `--------------------------------------------------' | ||
| 23 | ``` | ||
| 24 | |||
| 25 | ## EDIT2 Layer | ||
| 26 | ``` | ||
| 27 | ,-------------------------------------------------. | ||
| 28 | | Esc | Q | BTN3 | Ins | Enter | Bspc | | ||
| 29 | |-------+-------+-------+-------+--------+--------| | ||
| 30 | | Ctrl | [ | ] | PgDn | PgUp | Ctrl+Z | | ||
| 31 | |-------+-------+-------+-------+--------+--------| | ||
| 32 | | Shift | FN |RGB_TOG|CONTROL| (NONE) | (NONE) | | ||
| 33 | `-------------------------------------------------' | ||
| 34 | ``` | ||
| 35 | |||
| 36 | ## FN Layer | ||
| 37 | ``` | ||
| 38 | ,---------------------------------------------------. | ||
| 39 | | Esc | LANG | (NONE) |RGB_TOG| Media > | Vol+ | | ||
| 40 | |-------+-------+--------+-------+---------+--------| | ||
| 41 | | Caps | Numlk | (NONE) |RGB_MOD| Media < | Vol- | | ||
| 42 | |-------+-------+--------+-------+---------+--------| | ||
| 43 | | Win | mac | EEP_RST| RESET | CONTROL | Mute | | ||
| 44 | `---------------------------------------------------' | ||
| 45 | ``` | ||
| 46 | ### difference between mac-Mode and Win-Mode | ||
| 47 | - In mac Mode, `Ctrl` key will be changed into `command` key. | ||
| 48 | - `LANG` key will change its behaviour. | ||
| 49 | |||
| 50 | ### "LANG" key behaviour | ||
| 51 | |||
| 52 | - mac Mode: cycle around "かな" and "英数" | ||
| 53 | - Win Mode: key combinations of Alt and ` | ||
| 54 | |||
| 55 | ## Rotary encoder behaviour | ||
| 56 | |||
| 57 | |On layer...|Clockwise|C-Clockwise| | ||
| 58 | |---|---|---| | ||
| 59 | |CONTROL|Scroll Up|Scroll Down| | ||
| 60 | |EDIT1|Vol+|Vol-| | ||
| 61 | |EDIT2|[|]| | ||
| 62 | |FN|Media >|Media <| | ||
diff --git a/keyboards/yushakobo/quick17/keymaps/via/rules.mk b/keyboards/yushakobo/quick17/keymaps/via/rules.mk new file mode 100644 index 000000000..b5502db7c --- /dev/null +++ b/keyboards/yushakobo/quick17/keymaps/via/rules.mk | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | RGBLIGHT_ENABLE = yes | ||
| 3 | RGB_MATRIX_ENABLE = no \ No newline at end of file | ||
diff --git a/keyboards/yushakobo/quick17/quick17.c b/keyboards/yushakobo/quick17/quick17.c new file mode 100644 index 000000000..ed9fe9709 --- /dev/null +++ b/keyboards/yushakobo/quick17/quick17.c | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* Copyright 2021 yushakobo | ||
| 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 "quick17.h" | ||
| 18 | |||
| 19 | #ifdef RGB_MATRIX_ENABLE | ||
| 20 | led_config_t g_led_config = { | ||
| 21 | { | ||
| 22 | {12, 13, 14, 15, 16, 17}, | ||
| 23 | {0, 1, 11, 10, 9, 8}, | ||
| 24 | {2, 3, 4, 5, 6, 7} | ||
| 25 | }, | ||
| 26 | { | ||
| 27 | {0,32}, {44,32}, {0,64}, {44,64}, {89,64}, {134,64}, | ||
| 28 | {179,64},{224,64},{224,32},{179,32},{134,32},{89,32}, | ||
| 29 | {0,0}, {44,0}, {89,0}, {134,0}, {179,0}, {224,0} | ||
| 30 | }, | ||
| 31 | { | ||
| 32 | 4, 4, 4, 4, 4, 4, | ||
| 33 | 4, 4, 4, 4, 4, 4, | ||
| 34 | 4, 4, 4, 4, 4, 4 | ||
| 35 | } | ||
| 36 | }; | ||
| 37 | #endif | ||
diff --git a/keyboards/yushakobo/quick17/quick17.h b/keyboards/yushakobo/quick17/quick17.h new file mode 100644 index 000000000..566df7106 --- /dev/null +++ b/keyboards/yushakobo/quick17/quick17.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* Copyright 2021 yushakobo | ||
| 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 | k00, k01, k02, k03, k04, k05, \ | ||
| 31 | k10, k11, k12, k13, k14, k15, \ | ||
| 32 | k20, k21, k22, k23, k24, k25 \ | ||
| 33 | ) \ | ||
| 34 | { \ | ||
| 35 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 36 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 37 | { k20, k21, k22, k23, k24, k25 } \ | ||
| 38 | } | ||
diff --git a/keyboards/yushakobo/quick17/quick17_prefs.c b/keyboards/yushakobo/quick17/quick17_prefs.c new file mode 100644 index 000000000..1a546f4e3 --- /dev/null +++ b/keyboards/yushakobo/quick17/quick17_prefs.c | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* Copyright 2021 yushakobo | ||
| 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 | bool _INPUT_JP; | ||
| 20 | |||
| 21 | void set_input_mode(bool _mode_jaen){ | ||
| 22 | _INPUT_JP = _mode_jaen; | ||
| 23 | // japanese -> true | ||
| 24 | // english -> false | ||
| 25 | } | ||
| 26 | |||
| 27 | bool input_mode(void){ | ||
| 28 | return _INPUT_JP; | ||
| 29 | } | ||
diff --git a/keyboards/yushakobo/quick17/quick17_prefs.h b/keyboards/yushakobo/quick17/quick17_prefs.h new file mode 100644 index 000000000..4d81d163b --- /dev/null +++ b/keyboards/yushakobo/quick17/quick17_prefs.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* Copyright 2021 yushakobo | ||
| 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 | enum layer_names { | ||
| 18 | _CONTROL, | ||
| 19 | _EDIT1, | ||
| 20 | _EDIT2, | ||
| 21 | _FN | ||
| 22 | }; | ||
| 23 | |||
| 24 | #define _HSV(H, S, V) (HSV){ .h = H, .s = S, .v = V } | ||
| 25 | #define _RGB(rgb) rgb.r, rgb.g, rgb.b | ||
| 26 | |||
| 27 | bool input_mode(void); | ||
| 28 | void set_input_mode(bool _mode_jaen); | ||
diff --git a/keyboards/yushakobo/quick17/readme.md b/keyboards/yushakobo/quick17/readme.md new file mode 100644 index 000000000..672cee331 --- /dev/null +++ b/keyboards/yushakobo/quick17/readme.md | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # quick17 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A simple macropad for the beginners | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [yushakobo](https://github.com/yushakobo) | ||
| 8 | * Hardware Supported: Quick17 PCBs, Pro Micro (ATmega32u4) | ||
| 9 | * Hardware Availability: [yushakobo shop](https://shop.yushakobo.jp/products/quick17) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make quick17:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make quick17: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). | ||
diff --git a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc new file mode 100644 index 000000000..87738389b --- /dev/null +++ b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc | |||
| @@ -0,0 +1,117 @@ | |||
| 1 | RGB_MATRIX_EFFECT(quick17_rgbm_effect) | ||
| 2 | |||
| 3 | #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS | ||
| 4 | |||
| 5 | #include "quick17_prefs.h" | ||
| 6 | |||
| 7 | #define LED_LAYOUT(\ | ||
| 8 | L00, L01, L02, L03, L04, L05, \ | ||
| 9 | L10, L11, L12, L13, L14, L15, \ | ||
| 10 | L20, L21, L22, L23, L24, L25 \ | ||
| 11 | ) {\ | ||
| 12 | L10, L11, L20, L21, L22, L23,\ | ||
| 13 | L24, L25, L15, L14, L13, L12,\ | ||
| 14 | L00, L01, L02, L03, L04, L05\ | ||
| 15 | } | ||
| 16 | |||
| 17 | enum lighting_types { | ||
| 18 | BOUT, | ||
| 19 | _____, | ||
| 20 | INDC1, | ||
| 21 | INDC2, | ||
| 22 | INDC3, | ||
| 23 | INDC4, | ||
| 24 | INDC5, | ||
| 25 | JA_EN, | ||
| 26 | CAPSL, | ||
| 27 | NUM_L | ||
| 28 | }; | ||
| 29 | |||
| 30 | const uint8_t rgb_keymaps [][DRIVER_LED_TOTAL] = { | ||
| 31 | [_CONTROL] = LED_LAYOUT( | ||
| 32 | _____, INDC2, INDC1, INDC2, INDC3, INDC4, | ||
| 33 | _____, INDC1, INDC1, INDC1, INDC3, INDC4, | ||
| 34 | _____, _____, _____, _____, INDC5, INDC5 | ||
| 35 | ), | ||
| 36 | [_EDIT1] = LED_LAYOUT( | ||
| 37 | _____, _____, _____, _____, _____, INDC4, | ||
| 38 | _____, _____, _____, _____, _____, INDC1, | ||
| 39 | _____, _____, _____, _____, INDC5, INDC1 | ||
| 40 | ), | ||
| 41 | [_EDIT2] = LED_LAYOUT( | ||
| 42 | _____, _____, _____, _____, _____, INDC4, | ||
| 43 | _____, _____, _____, _____, _____, INDC1, | ||
| 44 | _____, INDC5, INDC3, INDC5, INDC5, BOUT | ||
| 45 | ), | ||
| 46 | [_FN] = LED_LAYOUT( | ||
| 47 | _____, JA_EN, BOUT, INDC3, INDC4, INDC4, | ||
| 48 | CAPSL, NUM_L, BOUT, INDC3, INDC4, INDC4, | ||
| 49 | INDC2, INDC2, INDC1, INDC1, INDC5, INDC4 | ||
| 50 | ) | ||
| 51 | }; | ||
| 52 | |||
| 53 | static void led_color_set(uint8_t index, uint8_t color_patterns) { | ||
| 54 | HSV hsv = rgb_matrix_config.hsv; // 'quantum/rgblight_list.h' | ||
| 55 | RGB rgb_white = hsv_to_rgb(_HSV( 0, 0, hsv.v)); // HSV_WHITE | ||
| 56 | RGB rgb_indc1 = hsv_to_rgb(_HSV(128, 255, hsv.v)); // HSV_TEAL | ||
| 57 | RGB rgb_indc2 = hsv_to_rgb(_HSV(191, 255, hsv.v)); // HSV_PURPLE | ||
| 58 | RGB rgb_indc3 = hsv_to_rgb(_HSV( 64, 255, hsv.v)); // HSV_CHARTREUSE | ||
| 59 | RGB rgb_indc4 = hsv_to_rgb(_HSV(106, 255, hsv.v)); // HSV_SPRINGGREEN | ||
| 60 | RGB rgb_indc5 = hsv_to_rgb(_HSV(234, 128, hsv.v)); // HSV_PINK | ||
| 61 | RGB rgb_indc6 = hsv_to_rgb(_HSV(213, 255, hsv.v)); // HSV_MAGENTA | ||
| 62 | RGB rgb_indc_ja = hsv_to_rgb(_HSV( 0, 255, hsv.v)); // HSV_RED | ||
| 63 | RGB rgb_indc_en = hsv_to_rgb(_HSV( 85, 255, hsv.v)); // HSV_GREEN | ||
| 64 | RGB rgb_indc_win = hsv_to_rgb(_HSV(170, 255, hsv.v)); // HSV_BLUE | ||
| 65 | switch(color_patterns){ | ||
| 66 | case BOUT: rgb_matrix_set_color(index, RGB_BLACK); break; | ||
| 67 | case _____: rgb_matrix_set_color(index, _RGB(rgb_white)); break; | ||
| 68 | case INDC1: rgb_matrix_set_color(index, _RGB(rgb_indc1)); break; | ||
| 69 | case INDC2: rgb_matrix_set_color(index, _RGB(rgb_indc2)); break; | ||
| 70 | case INDC3: rgb_matrix_set_color(index, _RGB(rgb_indc3)); break; | ||
| 71 | case INDC4: rgb_matrix_set_color(index, _RGB(rgb_indc4)); break; | ||
| 72 | case INDC5: rgb_matrix_set_color(index, _RGB(rgb_indc5)); break; | ||
| 73 | case JA_EN: | ||
| 74 | if (keymap_config.swap_lctl_lgui == false) { | ||
| 75 | rgb_matrix_set_color(index, _RGB(rgb_indc_win)); | ||
| 76 | } else { | ||
| 77 | if (input_mode()){ | ||
| 78 | rgb_matrix_set_color(index, _RGB(rgb_indc_ja)); | ||
| 79 | } else { | ||
| 80 | rgb_matrix_set_color(index, _RGB(rgb_indc_en)); | ||
| 81 | } | ||
| 82 | } | ||
| 83 | break; | ||
| 84 | case CAPSL: | ||
| 85 | if (host_keyboard_led_state().caps_lock) { | ||
| 86 | rgb_matrix_set_color(index, _RGB(rgb_indc6)); | ||
| 87 | } else { | ||
| 88 | rgb_matrix_set_color(index, _RGB(rgb_white)); | ||
| 89 | } | ||
| 90 | break; | ||
| 91 | case NUM_L: | ||
| 92 | if (host_keyboard_led_state().num_lock) { | ||
| 93 | rgb_matrix_set_color(index, _RGB(rgb_indc6)); | ||
| 94 | } else { | ||
| 95 | rgb_matrix_set_color(index, _RGB(rgb_white)); | ||
| 96 | } | ||
| 97 | break; | ||
| 98 | } | ||
| 99 | } | ||
| 100 | |||
| 101 | static bool quick17_rgbm_effect (effect_params_t* params) { | ||
| 102 | RGB_MATRIX_USE_LIMITS(led_min, led_max); | ||
| 103 | for (uint8_t i = led_min; i < led_max; i++) { | ||
| 104 | if (IS_LAYER_ON(_EDIT2)){ | ||
| 105 | led_color_set(i, rgb_keymaps[_EDIT2][i]); | ||
| 106 | } else if (IS_LAYER_ON(_EDIT1)){ | ||
| 107 | led_color_set(i, rgb_keymaps[_EDIT1][i]); | ||
| 108 | } else if (IS_LAYER_ON(_FN)){ | ||
| 109 | led_color_set(i, rgb_keymaps[_FN][i]); | ||
| 110 | } else { // IS_LAYER_ON(_CONTROL) | ||
| 111 | led_color_set(i, rgb_keymaps[_CONTROL][i]); | ||
| 112 | } | ||
| 113 | } | ||
| 114 | return led_max < DRIVER_LED_TOTAL; | ||
| 115 | } | ||
| 116 | |||
| 117 | #endif | ||
diff --git a/keyboards/yushakobo/quick17/rules.mk b/keyboards/yushakobo/quick17/rules.mk new file mode 100644 index 000000000..fc036091a --- /dev/null +++ b/keyboards/yushakobo/quick17/rules.mk | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = 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 = no # 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 | ||
| 23 | |||
| 24 | RGB_MATRIX_ENABLE = yes | ||
| 25 | RGB_MATRIX_DRIVER = WS2812 | ||
| 26 | RGB_MATRIX_CUSTOM_KB = yes | ||
| 27 | |||
| 28 | SRC += quick17_prefs.c | ||
