diff options
| author | Luca Mazzilli <setmaat@gmail.com> | 2022-01-14 20:13:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-14 21:13:44 +0200 |
| commit | 5a26f39492eb7215897d71da0e2cf0360e80d052 (patch) | |
| tree | 034e8cfe78df34785a48a8ebbed600d63cbe1c2d | |
| parent | 0e6d154a2a5b44ce31e2de36a0cd5e39652af94d (diff) | |
Aukey KM-G12 (#194)
* [Aukey KM-G12] add support
https://github.com/SonixQMK/qmk_firmware/issues/15
status leds:
- fixed LED_PIN_ON_STATE
- fixed LED_SCROLL_LOCK_PIN
Key Matrix:
- using COL2ROW
- adjusted row 5: KC_SPC is on col 6 and have 3 KC_NO before and after
- fixed ISO layout (removed \ under enter and shifted all led config index)
- rgb keymaps aligned to the Aukey km-g12 default
- moved RESET to FN+R (esc is mapped to RGB toggle)
RGB matrix:
Row 4 contains a led under numpad plus, row 6 contains 6 led under the spacebar and 1 under numpad enter. All the other underglow leds are un row 7 and row 8 ( to compile i had to force also keys matrix to 8. I'm not sure why but it seems that g_led_config is inited on MATRIX_ROWS and not LED_MATRIX_ROWS).
- using SN32F24xB
- adjusted KC_SPC led position (col 6)
- underglow: D4 (red), B15 (blue), D3 (green) controls led marked as DL1, DL25 to DL36 and DL43 to DL50 while D5 (red), A15 (blue), D6 (green) controls DL2-24.
- marked underglow with LED_FLAG_UNDERGLOW = 2
- marked modifiers with LED_FLAG_MODIFIER | LED_FLAG_KEYLIGHT = 5
- mapped underglow X and Y in a square (left, top, right, bottom)
Added UNUSED_PINS C13 C14, for reference
* [Aukey KM-G12] fixed underglow square coordinates and indexes
* [Aukey KM-G12] added to build
* updated build_all.py
searched for specific rules.mk containing SN32F2:
git grep -rl 'SN32F2' -- 'keyboards/*.mk'
then filtered the results with a regex, cleaned the string (keyboards, rules.mk):
find keyboards/ -type f -name "rules.mk" | grep -E 'keychron\/c|keychron\/k|redragon\/k|ajazz|aukey|sharkoon|smartduck|spcgear|marvo|womier|flashquark|ffc61|gmmk|akko' | sed -e 's/keyboards\///g' | sed -e 's/\/rules.mk//g'
| -rw-r--r-- | keyboards/aukey/kmg12/config.h | 109 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/config_led.c | 52 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/config_led.h | 43 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/info.json | 13 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/keymaps/default/keymap.c | 62 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/kmg12.h | 4 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/readme.md | 13 | ||||
| -rw-r--r-- | keyboards/aukey/kmg12/rules.mk | 31 | ||||
| -rwxr-xr-x | lib/python/build_all.py | 83 |
9 files changed, 373 insertions, 37 deletions
diff --git a/keyboards/aukey/kmg12/config.h b/keyboards/aukey/kmg12/config.h new file mode 100644 index 000000000..3f6de3b23 --- /dev/null +++ b/keyboards/aukey/kmg12/config.h @@ -0,0 +1,109 @@ +/* Copyright 2020 2022 Luca Mazzilli <setmaat@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0C45 +#define PRODUCT_ID 0x8006 +#define DEVICE_VER 0x0001 + +#define MANUFACTURER Aukey +#define PRODUCT KMG12 +#define DESCRIPTION KMG12 + +/* key matrix size */ +#define MATRIX_ROWS 8 //had to use 8 row to map the additional 2 underglow rows (LED_MATRIX_ROWS is ignored in initing the array g_led_config) +#define MATRIX_COLS 21 + +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, B0, B1, B2, B3, B4, B5 } +#define MATRIX_ROW_PINS { C15, D11, D10, D9, D8, D7, 0, 0 } //had to use 8 row to map the underglow + +#define UNUSED_PINS { C13, C14 } //P2.13, P2.14 have no trace on PCB + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Enable NKRO - Up to 248 keys at the same time. */ +#define FORCE_NKRO + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +#define LED_NUM_LOCK_PIN B13 +#define LED_CAPS_LOCK_PIN B14 +#define LED_SCROLL_LOCK_PIN B12 +#define LED_PIN_ON_STATE 1 + +#include "config_led.h" + +//rgb effects/* Disable RGB lighting when PC is in suspend */ +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +//#define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +// #define ENABLE_RGB_MATRIX_PIXEL_FLOW +// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +//#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +//#define ENABLE_RGB_MATRIX_SPLASH +//#define ENABLE_RGB_MATRIX_MULTISPLASH +//#define ENABLE_RGB_MATRIX_SOLID_SPLASH +//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/aukey/kmg12/config_led.c b/keyboards/aukey/kmg12/config_led.c new file mode 100644 index 000000000..2f651f8ab --- /dev/null +++ b/keyboards/aukey/kmg12/config_led.c @@ -0,0 +1,52 @@ +#ifdef RGB_MATRIX_ENABLE + +#include "rgb_matrix.h" +#include "config_led.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14, 15, NO_LED, NO_LED, NO_LED, NO_LED }, + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 }, + { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, NO_LED, 50, 51, 52, 53, 54, 55, 56 }, + { 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, NO_LED, NO_LED, NO_LED, 71, 72, 73, 152 }, //153 is led marked as DL23 on PCB + { 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, NO_LED, 86, NO_LED, 87, NO_LED, 88, 89, 90, 91 }, + { 92, 93, 94, 114, 115, 116, 95, 117, 118, 119, 96, 97, 98, 99, 100, 101, 102, NO_LED, 103, 104, 153 }, //154 is led DL24, 114,115,116=41,41,40 14,115,116=41,41,40 117,118,119=39,38,37 + //underglow + {105,106,107,108,109,110,111,112,113,120,121,122,123,124,125,126,127,128,129,130,154},//this row contains led marked as DL1,25-36,43-50 on PCB + {131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151}, //this row contains led marked as DL2-22 on PCB + +}, { + { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 15*12, 0 }, { 16*12, 0 }, { 17*12, 0 }, + { 1 *12, 11 }, { 2 *12, 11 }, { 3 *12, 11 }, { 4 *12, 11 }, { 5 *12, 11 }, { 6 *12, 11 }, { 7 *12, 11 }, { 8 *12, 11 }, { 9 *12, 11 }, { 10*12, 11 }, { 11*12, 11 }, { 12*12, 11 }, { 13*12, 11 }, { 14*12, 11 }, { 15*12, 11 }, { 16*12, 11 }, { 17*12, 11 }, { 18*12, 11 }, { 19*12, 11 }, { 20*12, 11 }, { 21*12, 11 }, + { 1 *12, 22 }, { 2 *12, 22 }, { 3 *12, 22 }, { 4 *12, 22 }, { 5 *12, 22 }, { 6 *12, 22 }, { 7 *12, 22 }, { 8 *12, 22 }, { 9 *12, 22 }, { 10*12, 22 }, { 11*12, 22 }, { 12*12, 22 }, { 13*12, 22 }, { 15*12, 22 }, { 16*12, 22 }, { 17*12, 22 }, { 18*12, 22 }, { 19*12, 22 }, { 20*12, 22 }, { 21*12, 22 }, + { 1 *12, 33 }, { 2 *12, 33 }, { 3 *12, 33 }, { 4 *12, 33 }, { 5 *12, 33 }, { 6 *12, 33 }, { 7 *12, 33 }, { 8 *12, 33 }, { 9 *12, 33 }, { 10*12, 33 }, { 11*12, 33 }, { 12*12, 33 }, { 13*12, 33 }, { 14*12, 33 }, { 18*12, 33 }, { 19*12, 33 }, { 20*12, 33 }, + { 1 *12, 44 }, { 2 *12, 44 }, { 3 *12, 44 }, { 4 *12, 44 }, { 5 *12, 44 }, { 6 *12, 44 }, { 7 *12, 44 }, { 8 *12, 44 }, { 9 *12, 44 }, { 10*12, 44 }, { 11*12, 44 }, { 12*12, 44 }, { 13*12, 44 }, { 16*12, 44 }, { 18*12, 44 }, { 19*12, 44 }, { 20*12, 44 }, { 21*12, 44 }, + { 1 *12, 64 }, { 2 *12, 64 }, { 3 *12, 64 }, { 7 *12, 64 }, { 11*12, 64 }, { 12*12, 64 }, { 13*12, 64 }, { 14*12, 64 }, { 15*12, 64 }, { 16*12, 64 }, { 17*12, 64 }, { 19*12, 64 }, { 20*12, 64 }, + + //underglow left 105-110 + { 1 , 0 }, { 1, 11 }, { 1, 22 }, { 1 *1, 33 }, { 1 , 44 }, { 1, 64 }, + + //underglow bottom 111-130 (same y as row 6) + { 1 *12, 64 }, { 2 *12, 64 }, { 3 *12, 64 }, { 4 *12, 64 }, { 5 *12, 64 }, { 6 *12, 64 }, { 7 *12, 64 }, { 8 *12, 64 }, { 9 *12, 64 }, { 10*12, 64 }, { 11*12, 64 }, { 12*12, 64 }, { 13*12, 64 }, { 14*12, 64 }, { 15*12, 64 }, { 16*12, 64 }, { 17*12, 64 }, { 18*12, 64 }, { 19*12, 64 }, { 20*12, 64 }, + + //131-149 top + { 1 *12, 0 }, { 2 *12, 0 }, { 3 *12, 0 }, { 4 *12, 0 }, { 5 *12, 0 }, { 6 *12, 0 }, { 7 *12, 0 }, { 8 *12, 0 }, { 9 *12, 0 }, { 10*12, 0 }, { 11*12, 0 }, { 12*12, 0 }, { 13*12, 0 }, { 14*12, 0 }, { 15*12, 0 }, { 16*12, 0 }, { 17*12, 0 }, { 18*12, 0 }, { 19*12, 0 }, + + //150 right + { 20*12, 0 }, { 20*12, 11 }, { 20*12, 22 }, { 20*12, 33 }, { 20*12, 44 }, + +}, { + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 4, 4, 4, + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 4, 4, 4, 4, + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, + //underglow + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +} }; + + + +#endif diff --git a/keyboards/aukey/kmg12/config_led.h b/keyboards/aukey/kmg12/config_led.h new file mode 100644 index 000000000..42f30c784 --- /dev/null +++ b/keyboards/aukey/kmg12/config_led.h @@ -0,0 +1,43 @@ +/* +Copyright 2022 Luca Mazzilli <setmaat@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + + +// Backlight configuration +#define BACKLIGHT_LEVELS 8 + + +//C0, C1, C3, RBG row 1 (keys) +//C4, C5, C6, RBG row 2 (keys) +//C7, C8, C9 RBG row 3 (keys) +//C10, C11, C12, RBG row 4 (keys and 1 underglow - led DL23 on PCB) +//B6, B7, B8, RBG row 5 (keys) +//B9, B10, B11, RBG row 6 (keys and 7 underglow - led DL37 to DL42, and DL24 on PCB) +//D4, B15, D3, RBG row 7 (21 underglow - led DL1, DL25 to DL36, DL43 to DL50 on PCB) +//D5, A15, D6 RBG row 8 (21 underglow - led DL2 to DL24 on PCB) + +#define LED_MATRIX_ROWS 8 +#define LED_MATRIX_ROW_CHANNELS 3 +#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS) + +#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11, D4, B15, D3 , D5, A15, D6 } + +#define LED_MATRIX_COLS 21 +#define LED_MATRIX_COL_PINS MATRIX_COL_PINS + +#define DRIVER_LED_TOTAL (155) //105 keys 1 underglow in row 4 + 7 underglow in row 6 + 21 underglow in row 7 and 21 underglow in row 8 diff --git a/keyboards/aukey/kmg12/info.json b/keyboards/aukey/kmg12/info.json new file mode 100644 index 000000000..64aa1103e --- /dev/null +++ b/keyboards/aukey/kmg12/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "KM-G12", + "url": "https://it.aukey.com/products/km-g12-mechanical-keyboard-blue-switches", + "maintainer": "Maxill1", + "width": 21, + "height": 6, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } + +} diff --git a/keyboards/aukey/kmg12/keymaps/default/keymap.c b/keyboards/aukey/kmg12/keymaps/default/keymap.c new file mode 100644 index 000000000..ebb056ed8 --- /dev/null +++ b/keyboards/aukey/kmg12/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* +Copyright 2022 Luca Mazzilli + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */ + [_BASE] = { { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_NO, KC_NO }, + { KC_GRV, 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS }, + { 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_NO, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS }, + { 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_NUHS, KC_ENT, KC_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO }, + { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, KC_UP, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT }, + { KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_P0, KC_PDOT, KC_NO } + }, + [_FN] = { { RGB_TOG, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, _______, RGB_M_R, RGB_M_P, KC_SLEP, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_B, RGB_MOD, RGB_RMOD, _______, _______, _______, _______ }, + { _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______ } + } +}; +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; + + //rgblight_sethsv_noeeprom_green(); + //rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed + #ifdef CONSOLE_ENABLE + uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); + #endif + return true; +} diff --git a/keyboards/aukey/kmg12/kmg12.h b/keyboards/aukey/kmg12/kmg12.h new file mode 100644 index 000000000..00bdf1e03 --- /dev/null +++ b/keyboards/aukey/kmg12/kmg12.h @@ -0,0 +1,4 @@ +#pragma once + +#include "quantum.h" + diff --git a/keyboards/aukey/kmg12/readme.md b/keyboards/aukey/kmg12/readme.md new file mode 100644 index 000000000..c9cac8d24 --- /dev/null +++ b/keyboards/aukey/kmg12/readme.md @@ -0,0 +1,13 @@ +# Aukey KM-G12 + +G12 + +Keyboard Maintainer: [Luca Mazzilli](https://github.com/Maxill1) +Based on Redragon K556 : [Adam Honse](https://github.com/CalcProgrammer1) +Hardware Supported: SN32F248BF + +Make example for this keyboard (after setting up your build environment): + + make aukey/kmg12:default + +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/aukey/kmg12/rules.mk b/keyboards/aukey/kmg12/rules.mk new file mode 100644 index 000000000..c5a659992 --- /dev/null +++ b/keyboards/aukey/kmg12/rules.mk @@ -0,0 +1,31 @@ +# project specific files +SRC = ../../../drivers/led/sn32/matrix_sn32f24xx.c +SRC += config_led.c + +# MCU name +MCU = SN32F248BF + +# Build Options +# comment out to disable the options. +# +LTO_ENABLE = no +BACKLIGHT_ENABLE = no +MAGIC_ENABLE = yes +MAGIC_KEYCODE_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +SERIAL_LINK_ENABLE = no +WAIT_FOR_USB = no +CUSTOM_MATRIX = yes +KEYBOARD_SHARED_EP = yes + +# Custom RGB matrix handling +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = SN32F24xB diff --git a/lib/python/build_all.py b/lib/python/build_all.py index ebe07ebcb..81112132b 100755 --- a/lib/python/build_all.py +++ b/lib/python/build_all.py @@ -3,66 +3,75 @@ import os import sys BOARDS = [ - 'redragon/k552/rev1', - 'redragon/k552/rev2', - 'redragon/k530', - 'redragon/k556', - 'redragon/k580', - 'redragon/k630', + 'ajazz/ak33/rev1', + 'ajazz/ak33/rev2', + 'akko/3061_rgb', + 'aukey/kmg12', + 'ffc/ffc61', + 'flashquark/horizon_z', + 'gmmk/compact/rev2', + 'gmmk/compact/rev3', + 'gmmk/compact', + 'gmmk/full/rev2', + 'gmmk/full/rev3', + 'gmmk/full', + 'gmmk/pro/ansi', + 'gmmk/pro/iso', + 'gmmk/tkl/rev2', + 'gmmk/tkl/rev3', + 'gmmk/tkl', 'keychron/c1/plain', 'keychron/c1/rgb', 'keychron/c1/white', 'keychron/c2/white', - 'keychron/k2/rgb', - 'keychron/k2/rgb/via', + 'keychron/k14/rgb/optical', + 'keychron/k14/rgb/optical_via', + 'keychron/k14/rgb', + 'keychron/k14/rgb/via', 'keychron/k2/rgb/optical', 'keychron/k2/rgb/optical_via', - 'keychron/k3/rgb', - 'keychron/k3/rgb/via', + 'keychron/k2/rgb', + 'keychron/k2/rgb/via', 'keychron/k3/rgb/optical', 'keychron/k3/rgb/optical_via', - 'keychron/k4/rgb/v1', - 'keychron/k4/rgb/v1/via', + 'keychron/k3/rgb', + 'keychron/k3/rgb/via', + 'keychron/k4/rgb', 'keychron/k4/rgb/v1/optical', 'keychron/k4/rgb/v1/optical_via', - 'keychron/k4/rgb/v2', - 'keychron/k4/rgb/v2/via', + 'keychron/k4/rgb/v1', + 'keychron/k4/rgb/v1/via', 'keychron/k4/rgb/v2/optical', 'keychron/k4/rgb/v2/optical_via', - 'keychron/k6/rgb', - 'keychron/k6/rgb/via', + 'keychron/k4/rgb/v2', + 'keychron/k4/rgb/v2/via', 'keychron/k6/rgb/optical', 'keychron/k6/rgb/optical_via', + 'keychron/k6/rgb', + 'keychron/k6/rgb/via', 'keychron/k6/white', - 'keychron/k7/rgb', - 'keychron/k7/rgb/via', 'keychron/k7/rgb/optical', 'keychron/k7/rgb/optical_via', - 'keychron/k8/rgb', - 'keychron/k8/rgb/via', + 'keychron/k7/rgb', + 'keychron/k7/rgb/via', 'keychron/k8/rgb/optical', 'keychron/k8/rgb/optical_via', - 'keychron/k14/rgb', - 'keychron/k14/rgb/via', - 'keychron/k14/rgb/optical', - 'keychron/k14/rgb/optical_via', - 'ajazz/ak33/rev1', - 'ajazz/ak33/rev2', + 'keychron/k8/rgb', + 'keychron/k8/rgb/via', + 'marvo/kg938', + 'redragon/k530', + 'redragon/k552/rev1', + 'redragon/k552/rev2', + 'redragon/k556', + 'redragon/k580', + 'redragon/k582', + 'redragon/k630', 'sharkoon/sgk3', 'smartduck/xs61', 'spcgear/gk530', 'spcgear/gk540', - 'marvo/kg938', - 'womier/k87', - 'flashquark/horizon_z', - 'ffc/ffc61', - 'gmmk/full/rev2', - 'gmmk/full/rev3', - 'gmmk/tkl/rev2', - 'gmmk/tkl/rev3', - 'gmmk/compact/rev2', - 'gmmk/compact/rev3', - 'akko/3061_rgb'] + 'womier/k87' +] error = False for kb in BOARDS: |
