Skip to content

Commit

Permalink
make encoder behavior default
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyac6 committed Aug 4, 2021
1 parent 4d021b3 commit 7264380
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
14 changes: 13 additions & 1 deletion keyboards/gentleman65/gentleman65.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "gentleman65.h"
#include "gentleman65.h"

bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code_delay(KC_AUDIO_VOL_UP, 10);
} else {
tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
}
}
return true;
}
10 changes: 0 additions & 10 deletions keyboards/gentleman65/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),

};

void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
} else {
tap_code(KC_AUDIO_VOL_DOWN);
}
}
}
9 changes: 0 additions & 9 deletions keyboards/gentleman65/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

};

void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
} else {
tap_code(KC_AUDIO_VOL_DOWN);
}
}
}

0 comments on commit 7264380

Please sign in to comment.