Skip to content

Commit

Permalink
Update keymap.c
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaxin96 committed Jun 24, 2021
1 parent cf51e9c commit 79e2882
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions keyboards/yandrstudio/rainbow65/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,17 @@ void encoder_update_user(uint8_t index, bool clockwise) {
uprintf("%ud rgb speed\n", rgb_matrix_config.speed);

// uprintf("%ud g_rgb_time scale8\n", scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4));
uint16_t keycode = KC_TRNS;
if (clockwise) {
uint16_t keycode = dynamic_keymap_get_keycode(biton32(layer_state), 4, 3);
if (keycode >= MACRO00 && keycode <= MACRO15) {
dynamic_keymap_macro_send(keycode - MACRO00);
} else {
tap_code16(keycode);
}
keycode = dynamic_keymap_get_keycode(biton32(layer_state), 4, 3);
} else {
uint16_t keycode = dynamic_keymap_get_keycode(biton32(layer_state), 4, 4);
if (keycode >= MACRO00 && keycode <= MACRO15) {
dynamic_keymap_macro_send(keycode - MACRO00);
} else {
tap_code16(keycode);
}
keycode = dynamic_keymap_get_keycode(biton32(layer_state), 4, 4);
}

if (keycode >= MACRO00 && keycode <= MACRO15) {
dynamic_keymap_macro_send(keycode - MACRO00);
} else {
tap_code16(keycode);
}
}
#endif
Expand Down

0 comments on commit 79e2882

Please sign in to comment.