Skip to content

Commit

Permalink
GMMK Pro: fix unintended volume encoder taps
Browse files Browse the repository at this point in the history
Fixes some user layouts that were affected by e335d62 (qmk#16721
  • Loading branch information
andrebrait committed Sep 15, 2022
1 parent 56bad5d commit 3a7a231
Show file tree
Hide file tree
Showing 25 changed files with 85 additions and 127 deletions.
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/alexmarmon/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/config.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 0 additions & 11 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/andrebrait/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Enable additional features.

DEBOUNCE_TYPE = sym_defer_pk

# Disabling MouseKey because it breaks my KVM switch
MOUSEKEY_ENABLE = no
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/byungyoonc/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -77,7 +78,7 @@ 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++) {
// HSV hsv = {
Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/coryginsberg/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
11 changes: 0 additions & 11 deletions keyboards/gmmk/pro/rev1/ansi/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/gigahawk/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/hachetman/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/jackkenney/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/jonavin/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/macos/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/mattgauf/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev1/ansi/keymaps/mike1808/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 3a7a231

Please sign in to comment.