Skip to content

Commit

Permalink
first pass on encoder map. Not functioning whatsoever
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan-OS committed Feb 22, 2023
1 parent f7894c4 commit c417a24
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
15 changes: 0 additions & 15 deletions keyboards/aidansmithdotdev/fine40/fine40.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,4 @@ bool oled_task_kb(void) {
//render_logo();
return(true);
}
#endif

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
return false;
}
#endif
9 changes: 9 additions & 0 deletions keyboards/aidansmithdotdev/fine40/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MS_L , KC_MS_D , KC_MS_U , KC_MS_R , _______
),
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_MAIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LEFT] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_RIGHT] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_TAB] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
};
#endif
9 changes: 9 additions & 0 deletions keyboards/aidansmithdotdev/fine40/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MS_L , KC_MS_D , KC_MS_U , KC_MS_R , _______
),
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_MAIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LEFT] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_RIGHT] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_TAB] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
};
#endif
1 change: 1 addition & 0 deletions keyboards/aidansmithdotdev/fine40/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
OLED_DRIVER = SSD1306
ENCODER_MAP_ENABLE = yes

1 comment on commit c417a24

@Aidan-OS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, this is functioning. The board being used to test was broken.

Please sign in to comment.