updated default keymap, encoders code was broken when RGB light is enabled

This commit is contained in:
Sadek Baroudi 2021-09-27 21:24:45 -07:00
parent deb8fc4ed9
commit 6773c67c2d
2 changed files with 4 additions and 24 deletions

View File

@ -25,7 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT_ID 0x5850
//#define DEVICE_VER 0x0001 // Now defined in the revX/config.h
#define MANUFACTURER sadekbaroudi
#define PRODUCT barobord
#define PRODUCT sadekbaroudi barobord
#define DESCRIPTION sadekbaroudi barobord
/* key matrix size */
/* Rows are doubled up */
@ -145,3 +146,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// If using encoder type 2, uncomment this
// #define ENCODERS_B_REVERSE
#define DYNAMIC_KEYMAP_LAYER_COUNT 5

View File

@ -148,22 +148,10 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#else
if (clockwise) {
#endif
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_increase_hue();
#else
tap_code(KC_VOLU);
#endif
} else {
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_decrease_hue();
#else
tap_code(KC_VOLD);
#endif
}
#ifdef RGBLIGHT_ENABLE
rgb_set_user_config_from_current_values();
#endif
}
else if (index == 1) {
// Conditional to reverse the direction of encoder number 1
@ -173,22 +161,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
#else
if (clockwise) {
#endif
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_step();
#else
tap_code16(C(KC_RGHT));
#endif
}
else{
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_step_reverse();
#else
tap_code16(C(KC_LEFT));
#endif
}
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgb_set_user_config_from_current_values();
#endif
}
return true;