-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support keyboard Epomaker TH66 #18904
Conversation
Not sure if some of the previous changes made to the original upload of the TH66 firmware resolves this, but I noticed my TH66 had a similar issue to the one presented in /issues/6726 (more specifically, turning the PC off without disconnecting the keyboard would result in apparent corruption of the firmware after some time had passed, necessitating re-flashing). The stated solution of adding |
Thank you for your contribution! |
Done, updated the entire code with new info.json thing. If anyone have time, please take a look and help me review it |
#ifdef ENCODER_ENABLE | ||
bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
if (!encoder_update_user(index, clockwise)) { | ||
return false; /* Don't process further events if user function exists and returns false */ | ||
} | ||
if (index == 0) { /* First encoder */ | ||
if (layer_state_is(0)) { | ||
if (clockwise) { | ||
tap_code(KC_VOLU); | ||
} else { | ||
tap_code(KC_VOLD); | ||
} | ||
} else if (layer_state_is(1)) { | ||
if (clockwise) { | ||
tap_code(KC_VOLU); | ||
} else { | ||
tap_code(KC_VOLD); | ||
} | ||
} else if (layer_state_is(2)) { | ||
if (clockwise) { | ||
tap_code(KC_TRNS); | ||
} else { | ||
tap_code(KC_TRNS); | ||
} | ||
} else if (layer_state_is(3)) { | ||
if (clockwise) { | ||
tap_code(KC_TRNS); | ||
} else { | ||
tap_code(KC_TRNS); | ||
} | ||
} | ||
} | ||
return true; | ||
} | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is/will be the core default behaviour.
#ifdef ENCODER_ENABLE | |
bool encoder_update_kb(uint8_t index, bool clockwise) { | |
if (!encoder_update_user(index, clockwise)) { | |
return false; /* Don't process further events if user function exists and returns false */ | |
} | |
if (index == 0) { /* First encoder */ | |
if (layer_state_is(0)) { | |
if (clockwise) { | |
tap_code(KC_VOLU); | |
} else { | |
tap_code(KC_VOLD); | |
} | |
} else if (layer_state_is(1)) { | |
if (clockwise) { | |
tap_code(KC_VOLU); | |
} else { | |
tap_code(KC_VOLD); | |
} | |
} else if (layer_state_is(2)) { | |
if (clockwise) { | |
tap_code(KC_TRNS); | |
} else { | |
tap_code(KC_TRNS); | |
} | |
} else if (layer_state_is(3)) { | |
if (clockwise) { | |
tap_code(KC_TRNS); | |
} else { | |
tap_code(KC_TRNS); | |
} | |
} | |
} | |
return true; | |
} | |
#endif |
Thank you for your contribution! |
Thank you for your contribution! |
Description
Added support keyboard Epomaker TH66
Types of Changes
Checklist