Added super alt-tab

- going to remove it though so I can hold different mods for chrome
and windows. Wanted to save the code since I spent time working on it
- General code cleanup
- introduced klor and rollow keyboard.json
- set encoder resolution to 4 for alt tab to work right
This commit is contained in:
Victor 2024-07-02 23:29:06 -05:00
parent bd72a9b350
commit edf4c932f2
Failed to generate hash of commit
19 changed files with 172 additions and 129 deletions

View file

@ -3,8 +3,7 @@
static uint32_t luna_anim_timer = 0;
static uint8_t luna_current_frame = 0;
void render_luna(void) {
void render_luna (void) {
#if OLED_TIMEOUT > 0
// the animation prevents the normal timeout from occuring
if (last_input_activity_elapsed() > OLED_TIMEOUT && last_led_activity_elapsed() > OLED_TIMEOUT) {
@ -19,13 +18,10 @@ void render_luna(void) {
luna_anim_timer = timer_read32();
animate_luna(OLED_LUNA_COL, OLED_LUNA_LINE);
}
}
void animate_luna(uint8_t col, uint8_t line) {
uint8_t current_mod = get_mods();
uint8_t current_osm = get_oneshot_mods();
void animate_luna (uint8_t col, uint8_t line) {
uint8_t current_mods = get_mods() | get_oneshot_mods();
// Make Luna Jump when spacebar is pressed
// Only works when Luna is rendered on Master Slide
@ -48,7 +44,7 @@ void animate_luna(uint8_t col, uint8_t line) {
// Animate based on status
if (host_keyboard_led_state().caps_lock || is_caps_word_on()) {
oled_write_raw_P(bark[luna_current_frame], OLED_LUNA_ANIM_SIZE);
} else if ((current_mod | current_osm) & MOD_MASK_CTRL) {
} else if (current_mods & MOD_MASK_CTRL) {
oled_write_raw_P(sneak[luna_current_frame], OLED_LUNA_ANIM_SIZE);
} else if (get_current_wpm() <= OLED_LUNA_MIN_WALK_SPEED) {
oled_write_raw_P(sit[luna_current_frame], OLED_LUNA_ANIM_SIZE);