diff options
Diffstat (limited to 'keyboards/gmmk/pro/rev1/ansi')
39 files changed, 222 insertions, 188 deletions
diff --git a/keyboards/gmmk/pro/rev1/ansi/ansi.c b/keyboards/gmmk/pro/rev1/ansi/ansi.c index 1df3319fd2..3fc45d61d0 100644 --- a/keyboards/gmmk/pro/rev1/ansi/ansi.c +++ b/keyboards/gmmk/pro/rev1/ansi/ansi.c @@ -136,7 +136,7 @@ led_config_t g_led_config = {{ 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 }}; -const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { +const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = { {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13 {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16 {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11 diff --git a/keyboards/gmmk/pro/rev1/ansi/config.h b/keyboards/gmmk/pro/rev1/ansi/config.h index 7c68375b2f..8e5518e1b9 100644 --- a/keyboards/gmmk/pro/rev1/ansi/config.h +++ b/keyboards/gmmk/pro/rev1/ansi/config.h @@ -20,4 +20,4 @@ #define DRIVER_1_LED_TOTAL 66 #define DRIVER_2_LED_TOTAL 32 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c index d666454a3e..838aee8652 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c @@ -62,5 +62,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h index 1438d317fb..5dda6f15bc 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Andre Brait +/* Copyright 2022 Andre Brait * * 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 @@ -17,6 +17,6 @@ #pragma once #ifdef RGB_MATRIX_ENABLE - #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + #define RGB_MATRIX_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) #define RGB_DISABLE_WHEN_USB_SUSPENDED #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c index e5599a787d..8d34d82f64 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c @@ -102,21 +102,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - return true; -} -#endif // ENCODER_ENABLE - #ifdef RGB_MATRIX_ENABLE -#define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds - /* Renaming those to make the purpose on this keymap clearer */ #define LED_FLAG_CAPS LED_FLAG_NONE #define LED_FLAG_EFFECTS LED_FLAG_INDICATOR @@ -127,12 +114,18 @@ static uint16_t effect_started_time = 0; static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0; static void start_effects(void); -/* The higher this is, the slower the blinking will be */ -#ifndef TIME_SELECTED_BIT - #define TIME_SELECTED_BIT 8 +/* The interval time in ms */ +#ifndef EFFECTS_TIME + #define EFFECTS_TIME 2000 +#endif +#ifndef EFFECTS_INTERVAL + #define EFFECTS_INTERVAL 250 +#endif +#if EFFECTS_TIME <= 0 || EFFECTS_TIME >= 32767 + #error "EFFECTS_TIME must be a positive integer smaller than 32767" #endif -#if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16 - #error "TIME_SELECTED_BIT must be a positive integer smaller than 16" +#if EFFECTS_INTERVAL <= 0 || EFFECTS_INTERVAL >= 32767 + #error "EFFECTS_INTERVAL must be a positive integer smaller than 32767" #endif #define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0 #define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0 @@ -264,12 +257,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user(void) { if (effect_started_time > 0) { /* Render blinking EFFECTS */ const uint16_t deltaTime = sync_timer_elapsed(effect_started_time); - if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) { - const uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; + if (deltaTime <= EFFECTS_TIME) { + const uint8_t led_state = ((deltaTime / EFFECTS_INTERVAL) + 1) & 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; @@ -277,7 +270,7 @@ void rgb_matrix_indicators_user() { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } - return; + return false; } else { /* EFFECTS duration is finished */ effect_started_time = 0; @@ -300,6 +293,7 @@ void rgb_matrix_indicators_user() { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } + return false; } static void start_effects() { @@ -326,6 +320,20 @@ static void start_effects() { // 91, led 08 92, led 19 static void set_rgb_caps_leds() { + rgb_matrix_set_color(0, 0xFF, 0x0, 0x0); // ESC + rgb_matrix_set_color(6, 0xFF, 0x0, 0x0); // F1 + rgb_matrix_set_color(12, 0xFF, 0x0, 0x0); // F2 + rgb_matrix_set_color(18, 0xFF, 0x0, 0x0); // F3 + rgb_matrix_set_color(23, 0xFF, 0x0, 0x0); // F4 + rgb_matrix_set_color(28, 0xFF, 0x0, 0x0); // F5 + rgb_matrix_set_color(34, 0xFF, 0x0, 0x0); // F6 + rgb_matrix_set_color(39, 0xFF, 0x0, 0x0); // F7 + rgb_matrix_set_color(44, 0xFF, 0x0, 0x0); // F8 + rgb_matrix_set_color(50, 0xFF, 0x0, 0x0); // F9 + rgb_matrix_set_color(56, 0xFF, 0x0, 0x0); // F10 + rgb_matrix_set_color(61, 0xFF, 0x0, 0x0); // F11 + rgb_matrix_set_color(66, 0xFF, 0x0, 0x0); // F12 + rgb_matrix_set_color(69, 0xFF, 0x0, 0x0); // Prt rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md index 99d0a36721..b080f02c6b 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md @@ -8,8 +8,6 @@ The differences are as follows: - Dedicated MacOS and Windows/Linux layers - Switching between them by pressing Fn + CAPS LOCK - 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 - RGB turns off when USB is suspended - Layer 0: diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk index 057e9a9541..8983ba87c3 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk @@ -1,6 +1,4 @@ # Enable additional features. -DEBOUNCE_TYPE = sym_defer_pk - # Disabling MouseKey because it breaks my KVM switch MOUSEKEY_ENABLE = no diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c index 16f1acd68b..52fd7a5a34 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/andrewcharnley/keymap.c @@ -76,7 +76,7 @@ void keyboard_post_init_user(void) { val = rgb_matrix_get_val(); } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color_all(val,0,0); @@ -84,4 +84,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { rgb_matrix_set_color_all(val, val, val); val = rgb_matrix_get_val(); } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c index 86743acf73..b536a8535a 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/benschaeff/keymap.c @@ -99,7 +99,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return false; } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { switch(get_highest_layer(layer_state)) { // special handling per layer case 0: //layer one @@ -124,4 +124,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { default: break; } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c index fb60872ea8..b0d75a378a 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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, _______, + _______, KC_SEC1, KC_SEC2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DB_TOGG, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_HUD, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, @@ -74,7 +74,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { tap_code16(KC_VOLD); } } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif // ENCODER_ENABLE @@ -110,7 +111,7 @@ static void set_rgb_wlck_leds() { 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) { +bool 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(); } @@ -120,6 +121,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (keymap_config.no_gui) { set_rgb_wlck_leds(); } + return false; } void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c index 09f8aa147a..c00ba602f7 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c @@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( - EEP_RST, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QK_BOOT, KC_MUTE, - KC_NLCK, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, KC_PSCR, + EE_CLR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QK_BOOT, KC_MUTE, + KC_NUM, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, KC_PSCR, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PSLS, KC_PAST, KC_BSLS, KC_PGUP, KC_CAPS, RGB_VAD, RGB_TOG, RGB_VAI, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_PENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_PDOT, KC_SLSH, KC_RSFT, KC_UP, KC_INS, @@ -68,7 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif // ENCODER_ENABLE @@ -77,9 +78,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) { // const ledmap *l = &(ledmaps[layer]); // -// // -// for (int i = 0; i < DRIVER_LED_TOTAL; i++) { +// +// for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { // HSV hsv = { // .h = (*l)[i][0], // .s = (*l)[i][1], @@ -106,17 +107,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } // Capslock, Scroll lock and Numlock indicator on Left side lights. - void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - loop_colorset(LED_REGION_A, (sizeof(LED_REGION_A) / sizeof(LED_REGION_A[0])), hsv_cl_blue); - loop_colorset(LED_REGION_B, (sizeof(LED_REGION_B) / sizeof(LED_REGION_B[0])), hsv_cl_purple); - loop_colorset(LED_REGION_L_SIDE, (sizeof(LED_REGION_L_SIDE) / sizeof(LED_REGION_L_SIDE[0])), hsv_cl_purple); - loop_colorset(LED_REGION_R_SIDE, (sizeof(LED_REGION_R_SIDE) / sizeof(LED_REGION_R_SIDE[0])), hsv_cl_purple); + bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + loop_colorset(LED_REGION_A, ARRAY_SIZE(LED_REGION_A), + hsv_cl_blue); + loop_colorset(LED_REGION_B, ARRAY_SIZE(LED_REGION_B), + hsv_cl_purple); + loop_colorset(LED_REGION_L_SIDE, ARRAY_SIZE(LED_REGION_L_SIDE), + hsv_cl_purple); + loop_colorset(LED_REGION_R_SIDE, ARRAY_SIZE(LED_REGION_R_SIDE), + hsv_cl_purple); switch(get_highest_layer(layer_state)){ // special handling per layer case 1: //layer 1 //rgb_matrix_set_color_all(RGB_AZURE); - loop_colorset(LED_REGION_NUMPAD, (sizeof(LED_REGION_NUMPAD) / sizeof(LED_REGION_NUMPAD[0])), hsv_cl_numpad); - loop_colorset(LED_REGION_OTHER, (sizeof(LED_REGION_OTHER) / sizeof(LED_REGION_OTHER[0])), hsv_cl_mods); + loop_colorset(LED_REGION_NUMPAD, + ARRAY_SIZE(LED_REGION_NUMPAD), hsv_cl_numpad); + loop_colorset(LED_REGION_OTHER, ARRAY_SIZE(LED_REGION_OTHER), + hsv_cl_mods); break; default: //layer 0 // @@ -148,7 +155,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_matrix_set_color(LED_L6, bad_rgb.r, bad_rgb.g, bad_rgb.b); rgb_matrix_set_color(LED_L7, bad_rgb.r, bad_rgb.g, bad_rgb.b); rgb_matrix_set_color(LED_L8, bad_rgb.r, bad_rgb.g, bad_rgb.b); - loop_colorset(LED_REGION_CAPS, (sizeof(LED_REGION_CAPS) / sizeof(LED_REGION_CAPS[0])), hsv_cl_bad); + loop_colorset(LED_REGION_CAPS, ARRAY_SIZE(LED_REGION_CAPS), + hsv_cl_bad); } + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c index 7d2c22506a..b71d18d481 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c @@ -107,5 +107,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/default/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/default/keymap.c index 6557734f59..1294d64fe8 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/default/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/default/keymap.c @@ -65,4 +65,4 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; -#endif
\ No newline at end of file +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c index 8eedeb6e00..c693bd90d8 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c @@ -52,10 +52,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (IS_LAYER_ON(_TRAN)) { rgb_matrix_set_color_all(_TRAN_COLOR_RGB); } else if (IS_LAYER_ON(_GAME)) { @@ -65,10 +66,11 @@ void rgb_matrix_indicators_user(void) { } if (host_keyboard_led_state().caps_lock) { - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; ++i) { + for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; ++i) { if (HAS_ANY_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { rgb_matrix_set_color(i, _CAPS_COLOR_RGB); } } } + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c index ab98693649..800fe02d7d 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c @@ -75,11 +75,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef GAME_ENABLE [_FN1] = LAYOUT( - EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SLCK, KC_PAUS, KC_SLEP, + EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SCRL, KC_PAUS, KC_SLEP, PRNCONF, TG_CAPS, TG_PAD, TG_ESC, TG_DEL, TG_TDCAP,TG_ENC, TG_INS,TG_SPCMOD,TG_AUTOCR, _______, RGB_TOD, RGB_TOI, _______, RGB_TOG, _______, RGB_SAD, RGB_VAI, RGB_SAI, NK_TOGG, _______, YAHOO, _______, _______, OUTLOOK, TG(_GAME),SWAP_L, SWAP_R, QK_BOOT, KC_HOME, KC_CAPS, RGB_HUD, RGB_VAD, RGB_HUI, _______, GMAIL, HOTMAIL, _______, _______, LOCKPC, _______, _______, _______, KC_END, - _______, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NLCK, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, + _______, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NUM, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, _______, WINLOCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), @@ -94,11 +94,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #else [_FN1] = LAYOUT( - EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SLCK, KC_PAUS, KC_SLEP, + EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SCRL, KC_PAUS, KC_SLEP, PRNCONF, TG_CAPS, TG_PAD, TG_ESC, TG_DEL, TG_TDCAP,TG_ENC, TG_INS,TG_SPCMOD,TG_AUTOCR, _______, RGB_TOD, RGB_TOI, _______, RGB_TOG, _______, RGB_SAD, RGB_VAI, RGB_SAI, NK_TOGG, _______, YAHOO, _______, _______, OUTLOOK, KC_PAUS, SWAP_L, SWAP_R, QK_BOOT, KC_HOME, KC_CAPS, RGB_HUD, RGB_VAD, RGB_HUI, _______, GMAIL, HOTMAIL, _______, _______, LOCKPC, _______, _______, _______, KC_END, - _______, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NLCK, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, + _______, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NUM, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, _______, WINLOCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), #endif //GAME_ENABLE @@ -242,7 +242,7 @@ void hurt_paddle(void) { #endif //GAME_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); // Scroll Lock RGB setup @@ -359,7 +359,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif // GAME_ENABLE // System NumLock warning indicator RGB setup - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -431,7 +431,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { // Numpad & Mouse Keys overlay RGB case _NUMPADMOUSE: - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -538,7 +538,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (paddle_lives == 0) { // Game over - for (uint8_t i = 0; i < sizeof(LED_GAME_OVER) / sizeof(LED_GAME_OVER[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(LED_GAME_OVER); i++) { rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED); } @@ -699,6 +699,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif //GAME_ENABLE break; } + return false; } #endif @@ -707,4 +708,4 @@ void keyboard_post_init_keymap(void) { #ifdef RGB_MATRIX_ENABLE activate_rgb_nightmode(false); // Set to true if you want to startup in nightmode, otherwise use Fn + Z to toggle #endif -}
\ No newline at end of file +} diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h index 1438d317fb..845262b7e8 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/config.h @@ -17,6 +17,6 @@ #pragma once #ifdef RGB_MATRIX_ENABLE - #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + #define RGB_MATRIX_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) #define RGB_DISABLE_WHEN_USB_SUSPENDED #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c index 3be0e5e31b..aa1558fd07 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c @@ -83,7 +83,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif // ENCODER_ENABLE @@ -219,7 +220,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } -void rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user() { #if RGB_CONFIRMATION_BLINKING_TIME > 0 if (effect_started_time > 0) { /* Render blinking EFFECTS */ @@ -257,6 +258,7 @@ void rgb_matrix_indicators_user() { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } + return false; } #if RGB_CONFIRMATION_BLINKING_TIME > 0 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c index 98354b4654..1bedcab41f 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c @@ -62,5 +62,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c index 47490a0617..4c87822b8a 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c @@ -42,9 +42,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN1] = LAYOUT( _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, - _______, _______, RGB_VAI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, QK_BOOT, KC_HOME, + _______, _______, RGB_VAI, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, _______, QK_BOOT, KC_HOME, KC_CAPS, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, - _______, RGB_NITE,RGB_HUI, _______, _______, _______, KC_NLCK, _______, RGB_TOD, RGB_TOI, _______, _______, RGB_MOD, _______, + _______, RGB_NITE,RGB_HUI, _______, _______, _______, KC_NUM, _______, RGB_TOD, RGB_TOI, _______, _______, RGB_MOD, _______, _______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), @@ -112,13 +112,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { break; } } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif // ENCODER_ENABLE && !ENCODER_DEFAULTACTIONS_ENABLE #ifdef RGB_MATRIX_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. - void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) { rgb_matrix_set_color(LED_L1, RGB_GREEN); @@ -187,14 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { default: break; } - } - - void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); - } - - void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c index c87532990f..46e0a128f9 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/lalitmaganti/keymap.c @@ -17,15 +17,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include QMK_KEYBOARD_H #ifdef PROGRAMMABLE_BUTTON_ENABLE -#define L1_NUM1 PROGRAMMABLE_BUTTON_1 -#define L1_NUM2 PROGRAMMABLE_BUTTON_2 -#define L1_NUM3 PROGRAMMABLE_BUTTON_3 -#define L1_NUM4 PROGRAMMABLE_BUTTON_4 -#define L1_NUM5 PROGRAMMABLE_BUTTON_5 -#define L1_NUM6 PROGRAMMABLE_BUTTON_6 -#define L1_NUM7 PROGRAMMABLE_BUTTON_7 -#define L1_NUM8 PROGRAMMABLE_BUTTON_8 -#define L1_NUM9 PROGRAMMABLE_BUTTON_9 +#define L1_NUM1 QK_PROGRAMMABLE_BUTTON_1 +#define L1_NUM2 QK_PROGRAMMABLE_BUTTON_2 +#define L1_NUM3 QK_PROGRAMMABLE_BUTTON_3 +#define L1_NUM4 QK_PROGRAMMABLE_BUTTON_4 +#define L1_NUM5 QK_PROGRAMMABLE_BUTTON_5 +#define L1_NUM6 QK_PROGRAMMABLE_BUTTON_6 +#define L1_NUM7 QK_PROGRAMMABLE_BUTTON_7 +#define L1_NUM8 QK_PROGRAMMABLE_BUTTON_8 +#define L1_NUM9 QK_PROGRAMMABLE_BUTTON_9 #else #define L1_NUM1 _______ #define L1_NUM2 _______ @@ -80,12 +80,13 @@ static void set_rgb_side_leds() { rgb_matrix_set_color(92, RGB_WHITE); // Right side LED 8 } -void rgb_matrix_indicators_user() { +bool rgb_matrix_indicators_user() { rgb_matrix_set_color_all(0x0, 0x0, 0x0); if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(3, RGB_WHITE); // CAPS } set_rgb_side_leds(); + return false; } -#endif
\ No newline at end of file +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h index 799c5d9593..a462b569f9 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/config.h @@ -18,7 +18,7 @@ // At the time of this, there are 41 effects! That may be a bit too many to cycle through - keeping what I believe is the best. #ifdef RGB_MATRIX_ENABLE - #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + #define RGB_MATRIX_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) // #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c index 8175cf68c8..8740bfe89c 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c @@ -144,7 +144,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif //ENCODER_ENABLE @@ -371,7 +372,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } - void rgb_matrix_indicators_user() { + bool rgb_matrix_indicators_user(void) { #if RGB_CONFIRMATION_BLINKING_TIME > 0 if (effect_started_time > 0) { /* Render blinking EFFECTS */ @@ -409,6 +410,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds(); } + return false; } #if RGB_CONFIRMATION_BLINKING_TIME > 0 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c index 52c9dfdf99..a7ab0c9cc3 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/ansi.c @@ -136,7 +136,7 @@ led_config_t PROGMEM g_led_config = {{ 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 }}; -const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { +const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = { {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13 {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16 {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c index f3f443cedb..d30224636b 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/helpers.c @@ -17,7 +17,7 @@ #include "rgb_matrix.h" void rgb_matrix_set_color_flags(uint8_t red, uint8_t green, uint8_t blue, uint8_t flags) { - for (uint8_t ii = 0; ii < DRIVER_LED_TOTAL; ii++) { + for (uint8_t ii = 0; ii < RGB_MATRIX_LED_COUNT; ii++) { if (g_led_config.flags[ii] & flags) { rgb_matrix_set_color(ii, red, green, blue); } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c index 020322085b..b595c1b843 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_DFUMODE] = LAYOUT(QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MG_F19, DEBUG, + [_DFUMODE] = LAYOUT(QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MG_F19, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; // Runs constantly in the background, in a loop. -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (rgb_matrix_get_flags() & (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER)) { if (IS_LAYER_ON(_UTILITY)) { @@ -108,6 +108,7 @@ void rgb_matrix_indicators_user(void) { } } + return false; } @@ -173,7 +174,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } } } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md index f388a3fbf1..94e268a0e3 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/readme.md @@ -49,4 +49,4 @@ - Shutdown: `HYPER(F19)` - `MG_F17` → `MG_F19` - Encoder press, triggers debug output. - - `KC_MUTE` → `DEBUG` + - `KC_MUTE` → `DB_TOGG` diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h index 46719e3a78..da70d56b7b 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/config.h @@ -19,7 +19,7 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_DISABLE_WHEN_USB_SUSPENDED -#define RGB_DISABLE_TIMEOUT 90000 +#define RGB_MATRIX_TIMEOUT 90000 #define MACRO_TIMER 5 diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c index 049f4df7e4..43ed195fbb 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c @@ -49,7 +49,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { (*encoder_mapping[state][1])(); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } void handle_rgb_key(bool pressed) { diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c index f553874eb0..cb47824c80 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/fun.c @@ -19,7 +19,7 @@ static bool wpm_rgb_enabled = false; static uint8_t rgb_mode; -void rgb_matrix_indicators_keymap(void) { +bool rgb_matrix_indicators_keymap(void) { if (wpm_rgb_enabled && rgb_matrix_is_enabled()) { uint8_t wpm = get_current_wpm(); dprintf("WPM = %d\n", wpm); @@ -28,6 +28,7 @@ void rgb_matrix_indicators_keymap(void) { RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); } + return false; } bool process_record_fun(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c index dda68fda2f..607606b3e7 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.c @@ -51,7 +51,7 @@ void suspend_wakeup_init_user(void) { } #ifdef RGB_MATRIX_ENABLE -void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { // Turn on sideglow when CAPS LOCK is activated if (host_keyboard_led_state().caps_lock) { HSV hsv = {CAPS_LOCK_COLOR}; @@ -64,5 +64,6 @@ void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { } } } + return false; } #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h index 30b1b389bc..b35ad7590d 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/mike1808.h @@ -90,7 +90,7 @@ enum combos { #define KC_LINX KC_LINUX -#define KC_RESET RESET +#define KC_RESET QK_BOOT #define KC_RST KC_RESET #define OS_GIT OSL(GIT) diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c index 6f4d333ede..0106d80c14 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.c @@ -15,9 +15,9 @@ */ #include "rgb_matrix_ledmaps.h" -__attribute__((weak)) void rgb_matrix_indicators_keymap(void) { return; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { - return; +__attribute__((weak)) bool rgb_matrix_indicators_keymap(void) { return true; } +__attribute__((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + return true; } #ifdef RGB_MATRIX_LEDMAPS_ENABLED @@ -26,15 +26,15 @@ static bool enabled = true; #endif // RGB_MATRIX_LEDMAPS_ENABLED -void rgb_matrix_indicators_user(void) { rgb_matrix_indicators_keymap(); } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_user(void) { return rgb_matrix_indicators_keymap(); } +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #ifdef RGB_MATRIX_LEDMAPS_ENABLED if (rgb_matrix_is_enabled() && enabled) { set_layer_rgb(led_min, led_max, get_highest_layer(layer_state | default_layer_state)); } #endif // RGB_MATRIX_LEDMAPS_ENABLED - rgb_matrix_indicators_advanced_keymap(led_min, led_max); + return rgb_matrix_indicators_advanced_keymap(led_min, led_max); } #ifdef RGB_MATRIX_LEDMAPS_ENABLED @@ -44,7 +44,7 @@ void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) { uint8_t val = rgb_matrix_get_val(); - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { HSV hsv = { .h = (*l)[i][0], .s = (*l)[i][1], diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h index eace217d18..931dfa0704 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/rgb_matrix_ledmaps.h @@ -48,7 +48,7 @@ ka4, k73 \ } // clang-format on -typedef uint8_t ledmap[DRIVER_LED_TOTAL][3]; +typedef uint8_t ledmap[RGB_MATRIX_LED_COUNT][3]; extern const ledmap ledmaps[]; void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer); @@ -96,5 +96,5 @@ void rgb_matrix_layers_disable(void); #endif // RGB_MATRIX_LEDMAPS_ENABLED -void rgb_matrix_indicators_keymap(void); -void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); +bool rgb_matrix_indicators_keymap(void); +bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c index e59db7b984..c1815a2e28 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c @@ -77,29 +77,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN1] = LAYOUT( - KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_INS, _______, - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, QK_BOOT, RGB_M_B, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW, + KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SCRL, KC_PAUS, _______, KC_INS, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, QK_BOOT, RGB_M_B, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW, _______, KC_WINLK, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI ), [_MO2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_MO2), _______, _______, _______, _______ ), [_MO3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } } break; - + case _BASE: default: if ( clockwise ) { @@ -136,9 +136,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } else { tap_code(KC_VOLD); } - break; + break; } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif @@ -149,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ball[i].up = false; ball[i].y = 0; ball[i].x = rand() % 16; - + // Set initial ball state if (ball[i].x < 8) { ball[i].left = false; @@ -157,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ball[i].x -= 4; ball[i].left = true; } - + // 1/4 chance of being an enemy ball after level 6 if (level_number > 3) { ball[i].enemy = ((rand() % 4) == 0); @@ -172,14 +173,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } damage_timer = timer_read(); damage_count = 10; - + // Reset board init_ball(0); ball[1].on = false; } // Capslock, Scroll lock and Numlock indicator on Left side lights. - void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { switch(get_highest_layer(layer_state)) { case _FN1: // Light up FN layer keys @@ -189,7 +190,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_value.g = 0x00; rgb_value.b = 0x00; } - + if (rgb_value.r == 0xff && rgb_value.g < 0xff) { if (rgb_value.b > 0) { --rgb_value.b; } else { ++rgb_value.g; } @@ -200,29 +201,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (rgb_value.g > 0) { --rgb_value.g; } else { ++rgb_value.r; } } - - for (uint8_t i=0; i<sizeof(LED_RGB)/sizeof(LED_RGB[0]); i++) { + + for (uint8_t i=0; i<ARRAY_SIZE(LED_RGB); i++) { rgb_matrix_set_color(LED_RGB[i], rgb_value.r, rgb_value.g, rgb_value.b); } - - for (uint8_t i=0; i<sizeof(LED_WHITE)/sizeof(LED_WHITE[0]); i++) { + + for (uint8_t i=0; i<ARRAY_SIZE(LED_WHITE); i++) { rgb_matrix_set_color(LED_WHITE[i], RGB_WHITE); } - for (uint8_t i=0; i<sizeof(LED_GREEN)/sizeof(LED_GREEN[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_GREEN); i++) { rgb_matrix_set_color(LED_GREEN[i], RGB_GREEN); } - + rgb_matrix_set_color(LED_ESC, RGB_RED); - + rgb_matrix_set_color(LED_LWIN, RGB_BLUE); break; - + case _MO2: // Paddle game if (!game_start) { srand((unsigned int)timer_read()); - + // Store user light settings last_hsv = rgb_matrix_get_hsv(); rgb_matrix_sethsv_noeeprom(0, 0, 0); @@ -230,7 +231,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_value.r = 0xff; rgb_value.g = 0x00; rgb_value.b = 0x00; - + paddle_pos_full = 8; paddle_lives = 4; bounce_count = 0; @@ -243,17 +244,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { game_start = true; } - + // Set level indicator if (level_number < 12) { rgb_matrix_set_color(GAME_R0[level_number], RGB_BLUE); } - + // Set life bar for (uint8_t i=0; i < paddle_lives ; i++) { rgb_matrix_set_color(GAME_LIVES[i], RGB_GREEN); } - + uint8_t paddle_pos = paddle_pos_full >> 1; if (damage_count > 0) { @@ -270,14 +271,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (damage_count == 0) { ball_timer = timer_read(); } - + } else if (paddle_lives == 0) { // Game over - for (uint8_t i=0; i<sizeof(LED_GAME_OVER)/sizeof(LED_GAME_OVER[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_GAME_OVER); i++) { rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED); } - + } else if (level_number >= 12) { // You win if (rgb_value.r == 0xff && rgb_value.g < 0xff) { @@ -290,7 +291,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (rgb_value.g > 0) { --rgb_value.g; } else { ++rgb_value.r; } } - + for (uint8_t i=0; i < 3 ; i++) { rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], rgb_value.r, rgb_value.g, rgb_value.b); } @@ -298,15 +299,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_matrix_set_color(GAME_SMILE1[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b); rgb_matrix_set_color(GAME_SMILE2[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b); rgb_matrix_set_color(GAME_SMILE2[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b); - + } else { // normal game loop - + // Set paddle position for (uint8_t i=0; i < 3 ; i++) { rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_GREEN); } - + // Ball movement logic happens at intervals if (timer_elapsed(ball_timer) > GAME_TIMER[level_number]) { for (int i=0; i<2; ++i) { @@ -331,7 +332,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (ball[i].y > 4) { // Remove a life if ball isn't returned and isn't enemy if (!ball[i].enemy) { - hurt_paddle(); + hurt_paddle(); i = 2; } else { ball[i].on = false; @@ -351,7 +352,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } ball_timer = timer_read(); } - + // Other ball stuff for (int i=0; i<2; ++i) { if (ball[i].on) { @@ -410,12 +411,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { break; } } - } + } } - + break; - + default: fn_active = false; if (game_start) { @@ -423,7 +424,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { game_start = false; rgb_matrix_sethsv_noeeprom(last_hsv.h, last_hsv.s, last_hsv.v); } - break; + break; } if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { @@ -439,12 +440,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_matrix_set_color(LED_CAPS, RGB_WHITE); if (caps_flash_on) { - for (uint8_t i=0; i<sizeof(LED_SIDE_LEFT)/sizeof(LED_SIDE_LEFT[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_SIDE_LEFT); i++) { rgb_matrix_set_color(LED_SIDE_LEFT[i], RGB_RED); rgb_matrix_set_color(LED_SIDE_RIGHT[i], RGB_RED); } } else { - for (uint8_t i=0; i<sizeof(LED_SIDE_LEFT)/sizeof(LED_SIDE_LEFT[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_SIDE_LEFT); i++) { rgb_matrix_set_color(LED_SIDE_LEFT[i], 0, 0, 0); rgb_matrix_set_color(LED_SIDE_RIGHT[i], 0, 0, 0); } @@ -458,6 +459,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { if (keymap_config.no_gui) { rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled } + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c index e4569ac3ad..6ba850b3e5 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/stickandgum/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, KC_CALC, KC_MYCM, KC_MSEL, KC_MAIL, KC_WHOM, _______, _______, _______, _______, _______, KC_WAKE, KC_SLEP, KC_PAUS, _______, - LED_TILDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, KC_INS, KC_SLCK, + LED_TILDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, KC_INS, KC_SCRL, _______, RGB_SAI, RGB_VAI, RGB_HUI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, KC_BRIU, _______, RGB_RMOD, RGB_VAD, RGB_MOD, RGB_SPI, _______, _______, _______, _______, QMKBEST, _______, _______, _______, KC_BRID, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_MPLY, KC_PWR, @@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { set_mods(mod_state); // Add back in the CTRL key - so ctrl-key will work if ctrl was never released after paging. } else if (get_mods() & MOD_MASK_SHIFT) { uint8_t mod_state = get_mods(); - unregister_mods(MOD_MASK_SHIFT); + unregister_mods(MOD_MASK_SHIFT); if (clockwise) { #ifdef MOUSEKEY_ENABLE // If using the mouse scroll - make sure MOUSEKEY is enabled tap_code(KC_MS_WH_DOWN); @@ -96,7 +96,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif //ENCODER_ENABLE @@ -108,17 +109,17 @@ static void set_rgb_scroll_leds_off(void); // Called on powerup and is the last _init that is run. void keyboard_post_init_user(void) { - + int mods[35] = {0,2,3,4,5,11,17,33,49,55,65,95,97,79,94,85,93,96,90,69,92,67,76,80,91,75,86,68,77,81,92,28,34,39,44}; int j; - + /* output each array element's value */ for (j = 0; j < 35; j++ ) { g_led_config.flags[mods[j]] = LED_FLAG_MODIFIER; } - if (!rgb_matrix_is_enabled()) { - rgb_matrix_enable(); + if (!rgb_matrix_is_enabled()) { + rgb_matrix_enable(); #ifdef CONSOLE_ENABLE uprintf("ERROR! RGB Matrix Enabled and wrote to EEPROM! -How was the RGB Matrix Disabled?"); #endif @@ -205,19 +206,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LED_EQL: rgb_matrix_mode(RGB_MATRIX_TYPING_HEATMAP); break; - #endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS + #endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS case QMKBEST: if (record->event.pressed) { // when keycode QMKBEST is pressed SEND_STRING("QMK rocks"); - } else { // when keycode QMKBEST key is released + } else { // when keycode QMKBEST key is released SEND_STRING("!!"); } break; - } + } return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (host_keyboard_led_state().caps_lock) { set_rgb_caps_leds_on(); } else { @@ -232,6 +233,7 @@ void rgb_matrix_indicators_user(void) { set_rgb_scroll_leds_off(); } } + return false; } // RGB led number layout, function of the key @@ -245,7 +247,7 @@ void rgb_matrix_indicators_user(void) { // 87, led 07 88, led 18 // 91, led 08 92, led 19 -static void set_rgb_caps_leds_on() { +static void set_rgb_caps_leds_on() { rgb_matrix_set_color(0, 255, 0, 0); //Escape Key rgb_matrix_set_color(3, 255, 0, 0); //capslock key rgb_matrix_set_color(5, 255, 0, 0); //Left CTRL key @@ -289,11 +291,11 @@ static void set_rgb_caps_leds_off() { rgb_matrix_set_color(92, 0, 0, 0); //Right LED 19 } -static void set_rgb_scroll_leds_on() { +static void set_rgb_scroll_leds_on() { rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME) } -static void set_rgb_scroll_leds_off() { +static void set_rgb_scroll_leds_off() { rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME) } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c index 22288f2d2c..8d425cdf1e 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/trwnh/keymap.c @@ -54,7 +54,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { // 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 +// 91, led 08 #ifdef RGB_MATRIX_ENABLE static void set_rgb_caps_leds_on(void); @@ -132,15 +132,15 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { rgb_matrix_set_color(43, 0, 0, 0); // M } - static void set_rgb_scroll_leds_on() { + static void set_rgb_scroll_leds_on() { rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME) } - static void set_rgb_scroll_leds_off() { + static void set_rgb_scroll_leds_off() { rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME) } - void rgb_matrix_indicators_user(void) { + bool rgb_matrix_indicators_user(void) { // Left side rainbow rgb_matrix_set_color(67, 255, 0, 0); // Left LED 01 rgb_matrix_set_color(70, 255, 127, 0); // Left LED 02 @@ -175,6 +175,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { set_rgb_scroll_leds_off(); } } + return false; } -#endif // RGB_MATRIX_ENABLE
\ No newline at end of file +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/via/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/via/keymap.c index 71e3ecd5e6..73e56752b7 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/via/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/via/keymap.c @@ -84,4 +84,4 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) } }; -#endif
\ No newline at end of file +#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c index fd64902108..13c58d0392 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/wholesomeducky/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END @@ -53,5 +53,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_MS_WH_LEFT); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c index 2ee79eae79..5343f1b649 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/willwm/keymap.c @@ -69,5 +69,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_VOLD); } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } |