From 8e73e460807667982976e1723e10b4512d91d9f4 Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Wed, 25 Aug 2021 10:36:15 +0200 Subject: [PATCH 1/4] Add LED table --- keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c index b80164043680..dcf4983e3b60 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c @@ -264,6 +264,17 @@ static void start_effects() { } #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 +// RGB led number layout, function of the key + +// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12 +// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13 +// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14 +// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15 +// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16 +// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17 +// 87, led 07 88, led 18 +// 91, led 08 92, led 19 + static void set_rgb_caps_leds() { rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 From 281b1264b4f68f59293c1f9ee2e2102098eadd6a Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Thu, 26 Aug 2021 10:44:19 +0200 Subject: [PATCH 2/4] Make constants constant --- keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c index dcf4983e3b60..74a45b7036f1 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c @@ -214,12 +214,12 @@ void rgb_matrix_indicators_user() { #if RGB_CONFIRMATION_BLINKING_TIME > 0 if (effect_started_time > 0) { /* Render blinking EFFECTS */ - uint16_t deltaTime = sync_timer_elapsed(effect_started_time); + const uint16_t deltaTime = sync_timer_elapsed(effect_started_time); if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) { - uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; - uint8_t val_r = led_state * r_effect; - uint8_t val_g = led_state * g_effect; - uint8_t val_b = led_state * b_effect; + const uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; + const uint8_t val_r = led_state * r_effect; + const uint8_t val_g = led_state * g_effect; + const uint8_t val_b = led_state * b_effect; rgb_matrix_set_color_all(val_r, val_g, val_b); if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); From e3f3556fbc5b19b70a05d387b3d1627f217e35d8 Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Wed, 19 Jan 2022 20:47:55 +0100 Subject: [PATCH 3/4] Disable Mousekey to fix issues with KVM Fixes #15939 --- keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk index 650c79fbdcc5..6024d42f1dab 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk @@ -1,3 +1,4 @@ # Enable additional features. DEBOUNCE_TYPE = sym_defer_pk +MOUSEKEY_ENABLE = no From 2282aa7245ed7b90be13e21f653a0b773a383d54 Mon Sep 17 00:00:00 2001 From: Andre Brait Date: Wed, 19 Jan 2022 21:28:54 +0100 Subject: [PATCH 4/4] Update GMMK/pro/ansi/andrebrait README --- keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md index e7f9978cee70..5cb49bd836ea 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md @@ -5,6 +5,7 @@ It basically reflects my needs for both Delete and Insert being readily availabl The differences are as follows: +- Disabled Mouse Keys (to fix issues with KVM switches and also because they're not used here anyway) - Short DEBOUNCE time (5 ms) - Per-key debounce algorithm (sym_defer_pk) - RGB turns off after 20 minutes of inactivity