diff options
| author | MakotoKurauchi <pluis@me.com> | 2020-09-22 05:40:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-21 13:40:53 -0700 |
| commit | b3508271f86c553b96eb3d2537d6d46423157e15 (patch) | |
| tree | 491746db65757921b6b96f47f49bde2f26807716 /keyboards/yushakobo | |
| parent | c4eb0df428946402247fbf3b0590bc6921661e75 (diff) | |
| download | qmk_firmware-b3508271f86c553b96eb3d2537d6d46423157e15.tar.gz qmk_firmware-b3508271f86c553b96eb3d2537d6d46423157e15.zip | |
add VIA support for Quick7 (#10281)
* update "Hardware Availability"
* add a section of "How to build"
* update "Hardware Supported"
* add VIA keymaps
* add 2 layers to VIA keymaps
Co-authored-by: keyaki-namiki <28521374+keyaki-namiki@users.noreply.github.com>
Diffstat (limited to 'keyboards/yushakobo')
| -rw-r--r-- | keyboards/yushakobo/quick7/keymaps/via/keymap.c | 84 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick7/keymaps/via/readme.md | 27 | ||||
| -rw-r--r-- | keyboards/yushakobo/quick7/keymaps/via/rules.mk | 1 |
3 files changed, 112 insertions, 0 deletions
diff --git a/keyboards/yushakobo/quick7/keymaps/via/keymap.c b/keyboards/yushakobo/quick7/keymaps/via/keymap.c new file mode 100644 index 000000000..9c64042bc --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/keymap.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* Copyright 2020 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 names for use in layer keycodes and the keymap | ||
| 19 | enum layer_names { | ||
| 20 | _BASE, | ||
| 21 | _FUNC1, | ||
| 22 | _VIA1, | ||
| 23 | _VIA2 | ||
| 24 | }; | ||
| 25 | |||
| 26 | // Defines the keycodes used by our macros in process_record_user | ||
| 27 | enum custom_keycodes { | ||
| 28 | YUSHAURL = SAFE_RANGE | ||
| 29 | }; | ||
| 30 | |||
| 31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 32 | /* Base */ | ||
| 33 | [_BASE] = LAYOUT( | ||
| 34 | KC_MUTE, MO(_FUNC1), RGB_MOD, | ||
| 35 | S(KC_TAB), KC_UP, KC_TAB, | ||
| 36 | KC_LEFT, KC_DOWN, KC_RGHT | ||
| 37 | ), | ||
| 38 | [_FUNC1] = LAYOUT( | ||
| 39 | RESET, KC_TRNS, RGB_TOG, | ||
| 40 | KC_HOME, KC_VOLU, KC_END, | ||
| 41 | KC_MPRV, KC_VOLD, KC_MNXT | ||
| 42 | ), | ||
| 43 | [_VIA1] = LAYOUT( | ||
| 44 | YUSHAURL,XXXXXXX, XXXXXXX, | ||
| 45 | XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 46 | XXXXXXX, XXXXXXX, XXXXXXX | ||
| 47 | ), | ||
| 48 | [_VIA2] = LAYOUT( | ||
| 49 | XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 50 | XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 51 | XXXXXXX, XXXXXXX, XXXXXXX | ||
| 52 | ) | ||
| 53 | }; | ||
| 54 | |||
| 55 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 56 | switch (keycode) { | ||
| 57 | case YUSHAURL: | ||
| 58 | if (record->event.pressed) { | ||
| 59 | // when keycode QMKURL is pressed | ||
| 60 | SEND_STRING("https://yushakobo.jp/\n"); | ||
| 61 | } else { | ||
| 62 | // when keycode QMKURL is released | ||
| 63 | } | ||
| 64 | break; | ||
| 65 | } | ||
| 66 | return true; | ||
| 67 | } | ||
| 68 | |||
| 69 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 70 | if (index == 0) { // Left encoder | ||
| 71 | if (clockwise) { | ||
| 72 | tap_code(KC_VOLU); | ||
| 73 | } else { | ||
| 74 | tap_code(KC_VOLD); | ||
| 75 | } | ||
| 76 | } | ||
| 77 | else if (index == 1) { // Right encoder | ||
| 78 | if (clockwise) { | ||
| 79 | rgblight_decrease_hue_noeeprom(); | ||
| 80 | } else { | ||
| 81 | rgblight_increase_hue_noeeprom(); | ||
| 82 | } | ||
| 83 | } | ||
| 84 | } | ||
diff --git a/keyboards/yushakobo/quick7/keymaps/via/readme.md b/keyboards/yushakobo/quick7/keymaps/via/readme.md new file mode 100644 index 000000000..ff0978780 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/readme.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # The default VIA keymap for quick7 | ||
| 2 | |||
| 3 | #### Rotary Encoder is not configurable through VIA | ||
| 4 | |||
| 5 | ### Base Layer | ||
| 6 | ``` | ||
| 7 | Left Encoder(CW: Vol+, CCW: Vol-) | ||
| 8 | Right Encoder(CW: RGB HUE-, CCW: RGB HUE+) | ||
| 9 | ,----------- --------- ------------, | ||
| 10 | | MUTE | Func1 | RGB MODE | | ||
| 11 | ----------- --------- ------------ | ||
| 12 | | Shift+Tab | UP | TAB | | ||
| 13 | ----------- --------- ------------ | ||
| 14 | | LEFT | DOWN | RIGHT | | ||
| 15 | `----------- --------- ------------' | ||
| 16 | ``` | ||
| 17 | |||
| 18 | ### Func1 Layer | ||
| 19 | ``` | ||
| 20 | ,----------- --------- ------------, | ||
| 21 | | RESET | Func1 | RGB TOGGLE | | ||
| 22 | ----------- --------- ------------ | ||
| 23 | | HOME | VOL+ | END | | ||
| 24 | ----------- --------- ------------ | ||
| 25 | | MEDIA << | VOL- | MEDIA >> | | ||
| 26 | `----------- --------- ------------' | ||
| 27 | ``` \ No newline at end of file | ||
diff --git a/keyboards/yushakobo/quick7/keymaps/via/rules.mk b/keyboards/yushakobo/quick7/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes \ No newline at end of file | |||
