Update 'keyboards/kyria/keymaps/frederik/keymap.c'
added ctrl tabbing in browser
This commit is contained in:
parent
065756536f
commit
0cc35a8421
@ -18,6 +18,9 @@
|
||||
bool is_alt_tab_active = false;
|
||||
uint16_t alt_tab_timer = 0;
|
||||
|
||||
bool is_ctrl_tab_active = false;
|
||||
uint16_t ctrl_tab_timer = 0;
|
||||
|
||||
uint16_t copy_paste_timer;
|
||||
|
||||
enum layers {
|
||||
@ -224,6 +227,13 @@ void matrix_scan_user(void) {
|
||||
is_alt_tab_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_ctrl_tab_active) {
|
||||
if (timer_elapsed(ctrl_tab_timer) > 750) {
|
||||
unregister_code(KC_LCTRL);
|
||||
is_ctrl_tab_active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
@ -319,6 +329,23 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code16(S(KC_TAB));
|
||||
}
|
||||
break;
|
||||
case RAISE:
|
||||
if (!clockwise) {
|
||||
if (!is_ctrl_tab_active) {
|
||||
is_ctrl_tab_active = true;
|
||||
register_code(KC_LCTRL);
|
||||
}
|
||||
ctrl_tab_timer = timer_read();
|
||||
tap_code16(KC_TAB);
|
||||
} else {
|
||||
if (!is_ctrl_tab_active) {
|
||||
is_ctrl_tab_active = true;
|
||||
register_code(KC_LCTRL);
|
||||
}
|
||||
ctrl_tab_timer = timer_read();
|
||||
tap_code16(S(KC_TAB));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// History scrubbing. For Adobe products, hold shift while moving
|
||||
// backward to go forward instead.
|
||||
|
Loading…
Reference in New Issue
Block a user