diff options
| author | HorrorTroll <sonicvipduc@gmail.com> | 2022-01-15 14:26:26 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-14 23:26:26 -0800 |
| commit | b2ea12aaa50a47e3a142fc334018873f2a05b8b2 (patch) | |
| tree | 3381494ce194b30544466083b103874c8457ae45 | |
| parent | 2e266c7ec1298edea38854495878563e9b2e381b (diff) | |
| download | qmk_firmware-b2ea12aaa50a47e3a142fc334018873f2a05b8b2.tar.gz qmk_firmware-b2ea12aaa50a47e3a142fc334018873f2a05b8b2.zip | |
[Keyboard] Add Devil68 Pro (#15820)
14 files changed, 758 insertions, 0 deletions
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h new file mode 100644 index 000000000..825b6d3e5 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> | ||
| 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 "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0x7516 | ||
| 23 | #define PRODUCT_ID 0x6001 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER HorrorTroll | ||
| 26 | #define PRODUCT Devil68 Pro | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 5 | ||
| 30 | #define MATRIX_COLS 16 | ||
| 31 | |||
| 32 | /* key matrix pins */ | ||
| 33 | #define MATRIX_ROW_PINS { B7, B3, B2, F6, F7 } | ||
| 34 | #define MATRIX_COL_PINS { B1, B0, B5, B6, C6, C7, E2, D0, D1, D2, D3, D5, D4, D6, D7, B4 } | ||
| 35 | |||
| 36 | #define BOOTMAGIC_LITE_ROW 3 | ||
| 37 | #define BOOTMAGIC_LITE_COLUMN 6 | ||
| 38 | |||
| 39 | /* COL2ROW or ROW2COL */ | ||
| 40 | #define DIODE_DIRECTION COL2ROW | ||
| 41 | |||
| 42 | /* Set 0 if debouncing isn't needed */ | ||
| 43 | #define DEBOUNCE 5 | ||
| 44 | |||
| 45 | /* Forcing to use NKRO instead 6KRO */ | ||
| 46 | #define FORCE_NKRO | ||
| 47 | |||
| 48 | /* Change USB Polling Rate to 1000hz and a larger keys per scan for elite gaming */ | ||
| 49 | #define USB_POLLING_INTERVAL_MS 1 | ||
| 50 | #define QMK_KEYS_PER_SCAN 12 | ||
| 51 | |||
| 52 | #ifdef RGB_MATRIX_ENABLE | ||
| 53 | #define DRIVER_LED_TOTAL 86 | ||
| 54 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 | ||
| 55 | #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 56 | #define RGB_MATRIX_KEYPRESSES | ||
| 57 | |||
| 58 | /* RGB Matrix config */ | ||
| 59 | #define RGB_DI_PIN E6 | ||
| 60 | |||
| 61 | /* RGB Matrix effect */ | ||
| 62 | #define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
| 63 | #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
| 64 | #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
| 65 | #define ENABLE_RGB_MATRIX_BREATHING | ||
| 66 | #define ENABLE_RGB_MATRIX_BAND_SAT | ||
| 67 | #define ENABLE_RGB_MATRIX_BAND_VAL | ||
| 68 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
| 69 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
| 70 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
| 71 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
| 72 | #define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
| 73 | #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
| 74 | #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
| 75 | #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
| 76 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
| 77 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
| 78 | #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
| 79 | #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
| 80 | #define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
| 81 | #define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
| 82 | #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
| 83 | #define ENABLE_RGB_MATRIX_RAINDROPS | ||
| 84 | #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
| 85 | #define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
| 86 | #define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
| 87 | #define ENABLE_RGB_MATRIX_HUE_WAVE | ||
| 88 | #define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
| 89 | #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL | ||
| 90 | // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined | ||
| 91 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
| 92 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
| 93 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
| 94 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
| 95 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
| 96 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
| 97 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
| 98 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
| 99 | #define ENABLE_RGB_MATRIX_SPLASH | ||
| 100 | #define ENABLE_RGB_MATRIX_MULTISPLASH | ||
| 101 | #define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
| 102 | #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
| 103 | #endif | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c new file mode 100644 index 000000000..d8f581df6 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.c | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> | ||
| 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 "devil68_pro.h" | ||
| 18 | |||
| 19 | #ifdef RGB_MATRIX_ENABLE | ||
| 20 | led_config_t g_led_config = { { | ||
| 21 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14 }, | ||
| 22 | { 15, NO_LED, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, | ||
| 23 | { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43 }, | ||
| 24 | { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, NO_LED, 55, 56, 57 }, | ||
| 25 | { 58, 59, NO_LED, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 64, 62, 63, 65, 66, 67 } | ||
| 26 | }, { | ||
| 27 | // Key matrix (0 -> 67) | ||
| 28 | {0 , 0}, {15 , 0}, {30 , 0}, {45 , 0}, {60 , 0}, {75 , 0}, {90 , 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {202, 0}, {224, 0}, | ||
| 29 | {3 , 16}, {21 , 16}, {36 , 16}, {51 , 16}, {66 , 16}, {81 , 16}, {96 , 16}, {111, 16}, {126, 16}, {141, 16}, {156, 16}, {171, 16}, {186, 16}, {205, 16}, {224, 16}, | ||
| 30 | {5 , 32}, {25 , 32}, {40 , 32}, {55 , 32}, {70 , 32}, {85 , 32}, {100, 32}, {115, 32}, {130, 32}, {145, 32}, {160, 32}, {175, 32}, {200, 32}, {224, 32}, | ||
| 31 | {8 , 48}, {31 , 48}, {46 , 48}, {61 , 48}, {76 , 48}, {91 , 48}, {106, 48}, {121, 48}, {136, 48}, {151, 48}, {166, 48}, {188, 48}, {210, 48}, {224, 48}, | ||
| 32 | {2 , 64}, {19 , 64}, {36 , 64}, {96 , 64}, {149, 64}, {164, 64}, {179, 64}, {194, 64}, {209, 64}, {224, 64}, | ||
| 33 | |||
| 34 | // Underglow (68 -> 85) | ||
| 35 | {210, 60}, {186, 12}, {158, 12}, {130, 12}, {101, 12}, {71 , 12}, {39 , 12}, {13 , 12}, {13 , 35}, | ||
| 36 | {13 , 12}, {39 , 12}, {71 , 12}, {101, 12}, {130, 12}, {158, 12}, {186, 12}, {210, 12}, {210, 35}, | ||
| 37 | }, { | ||
| 38 | // Key matrix (0 -> 67) | ||
| 39 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, | ||
| 40 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 41 | 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, | ||
| 42 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, | ||
| 43 | 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, | ||
| 44 | |||
| 45 | // Underglow (68 -> 85) | ||
| 46 | 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 47 | 2, 2, 2, 2, 2, 2, 2, 2, 2 | ||
| 48 | } }; | ||
| 49 | #endif | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.h b/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.h new file mode 100644 index 000000000..0c83132f5 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/devil68_pro.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> | ||
| 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 | /* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 24 | * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0E │0F │ | ||
| 25 | * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 26 | * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1E │1F │ | ||
| 27 | * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 28 | * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │2D │2F │ | ||
| 29 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 30 | * │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3D │3E │3F │ | ||
| 31 | * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 32 | * │40 │41 │43 │46 │4A │4B │4C │4D │4E │4F │ | ||
| 33 | * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 34 | */ | ||
| 35 | |||
| 36 | #define LAYOUT_65_ansi( \ | ||
| 37 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ | ||
| 38 | K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ | ||
| 39 | K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ | ||
| 40 | K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ | ||
| 41 | K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \ | ||
| 42 | ) { \ | ||
| 43 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, XXX, K0E, K0F }, \ | ||
| 44 | { K10, XXX, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ | ||
| 45 | { K20, XXX, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, XXX, K2F }, \ | ||
| 46 | { XXX, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ | ||
| 47 | { K40, K41, XXX, K43, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F } \ | ||
| 48 | } | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/info.json b/keyboards/horrortroll/chinese_pcb/devil68_pro/info.json new file mode 100644 index 000000000..9e7f4524a --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/info.json | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Devil68 Pro", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "HorrorTroll", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT_65_ansi": { | ||
| 7 | "layout": [ | ||
| 8 | {"label":"Esc", "x":0, "y":0}, | ||
| 9 | {"label":"1!", "x":1, "y":0}, | ||
| 10 | {"label":"2@", "x":2, "y":0}, | ||
| 11 | {"label":"3#", "x":3, "y":0}, | ||
| 12 | {"label":"4$", "x":4, "y":0}, | ||
| 13 | {"label":"5%", "x":5, "y":0}, | ||
| 14 | {"label":"6^", "x":6, "y":0}, | ||
| 15 | {"label":"7&", "x":7, "y":0}, | ||
| 16 | {"label":"8*", "x":8, "y":0}, | ||
| 17 | {"label":"9(", "x":9, "y":0}, | ||
| 18 | {"label":"0)", "x":10, "y":0}, | ||
| 19 | {"label":"-_", "x":11, "y":0}, | ||
| 20 | {"label":"=+", "x":12, "y":0}, | ||
| 21 | {"label":"Backspace", "x":13, "y":0, "w":2}, | ||
| 22 | {"label":"`~", "x":15, "y":0}, | ||
| 23 | |||
| 24 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
| 25 | {"label":"Q", "x":1.5, "y":1}, | ||
| 26 | {"label":"W", "x":2.5, "y":1}, | ||
| 27 | {"label":"E", "x":3.5, "y":1}, | ||
| 28 | {"label":"R", "x":4.5, "y":1}, | ||
| 29 | {"label":"T", "x":5.5, "y":1}, | ||
| 30 | {"label":"Y", "x":6.5, "y":1}, | ||
| 31 | {"label":"U", "x":7.5, "y":1}, | ||
| 32 | {"label":"I", "x":8.5, "y":1}, | ||
| 33 | {"label":"O", "x":9.5, "y":1}, | ||
| 34 | {"label":"P", "x":10.5, "y":1}, | ||
| 35 | {"label":"[{", "x":11.5, "y":1}, | ||
| 36 | {"label":"]}", "x":12.5, "y":1}, | ||
| 37 | {"label":"\\|", "x":13.5, "y":1, "w":1.5}, | ||
| 38 | {"label":"Delete", "x":15, "y":1}, | ||
| 39 | |||
| 40 | {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, | ||
| 41 | {"label":"A", "x":1.75, "y":2}, | ||
| 42 | {"label":"S", "x":2.75, "y":2}, | ||
| 43 | {"label":"D", "x":3.75, "y":2}, | ||
| 44 | {"label":"F", "x":4.75, "y":2}, | ||
| 45 | {"label":"G", "x":5.75, "y":2}, | ||
| 46 | {"label":"H", "x":6.75, "y":2}, | ||
| 47 | {"label":"J", "x":7.75, "y":2}, | ||
| 48 | {"label":"K", "x":8.75, "y":2}, | ||
| 49 | {"label":"L", "x":9.75, "y":2}, | ||
| 50 | {"label":";:", "x":10.75, "y":2}, | ||
| 51 | {"label":"'\"", "x":11.75, "y":2}, | ||
| 52 | {"label":"Enter", "x":12.75, "y":2, "w":2.25}, | ||
| 53 | {"label":"PgUp", "x":15, "y":2}, | ||
| 54 | |||
| 55 | {"label":"Shift", "x":0, "y":3, "w":2.25}, | ||
| 56 | {"label":"Z", "x":2.25, "y":3}, | ||
| 57 | {"label":"X", "x":3.25, "y":3}, | ||
| 58 | {"label":"C", "x":4.25, "y":3}, | ||
| 59 | {"label":"V", "x":5.25, "y":3}, | ||
| 60 | {"label":"B", "x":6.25, "y":3}, | ||
| 61 | {"label":"N", "x":7.25, "y":3}, | ||
| 62 | {"label":"M", "x":8.25, "y":3}, | ||
| 63 | {"label":",<", "x":9.25, "y":3}, | ||
| 64 | {"label":".>", "x":10.25, "y":3}, | ||
| 65 | {"label":"/?", "x":11.25, "y":3}, | ||
| 66 | {"label":"Shift", "x":12.25, "y":3, "w":1.75}, | ||
| 67 | {"label":"\u2191", "x":14, "y":3}, | ||
| 68 | {"label":"PgDn", "x":15, "y":3}, | ||
| 69 | |||
| 70 | {"label":"Ctrl", "x":0, "y":4, "w":1.25}, | ||
| 71 | {"label":"Win", "x":1.25, "y":4, "w":1.25}, | ||
| 72 | {"label":"Alt", "x":2.5, "y":4, "w":1.25}, | ||
| 73 | {"label":"Space", "x":3.75, "y":4, "w":6.25}, | ||
| 74 | {"label":"Alt", "x":10, "y":4}, | ||
| 75 | {"label":"Fn", "x":11, "y":4}, | ||
| 76 | {"label":"Ctrl", "x":12, "y":4}, | ||
| 77 | {"label":"\u2190", "x":13, "y":4}, | ||
| 78 | {"label":"\u2193", "x":14, "y":4}, | ||
| 79 | {"label":"\u2192", "x":15, "y":4} | ||
| 80 | ] | ||
| 81 | } | ||
| 82 | } | ||
| 83 | } | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c new file mode 100644 index 000000000..b110cf854 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c | |||
| @@ -0,0 +1,187 @@ | |||
| 1 | /* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> | ||
| 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 <string.h> | ||
| 18 | #include <math.h> | ||
| 19 | |||
| 20 | #include <lib/lib8tion/lib8tion.h> | ||
| 21 | |||
| 22 | #include QMK_KEYBOARD_H | ||
| 23 | |||
| 24 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 25 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 26 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 27 | // entirely and just use numbers. | ||
| 28 | |||
| 29 | enum layer_names { | ||
| 30 | _BASE = 0, | ||
| 31 | _FN = 1 | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum user_rgb_mode { | ||
| 35 | RGB_MODE_ALL, | ||
| 36 | RGB_MODE_KEYLIGHT, | ||
| 37 | RGB_MODE_UNDERGLOW, | ||
| 38 | RGB_MODE_NONE, | ||
| 39 | }; | ||
| 40 | |||
| 41 | typedef union { | ||
| 42 | uint32_t raw; | ||
| 43 | struct { | ||
| 44 | uint8_t rgb_mode :8; | ||
| 45 | }; | ||
| 46 | } user_config_t; | ||
| 47 | |||
| 48 | user_config_t user_config; | ||
| 49 | |||
| 50 | // enum layer_keycodes { }; | ||
| 51 | |||
| 52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 53 | |||
| 54 | /* | ||
| 55 | ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 56 | │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bakspc│ ` │ | ||
| 57 | ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 58 | │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │ \ │Del│ | ||
| 59 | ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 60 | │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ Enter │PgU│ | ||
| 61 | ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 62 | │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │ RSft │ ↑ │PgD│ | ||
| 63 | ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 64 | │LCrl│GUI │LAlt│ Space │RAt│Fn │RCl│ ← │ ↓ │ → │ | ||
| 65 | └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 66 | ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 67 | │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ ~ │ | ||
| 68 | ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 69 | │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │ | │ │ | ||
| 70 | ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 71 | │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │ │ │ | ||
| 72 | ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 73 | │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │ RSft │ │ │ | ||
| 74 | ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 75 | │ │ │ │ │ │ │ │ │ │ │ | ||
| 76 | └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 77 | */ | ||
| 78 | /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | ||
| 79 | [_BASE] = LAYOUT_65_ansi( | ||
| 80 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, | ||
| 81 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, | ||
| 82 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, | ||
| 83 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | ||
| 84 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT | ||
| 85 | ), | ||
| 86 | |||
| 87 | /* | ||
| 88 | ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 89 | │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │Rst│ | ||
| 90 | ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 91 | │ │ │ ↑ │ │ │ │ │ │Ins│ │PSc│ │ │ Hui │Mod│ | ||
| 92 | ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 93 | │ │ ← │ ↓ │ → │ │ │ │ │ │Tog│ │ │ │Hom│ | ||
| 94 | ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 95 | │ │ │ │Cal│ │ │ │Mut│VoD│VoU│ │ │Vai│End│ | ||
| 96 | ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 97 | │ │ │ │ │ │ │App│Spd│Vad│Spi│ | ||
| 98 | └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 99 | */ | ||
| 100 | /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ | ||
| 101 | [_FN] = LAYOUT_65_ansi( | ||
| 102 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, | ||
| 103 | _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, _______, RGB_HUI, RGB_MOD, | ||
| 104 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, KC_HOME, | ||
| 105 | _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, KC_END, | ||
| 106 | _______, _______, _______, _______, _______, _______, KC_APP, RGB_SPD, RGB_VAD, RGB_SPI | ||
| 107 | ), | ||
| 108 | }; | ||
| 109 | |||
| 110 | void keyboard_post_init_kb(void) { | ||
| 111 | user_config.raw = eeconfig_read_user(); | ||
| 112 | switch (user_config.rgb_mode) { | ||
| 113 | case RGB_MODE_ALL: | ||
| 114 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 115 | rgb_matrix_enable_noeeprom(); | ||
| 116 | break; | ||
| 117 | case RGB_MODE_KEYLIGHT: | ||
| 118 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); | ||
| 119 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 120 | break; | ||
| 121 | case RGB_MODE_UNDERGLOW: | ||
| 122 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 123 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 124 | break; | ||
| 125 | case RGB_MODE_NONE: | ||
| 126 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 127 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 128 | break; | ||
| 129 | } | ||
| 130 | } | ||
| 131 | |||
| 132 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 133 | switch (keycode) { | ||
| 134 | case RGB_TOG: | ||
| 135 | if (record->event.pressed) { | ||
| 136 | switch (rgb_matrix_get_flags()) { | ||
| 137 | case LED_FLAG_ALL: { | ||
| 138 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); | ||
| 139 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 140 | user_config.rgb_mode = RGB_MODE_KEYLIGHT; | ||
| 141 | } | ||
| 142 | break; | ||
| 143 | case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { | ||
| 144 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 145 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 146 | user_config.rgb_mode = RGB_MODE_UNDERGLOW; | ||
| 147 | } | ||
| 148 | break; | ||
| 149 | case (LED_FLAG_UNDERGLOW): { | ||
| 150 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 151 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 152 | user_config.rgb_mode = RGB_MODE_NONE; | ||
| 153 | } | ||
| 154 | break; | ||
| 155 | default: { | ||
| 156 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 157 | rgb_matrix_enable_noeeprom(); | ||
| 158 | user_config.rgb_mode = RGB_MODE_ALL; | ||
| 159 | } | ||
| 160 | break; | ||
| 161 | } | ||
| 162 | eeconfig_update_user(user_config.raw); | ||
| 163 | } | ||
| 164 | return false; | ||
| 165 | } | ||
| 166 | |||
| 167 | return true; | ||
| 168 | } | ||
| 169 | |||
| 170 | void rgb_matrix_indicators_user(void) { | ||
| 171 | HSV hsv = rgb_matrix_config.hsv; | ||
| 172 | uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); | ||
| 173 | hsv.h = time; | ||
| 174 | RGB rgb = hsv_to_rgb(hsv); | ||
| 175 | |||
| 176 | if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) { | ||
| 177 | if (host_keyboard_led_state().caps_lock) { | ||
| 178 | rgb_matrix_set_color(30, rgb.r, rgb.g, rgb.b); | ||
| 179 | } | ||
| 180 | } else { | ||
| 181 | if (host_keyboard_led_state().caps_lock) { | ||
| 182 | rgb_matrix_set_color(30, rgb.r, rgb.g, rgb.b); | ||
| 183 | } else { | ||
| 184 | rgb_matrix_set_color(30, 0, 0, 0); | ||
| 185 | } | ||
| 186 | } | ||
| 187 | } | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/readme.md b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/readme.md new file mode 100644 index 000000000..820d3551c --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/readme.md | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | # Default Layout | ||
| 2 | |||
| 3 | Keymap is default 68 qwerty, 65% layout | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/config.h b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/config.h new file mode 100644 index 000000000..fe6aa8c1f --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/config.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> | ||
| 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 | #define DYNAMIC_KEYMAP_LAYER_COUNT 2 | ||
| 20 | |||
| 21 | #ifdef RGB_MATRIX_ENABLE | ||
| 22 | #define VIA_QMK_RGBLIGHT_ENABLE | ||
| 23 | #endif | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c new file mode 100644 index 000000000..b110cf854 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c | |||
| @@ -0,0 +1,187 @@ | |||
| 1 | /* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> | ||
| 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 <string.h> | ||
| 18 | #include <math.h> | ||
| 19 | |||
| 20 | #include <lib/lib8tion/lib8tion.h> | ||
| 21 | |||
| 22 | #include QMK_KEYBOARD_H | ||
| 23 | |||
| 24 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 25 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 26 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 27 | // entirely and just use numbers. | ||
| 28 | |||
| 29 | enum layer_names { | ||
| 30 | _BASE = 0, | ||
| 31 | _FN = 1 | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum user_rgb_mode { | ||
| 35 | RGB_MODE_ALL, | ||
| 36 | RGB_MODE_KEYLIGHT, | ||
| 37 | RGB_MODE_UNDERGLOW, | ||
| 38 | RGB_MODE_NONE, | ||
| 39 | }; | ||
| 40 | |||
| 41 | typedef union { | ||
| 42 | uint32_t raw; | ||
| 43 | struct { | ||
| 44 | uint8_t rgb_mode :8; | ||
| 45 | }; | ||
| 46 | } user_config_t; | ||
| 47 | |||
| 48 | user_config_t user_config; | ||
| 49 | |||
| 50 | // enum layer_keycodes { }; | ||
| 51 | |||
| 52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 53 | |||
| 54 | /* | ||
| 55 | ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 56 | │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bakspc│ ` │ | ||
| 57 | ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 58 | │ Tab │ q │ w │ e │ r │ t │ y │ u │ i │ o │ p │ [ │ ] │ \ │Del│ | ||
| 59 | ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 60 | │ Caps │ a │ s │ d │ f │ g │ h │ j │ k │ l │ ; │ ' │ Enter │PgU│ | ||
| 61 | ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 62 | │ LShift │ z │ x │ c │ v │ b │ n │ m │ , │ . │ / │ RSft │ ↑ │PgD│ | ||
| 63 | ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 64 | │LCrl│GUI │LAlt│ Space │RAt│Fn │RCl│ ← │ ↓ │ → │ | ||
| 65 | └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 66 | ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 67 | │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │ │ ~ │ | ||
| 68 | ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 69 | │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │ | │ │ | ||
| 70 | ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 71 | │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " │ │ │ | ||
| 72 | ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 73 | │ LShift │ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? │ RSft │ │ │ | ||
| 74 | ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 75 | │ │ │ │ │ │ │ │ │ │ │ | ||
| 76 | └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 77 | */ | ||
| 78 | /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ | ||
| 79 | [_BASE] = LAYOUT_65_ansi( | ||
| 80 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, | ||
| 81 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, | ||
| 82 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, | ||
| 83 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | ||
| 84 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT | ||
| 85 | ), | ||
| 86 | |||
| 87 | /* | ||
| 88 | ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ | ||
| 89 | │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │Rst│ | ||
| 90 | ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ | ||
| 91 | │ │ │ ↑ │ │ │ │ │ │Ins│ │PSc│ │ │ Hui │Mod│ | ||
| 92 | ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ | ||
| 93 | │ │ ← │ ↓ │ → │ │ │ │ │ │Tog│ │ │ │Hom│ | ||
| 94 | ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ | ||
| 95 | │ │ │ │Cal│ │ │ │Mut│VoD│VoU│ │ │Vai│End│ | ||
| 96 | ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ | ||
| 97 | │ │ │ │ │ │ │App│Spd│Vad│Spi│ | ||
| 98 | └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ | ||
| 99 | */ | ||
| 100 | /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ | ||
| 101 | [_FN] = LAYOUT_65_ansi( | ||
| 102 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, | ||
| 103 | _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, _______, RGB_HUI, RGB_MOD, | ||
| 104 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, KC_HOME, | ||
| 105 | _______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_VAI, KC_END, | ||
| 106 | _______, _______, _______, _______, _______, _______, KC_APP, RGB_SPD, RGB_VAD, RGB_SPI | ||
| 107 | ), | ||
| 108 | }; | ||
| 109 | |||
| 110 | void keyboard_post_init_kb(void) { | ||
| 111 | user_config.raw = eeconfig_read_user(); | ||
| 112 | switch (user_config.rgb_mode) { | ||
| 113 | case RGB_MODE_ALL: | ||
| 114 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 115 | rgb_matrix_enable_noeeprom(); | ||
| 116 | break; | ||
| 117 | case RGB_MODE_KEYLIGHT: | ||
| 118 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); | ||
| 119 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 120 | break; | ||
| 121 | case RGB_MODE_UNDERGLOW: | ||
| 122 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 123 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 124 | break; | ||
| 125 | case RGB_MODE_NONE: | ||
| 126 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 127 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 128 | break; | ||
| 129 | } | ||
| 130 | } | ||
| 131 | |||
| 132 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 133 | switch (keycode) { | ||
| 134 | case RGB_TOG: | ||
| 135 | if (record->event.pressed) { | ||
| 136 | switch (rgb_matrix_get_flags()) { | ||
| 137 | case LED_FLAG_ALL: { | ||
| 138 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); | ||
| 139 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 140 | user_config.rgb_mode = RGB_MODE_KEYLIGHT; | ||
| 141 | } | ||
| 142 | break; | ||
| 143 | case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { | ||
| 144 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 145 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 146 | user_config.rgb_mode = RGB_MODE_UNDERGLOW; | ||
| 147 | } | ||
| 148 | break; | ||
| 149 | case (LED_FLAG_UNDERGLOW): { | ||
| 150 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 151 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 152 | user_config.rgb_mode = RGB_MODE_NONE; | ||
| 153 | } | ||
| 154 | break; | ||
| 155 | default: { | ||
| 156 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 157 | rgb_matrix_enable_noeeprom(); | ||
| 158 | user_config.rgb_mode = RGB_MODE_ALL; | ||
| 159 | } | ||
| 160 | break; | ||
| 161 | } | ||
| 162 | eeconfig_update_user(user_config.raw); | ||
| 163 | } | ||
| 164 | return false; | ||
| 165 | } | ||
| 166 | |||
| 167 | return true; | ||
| 168 | } | ||
| 169 | |||
| 170 | void rgb_matrix_indicators_user(void) { | ||
| 171 | HSV hsv = rgb_matrix_config.hsv; | ||
| 172 | uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); | ||
| 173 | hsv.h = time; | ||
| 174 | RGB rgb = hsv_to_rgb(hsv); | ||
| 175 | |||
| 176 | if ((rgb_matrix_get_flags() & LED_FLAG_KEYLIGHT)) { | ||
| 177 | if (host_keyboard_led_state().caps_lock) { | ||
| 178 | rgb_matrix_set_color(30, rgb.r, rgb.g, rgb.b); | ||
| 179 | } | ||
| 180 | } else { | ||
| 181 | if (host_keyboard_led_state().caps_lock) { | ||
| 182 | rgb_matrix_set_color(30, rgb.r, rgb.g, rgb.b); | ||
| 183 | } else { | ||
| 184 | rgb_matrix_set_color(30, 0, 0, 0); | ||
| 185 | } | ||
| 186 | } | ||
| 187 | } | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/readme.md b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/readme.md new file mode 100644 index 000000000..af924c17b --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/readme.md | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | # Default Layout with VIA | ||
| 2 | |||
| 3 | Keymap is default 68 qwerty, 65% layout | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/rules.mk b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/readme.md b/keyboards/horrortroll/chinese_pcb/devil68_pro/readme.md new file mode 100644 index 000000000..27bd974af --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/readme.md | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # Devil68 Pro | ||
| 2 | |||
| 3 | Support Atmega32u4 keyboard. | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [HorrorTroll](https://github.com/HorrorTroll) | ||
| 6 | * Hardware Supported: Atmega32u4 | ||
| 7 | |||
| 8 | Make example for this keyboard (after setting up your build environment): | ||
| 9 | |||
| 10 | make horrortroll/chinese_pcb/devil68_pro:default | ||
| 11 | |||
| 12 | Flashing example for this keyboard: | ||
| 13 | |||
| 14 | make horrortroll/chinese_pcb/devil68_pro:default:flash | ||
| 15 | |||
| 16 | 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). | ||
| 17 | |||
| 18 | ## Bootloader | ||
| 19 | |||
| 20 | Enter the bootloader in 3 ways: | ||
| 21 | |||
| 22 | * **Bootmagic reset**: Hold down the key at (3,6) in the matrix (B key) and plug in the keyboard | ||
| 23 | * **Reset by wire**: Using a wire, 1 head to GND hole and other one to Reset pin on MCU | ||
| 24 | * **Keycode in layout**: Press the key mapped to RESET if it is available | ||
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/rules.mk b/keyboards/horrortroll/chinese_pcb/devil68_pro/rules.mk new file mode 100644 index 000000000..66354d792 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/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 = no # 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 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 18 | AUDIO_ENABLE = no # Audio output | ||
| 19 | |||
| 20 | # RGB Matrix enabled | ||
| 21 | RGB_MATRIX_ENABLE = yes | ||
| 22 | RGB_MATRIX_DRIVER = WS2812 | ||
diff --git a/keyboards/horrortroll/chinese_pcb/readme.md b/keyboards/horrortroll/chinese_pcb/readme.md new file mode 100644 index 000000000..466767875 --- /dev/null +++ b/keyboards/horrortroll/chinese_pcb/readme.md | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # A folder for some Chinese PCB without source code | ||
| 2 | |||
| 3 | This is a folder for collection code of Chinese PCB, where they only sold one-time limited on Taobao and no source code or contact info of Maker. Everything was re-write by using multimeter and sometimes with ISP/ICP flashing! | ||
| 4 | |||
| 5 | ## List for the reason why these keyboard in here: | ||
| 6 | <details> | ||
| 7 | <summary>Click to expand!</summary> | ||
| 8 | |||
| 9 | | Keyboard name | MCU | Layout | LED | OLED | Other | Reason | | ||
| 10 | | ------------- | ----------- | ------------- | ---- | ---- | ----- | ---------------------------------------------------- | | ||
| 11 | | Devil68 Pro | Atmega32U4 | 68 Keys (65%) | RGB | No | No | Lost contact info of Maker on Taobao, no source code | | ||
| 12 | | | | | | | | | | ||
| 13 | </details> | ||
diff --git a/keyboards/horrortroll/readme.md b/keyboards/horrortroll/readme.md new file mode 100644 index 000000000..0cef793ef --- /dev/null +++ b/keyboards/horrortroll/readme.md | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | # Welcome to my keyboard folder | ||
| 2 | |||
| 3 | In here, you can find: | ||
| 4 | - Chinese PCB that doesn't have source code (lost contact of Maker, can't found on Taobao, ... etc) | ||
| 5 | - My keyboard (ETA on future) | ||
| 6 | |||
| 7 | ## Contact me if you have any problem | ||
| 8 | |||
| 9 | **Discord:** HorrorTroll#0975 | ||
| 10 | **Facebook:** https://www.facebook.com/PhamChonChe.Duc/ | ||
| 11 | **Email:** sonicvipduc@gmail.com | ||
