From f3b55770b1ec22e961e124ce2d11c03f70e2028c Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sat, 27 Nov 2021 14:37:26 +0900 Subject: [PATCH 1/9] Add new keymap for gmmk/pro/ansi Add new usespace byungyoonc --- .../gmmk/pro/ansi/keymaps/byungyoonc/config.h | 30 +++++ .../gmmk/pro/ansi/keymaps/byungyoonc/keymap.c | 116 ++++++++++++++++++ .../pro/ansi/keymaps/byungyoonc/readme.md | 38 ++++++ .../gmmk/pro/ansi/keymaps/byungyoonc/rules.mk | 1 + users/byungyoonc/byungyoonc.c | 32 +++++ users/byungyoonc/byungyoonc.h | 11 ++ users/byungyoonc/readme.md | 14 +++ users/byungyoonc/rules.mk | 1 + 8 files changed, 243 insertions(+) create mode 100644 keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h create mode 100644 keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c create mode 100644 keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md create mode 100644 keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk create mode 100644 users/byungyoonc/byungyoonc.c create mode 100644 users/byungyoonc/byungyoonc.h create mode 100644 users/byungyoonc/readme.md create mode 100644 users/byungyoonc/rules.mk diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h new file mode 100644 index 000000000000..aa810a016715 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h @@ -0,0 +1,30 @@ +/* Copyright 2021 Choi, Byungyoon + * + * 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 . + */ + +#pragma once + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +#if defined(DEBOUNCE) +# undef DEBOUNCE +#endif // DEBOUNCE +/* High debounce time is required to avoid key chattering because of the debouncing algorithm sym_eager_pk */ +#define DEBOUNCE 40 + +#if !defined(FORCE_NKRO) +# define FORCE_NKRO +#endif // FORCE_NKRO diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c new file mode 100644 index 000000000000..8d687998246b --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c @@ -0,0 +1,116 @@ +/* Copyright 2021 Choi, Byungyoon + +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 . +*/ + +#include QMK_KEYBOARD_H +#include "byungyoonc.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mic Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc TaskMgr +// Tab Q W E R T Y U I O P [ ] \ Del +// Caps A S D F G H J K L ; " Enter Home +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + [0] = LAYOUT( + 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_PSCR, KC_MMUT, + 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_TASK, + 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, + 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_HOME, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_BRID, KC_BRIU, KC_CALC, KC_MSEL, RGB_VAD, RGB_VAI, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, KC_SEC1, KC_SEC2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEBUG, _______, + _______, _______, _______, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, RGB_HUD, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, GUI_TOG, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + +}; +// clang-format on + +#if defined(ENCODER_ENABLE) +bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t mod_state = get_mods(); + if (mod_state & MOD_MASK_CTRL) { + unregister_mods(MOD_MASK_CTRL); + if (clockwise) { + tap_code16(LCTL(KC_RGHT)); + } else { + tap_code16(LCTL(KC_LEFT)); + } + set_mods(mod_state); + } else { + if (clockwise) { + tap_code16(KC_VOLU); + } else { + tap_code16(KC_VOLD); + } + } + return true; +} +#endif // ENCODER_ENABLE + +static void set_rgb_caps_leds(void); + +static void set_rgb_caps_leds() { + rgb_matrix_set_color(73, 0xFF, 0x77, 0x77); // Left side LED 3 + rgb_matrix_set_color(74, 0xFF, 0x77, 0x77); // Right side LED 3 + rgb_matrix_set_color(76, 0xFF, 0x77, 0x77); // Left side LED 4 + rgb_matrix_set_color(77, 0xFF, 0x77, 0x77); // Right side LED 4 + rgb_matrix_set_color(80, 0xFF, 0x77, 0x77); // Left side LED 5 + rgb_matrix_set_color(81, 0xFF, 0x77, 0x77); // Right side LED 5 + rgb_matrix_set_color(83, 0xFF, 0x77, 0x77); // Left side LED 6 + rgb_matrix_set_color(84, 0xFF, 0x77, 0x77); // Right side LED 6 + rgb_matrix_set_color(3, 0xFF, 0x77, 0x77); // CAPS LED +} + +static void set_rgb_nlck_notset_leds(void); + +static void set_rgb_wlck_leds(void); + +static void set_rgb_nlck_notset_leds() { + rgb_matrix_set_color(67, 0x77, 0x77, 0xFF); // Left side LED 1 + rgb_matrix_set_color(68, 0x77, 0x77, 0xFF); // Right side LED 1 + rgb_matrix_set_color(70, 0x77, 0x77, 0xFF); // Left side LED 2 + rgb_matrix_set_color(71, 0x77, 0x77, 0xFF); // Right side LED 2 +} + +static void set_rgb_wlck_leds() { + rgb_matrix_set_color(87, 0x77, 0xFF, 0x77); // Left side LED 7 + rgb_matrix_set_color(88, 0x77, 0xFF, 0x77); // Right side LED 7 + rgb_matrix_set_color(91, 0x77, 0xFF, 0x77); // Left side LED 8 + rgb_matrix_set_color(92, 0x77, 0xFF, 0x77); // Right side LED 8 +} + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + set_rgb_caps_leds(); + } + if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { + set_rgb_nlck_notset_leds(); + } + if (keymap_config.no_gui) { + set_rgb_wlck_leds(); + } +} diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md new file mode 100644 index 000000000000..f732ee0530b7 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md @@ -0,0 +1,38 @@ +byungyoonc's GMMK Pro Layout +============================ + +## Keymap + +### Base Layer +![GMMK Pro Base Layer Layout Image](https://i.imgur.com/VvEL08Q.png) + +Made a bit of a change on the leftmost side of the keyboard to set Home and End closer to the arrow keys. Also uses a shortcut for Windows Task Manager, Windows PowerToys microphone mute. + +### Fn Layer +![GMMK Pro Fn Layer Layout Image](https://i.imgur.com/uQy2gSh.png) + +F-row media functions roughly matches the Keychron keyboard's layout. + +Added Debug key for faster debugging iteration. + +Supports Secrets input by Fn + Numbers. + +The rest are pretty self-explanatory RGB controls, a GUI toggle and an NKRO toggle. + +## Rotary Encoder Rotation +Volume control when no mods, Ctrl+Left/Right when Ctrl is pressed while rotating the encoder. + +## RGB Indicators +Uses side strap RGB as the RGB indicators. +- Top third lights on when the Num Lock is turned off. +- Middle third lights on when the Caps Lock is turned on. +- Bottom third lights on when the GUI is disabled (via `GUI_TOG`). + +## Debounce +Uses the `DEBOUNCE_TYPE` of `sym_eager_pk` for the shortest response time possible, and `DEBOUNCE` time of `40` in order to eliminate any key chattering. + +## NKRO +N-key rollover is turned on by default. + +## RGB Matrix +Keypresses and Framebuffer effects are enabled. diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk new file mode 100644 index 000000000000..13195723492d --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk @@ -0,0 +1 @@ +DEBOUNCE_TYPE = sym_eager_pk diff --git a/users/byungyoonc/byungyoonc.c b/users/byungyoonc/byungyoonc.c new file mode 100644 index 000000000000..bf36287242b9 --- /dev/null +++ b/users/byungyoonc/byungyoonc.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H +#include "byungyoonc.h" + +#if (__has_include("secrets.h") && !defined(NO_SECRETS)) +# include "secrets.h" +#else +static const char *const secrets[] = {"test1", "test2"}; +#endif + +#if !defined(MACRO_TIMER) +# define MACRO_TIMER 20 +#endif + +/* replicaJunction's process_record_user_kb */ +__attribute__ ((weak)) +bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_SEC1 ... KC_SEC2: /* Secrets! Externally defined strings, not stored in repo */ + if (!record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + send_string_with_delay(secrets[keycode - KC_SEC1], MACRO_TIMER); + } + return false; + break; + } + return process_record_user_kb(keycode, record); +}; + diff --git a/users/byungyoonc/byungyoonc.h b/users/byungyoonc/byungyoonc.h new file mode 100644 index 000000000000..06ff8547a300 --- /dev/null +++ b/users/byungyoonc/byungyoonc.h @@ -0,0 +1,11 @@ +#pragma once + +enum custom_keycodes { + KC_SEC1 = SAFE_RANGE, + KC_SEC2 +}; + +#define KC_TASK LCTL(LSFT(KC_ESC)) +#define KC_MMUT LSG(KC_A) + +bool process_record_user_kb(uint16_t keycode, keyrecord_t *record); diff --git a/users/byungyoonc/readme.md b/users/byungyoonc/readme.md new file mode 100644 index 000000000000..d0bc8d14d41f --- /dev/null +++ b/users/byungyoonc/readme.md @@ -0,0 +1,14 @@ +byungyoonc QMK Userspace +======================== + +# Overview +Defines some custom keycodes, alongside with the Secrets feature. Also incorporates `process_record_user_kb()` for further controls. + +Heavily influenced by the [Userspace code by replicaJunction](../replicaJunction/readme.md). + +# Features + +## Custom Keycodes +- `KC_SEC#` for the Secrets input +- `KC_TASK` for the Windows Task Manager shortcut `LCTL(LSFT(KC_ESC))` +- `KC_MMUT` for the Windows PowerToys Conference Mute microphone `LSG(KC_A)` diff --git a/users/byungyoonc/rules.mk b/users/byungyoonc/rules.mk new file mode 100644 index 000000000000..39c65e22385b --- /dev/null +++ b/users/byungyoonc/rules.mk @@ -0,0 +1 @@ +SRC += byungyoonc.c From 37d11252f0f1e2267f86be4540d6e9e5513ff46d Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sat, 27 Nov 2021 18:29:05 +0900 Subject: [PATCH 2/9] Added custom RGB matrix effect. Disabled several default RGB effects. Added a keyboard behavior to increase RGB hue value every keypress. --- .../gmmk/pro/ansi/keymaps/byungyoonc/config.h | 12 ++++++- .../gmmk/pro/ansi/keymaps/byungyoonc/keymap.c | 7 ++++ .../pro/ansi/keymaps/byungyoonc/readme.md | 5 ++- .../keymaps/byungyoonc/rgb_matrix_user.inc | 1 + .../gmmk/pro/ansi/keymaps/byungyoonc/rules.mk | 1 + .../byungyoonc/saturated_solid_multisplash.h | 34 +++++++++++++++++++ 6 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rgb_matrix_user.inc create mode 100644 users/byungyoonc/saturated_solid_multisplash.h diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h index aa810a016715..13bb46a2ec69 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h @@ -17,7 +17,17 @@ #pragma once #define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH #if defined(DEBOUNCE) # undef DEBOUNCE diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c index 8d687998246b..2868649030c0 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c @@ -49,6 +49,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on +bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + rgblight_increase_hue(); + } + return true; +} + #if defined(ENCODER_ENABLE) bool encoder_update_user(uint8_t index, bool clockwise) { uint8_t mod_state = get_mods(); diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md index f732ee0530b7..d340bf86ed78 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/readme.md @@ -35,4 +35,7 @@ Uses the `DEBOUNCE_TYPE` of `sym_eager_pk` for the shortest response time possib N-key rollover is turned on by default. ## RGB Matrix -Keypresses and Framebuffer effects are enabled. +Keypresses effects are enabled. +Disabled default several RGB effects. +Added custom RGB matrix effect `saturated_solid_multisplash`. +Every keypress increases the RGB hue value. diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rgb_matrix_user.inc b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rgb_matrix_user.inc new file mode 100644 index 000000000000..0d61e19f4c10 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rgb_matrix_user.inc @@ -0,0 +1 @@ +#include "saturated_solid_multisplash.h" diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk index 13195723492d..08f832c51bc0 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/rules.mk @@ -1 +1,2 @@ DEBOUNCE_TYPE = sym_eager_pk +RGB_MATRIX_CUSTOM_USER = yes diff --git a/users/byungyoonc/saturated_solid_multisplash.h b/users/byungyoonc/saturated_solid_multisplash.h new file mode 100644 index 000000000000..42f54c573a09 --- /dev/null +++ b/users/byungyoonc/saturated_solid_multisplash.h @@ -0,0 +1,34 @@ +#if defined(RGB_MATRIX_KEYPRESSES) +RGB_MATRIX_EFFECT(saturated_solid_multisplash) + +# if defined(RGB_MATRIX_CUSTOM_EFFECT_IMPLS) + +static bool saturated_solid_multisplash(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + uint8_t count = g_last_hit_tracker.count; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + HSV hsv = rgb_matrix_config.hsv; + hsv.v = 0; + for (uint8_t j = 0; j < count; j++) { + int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; + int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; + uint8_t dist = sqrt16(dx * dx + dy * dy); + uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], qadd8(rgb_matrix_config.speed, 1)); + + uint16_t effect = tick - dist; + if (effect > 255) effect = 255; + uint16_t vdiff = scale16by8(255 - effect, 255 - dist); + hsv.v = qadd8(hsv.v, vdiff); + hsv.s = qsub8(hsv.s, qsub8(127, effect)); + } + hsv.v = scale8(hsv.v, rgb_matrix_config.hsv.v); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // RGB_MATRIX_KEYPRESSES From b4d49e37657a1f1107e626ebbee50ef8d27e717f Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sat, 27 Nov 2021 18:51:20 +0900 Subject: [PATCH 3/9] Add license to new *.c and *.h files --- .../gmmk/pro/ansi/keymaps/byungyoonc/keymap.c | 4 ++-- users/byungyoonc/byungyoonc.c | 16 ++++++++++++++++ users/byungyoonc/byungyoonc.h | 16 ++++++++++++++++ users/byungyoonc/saturated_solid_multisplash.h | 16 ++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c index 2868649030c0..2dd38ee76520 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c @@ -20,8 +20,8 @@ along with this program. If not, see . // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mic Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc TaskMgr +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mic Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc TaskMgr // Tab Q W E R T Y U I O P [ ] \ Del // Caps A S D F G H J K L ; " Enter Home // Sh_L Z X C V B N M , . ? Sh_R Up End diff --git a/users/byungyoonc/byungyoonc.c b/users/byungyoonc/byungyoonc.c index bf36287242b9..7a7d60ee4bd9 100644 --- a/users/byungyoonc/byungyoonc.c +++ b/users/byungyoonc/byungyoonc.c @@ -1,3 +1,19 @@ +/* Copyright 2021 Choi, Byungyoon + * + * 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 . + */ + #include QMK_KEYBOARD_H #include "byungyoonc.h" diff --git a/users/byungyoonc/byungyoonc.h b/users/byungyoonc/byungyoonc.h index 06ff8547a300..d274f6a9498f 100644 --- a/users/byungyoonc/byungyoonc.h +++ b/users/byungyoonc/byungyoonc.h @@ -1,3 +1,19 @@ +/* Copyright 2021 Choi, Byungyoon + * + * 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 . + */ + #pragma once enum custom_keycodes { diff --git a/users/byungyoonc/saturated_solid_multisplash.h b/users/byungyoonc/saturated_solid_multisplash.h index 42f54c573a09..bedfe3bbfe4f 100644 --- a/users/byungyoonc/saturated_solid_multisplash.h +++ b/users/byungyoonc/saturated_solid_multisplash.h @@ -1,3 +1,19 @@ +/* Copyright 2021 Choi, Byungyoon + * + * 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 . + */ + #if defined(RGB_MATRIX_KEYPRESSES) RGB_MATRIX_EFFECT(saturated_solid_multisplash) From 0ffbe73729c20ad1c1df0ac08a493b09ce53e086 Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sat, 27 Nov 2021 19:29:09 +0900 Subject: [PATCH 4/9] Updated license header name --- keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h | 2 +- keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c | 2 +- users/byungyoonc/byungyoonc.c | 2 +- users/byungyoonc/byungyoonc.h | 2 +- users/byungyoonc/saturated_solid_multisplash.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h index 13bb46a2ec69..d9cbd52bb368 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Choi, Byungyoon +/* Copyright 2021 Choi Byungyoon * * 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 diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c index 2dd38ee76520..9978ae4982e7 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2021 Choi, Byungyoon +/* Copyright 2021 Choi Byungyoon 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 diff --git a/users/byungyoonc/byungyoonc.c b/users/byungyoonc/byungyoonc.c index 7a7d60ee4bd9..5059de0d9739 100644 --- a/users/byungyoonc/byungyoonc.c +++ b/users/byungyoonc/byungyoonc.c @@ -1,4 +1,4 @@ -/* Copyright 2021 Choi, Byungyoon +/* Copyright 2021 Choi Byungyoon * * 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 diff --git a/users/byungyoonc/byungyoonc.h b/users/byungyoonc/byungyoonc.h index d274f6a9498f..6d82370a010a 100644 --- a/users/byungyoonc/byungyoonc.h +++ b/users/byungyoonc/byungyoonc.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Choi, Byungyoon +/* Copyright 2021 Choi Byungyoon * * 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 diff --git a/users/byungyoonc/saturated_solid_multisplash.h b/users/byungyoonc/saturated_solid_multisplash.h index bedfe3bbfe4f..f30234852474 100644 --- a/users/byungyoonc/saturated_solid_multisplash.h +++ b/users/byungyoonc/saturated_solid_multisplash.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Choi, Byungyoon +/* Copyright 2021 Choi Byungyoon * * 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 From ece98dcc0b2620e0a8ef8a2088ec10f56f47c01a Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sun, 28 Nov 2021 12:42:15 +0900 Subject: [PATCH 5/9] Update keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h Co-authored-by: Drashna Jaelre --- keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h index d9cbd52bb368..ce20de05e100 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h @@ -29,12 +29,8 @@ #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_SOLID_SPLASH -#if defined(DEBOUNCE) -# undef DEBOUNCE -#endif // DEBOUNCE +#undef DEBOUNCE /* High debounce time is required to avoid key chattering because of the debouncing algorithm sym_eager_pk */ #define DEBOUNCE 40 -#if !defined(FORCE_NKRO) -# define FORCE_NKRO -#endif // FORCE_NKRO +#define FORCE_NKRO From 3bc971c1f69b96d2b6990d6a83a4243cec4a33d5 Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sun, 28 Nov 2021 13:02:47 +0900 Subject: [PATCH 6/9] Remove DISABLE_RGBs and FORCE_NKRO from config.h --- keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h index ce20de05e100..f2b47fda22f8 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h @@ -18,19 +18,6 @@ #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH - #undef DEBOUNCE /* High debounce time is required to avoid key chattering because of the debouncing algorithm sym_eager_pk */ #define DEBOUNCE 40 - -#define FORCE_NKRO From 9af94cec4688b92148d0d10c38f67b7fa3033b05 Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sun, 28 Nov 2021 21:20:56 +0900 Subject: [PATCH 7/9] Explicit disabling of RGB matrix animation --- .../gmmk/pro/ansi/keymaps/byungyoonc/config.h | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h index f2b47fda22f8..16ac4f240789 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/config.h @@ -18,6 +18,55 @@ #define RGB_MATRIX_KEYPRESSES +// 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 +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef 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 +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef 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 +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #undef DEBOUNCE /* High debounce time is required to avoid key chattering because of the debouncing algorithm sym_eager_pk */ #define DEBOUNCE 40 From b704cedce8f01a296e63c1cff1b746f4bfeb6a6b Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sat, 11 Dec 2021 19:42:17 +0900 Subject: [PATCH 8/9] Use custom matrix_output_unselect_delay This achieves >2kHz matrix scan frequency, fast enough for 1kHz polling --- keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c | 6 ++++++ lib/ugfx | 1 + 2 files changed, 7 insertions(+) create mode 160000 lib/ugfx diff --git a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c index 9978ae4982e7..1ad8417de283 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/byungyoonc/keymap.c @@ -121,3 +121,9 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { set_rgb_wlck_leds(); } } + +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { + for (int i = 0; i < 20; i++) { + wait_cpuclock(STM32_SYSCLK / 1000000L); + } +} diff --git a/lib/ugfx b/lib/ugfx new file mode 160000 index 000000000000..40b48f470add --- /dev/null +++ b/lib/ugfx @@ -0,0 +1 @@ +Subproject commit 40b48f470addad6a4fb1177de1a69a181158739b From b152fd78b5f5c4d090abc636e997ab582353fb17 Mon Sep 17 00:00:00 2001 From: Choi Byungyoon Date: Sun, 12 Dec 2021 12:33:19 +0900 Subject: [PATCH 9/9] Remove ugfx submodule: falsely added during rebase --- lib/ugfx | 1 - 1 file changed, 1 deletion(-) delete mode 160000 lib/ugfx diff --git a/lib/ugfx b/lib/ugfx deleted file mode 160000 index 40b48f470add..000000000000 --- a/lib/ugfx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 40b48f470addad6a4fb1177de1a69a181158739b