GMMK Pro: fix unintended volume encoder taps (#17129)

master
Andre Brait 2022-09-24 18:37:04 +02:00 committed by GitHub
parent 94d5fe6f90
commit 32204f4a03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 83 additions and 125 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -1,6 +1,4 @@
# Enable additional features.
DEBOUNCE_TYPE = sym_defer_pk
# Disabling MouseKey because it breaks my KVM switch
MOUSEKEY_ENABLE = no

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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