GMMK Pro: fix unintended volume encoder taps (#17129)
This commit is contained in:
parent
94d5fe6f90
commit
32204f4a03
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -102,17 +102,6 @@ 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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
# Enable additional features.
|
||||
|
||||
DEBOUNCE_TYPE = sym_defer_pk
|
||||
|
||||
# Disabling MouseKey because it breaks my KVM switch
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -59,14 +59,3 @@ 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 false;
|
||||
}
|
||||
#endif // ENCODER_ENABLE
|
||||
|
|
|
@ -52,7 +52,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;
|
||||
}
|
||||
|
||||
void rgb_matrix_indicators_user(void) {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,8 @@ 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -173,7 +173,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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -138,7 +138,8 @@ 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -76,14 +76,3 @@ 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 false;
|
||||
}
|
||||
#endif // ENCODER_ENABLE
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -59,14 +59,3 @@ 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 false;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -102,7 +102,8 @@ 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
|
||||
|
||||
|
|
|
@ -78,14 +78,3 @@ 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 false;
|
||||
}
|
||||
#endif // ENCODER_ENABLE
|
||||
|
|
|
@ -84,7 +84,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
//return true; //set to return false to counteract enabled encoder in pro.c
|
||||
return false;
|
||||
}
|
||||
#endif // ENCODER_ENABLE
|
||||
|
||||
|
|
Loading…
Reference in New Issue