diff options
author | vin <git@vineetk.net> | 2023-10-15 19:46:33 -0400 |
---|---|---|
committer | vin <git@vineetk.net> | 2023-10-15 19:46:33 -0400 |
commit | 7ed78a843d4a90ae8adc69bf3c3dbf573a379f75 (patch) | |
tree | 420f8e7829b46bf43b5dbafc46f0a72f644e9588 /users/danielo515/alt_tab.c | |
parent | 392a85e1f6fefd549cd52945ab1447a2d6901484 (diff) |
remove userspace declarations
Diffstat (limited to 'users/danielo515/alt_tab.c')
-rw-r--r-- | users/danielo515/alt_tab.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/users/danielo515/alt_tab.c b/users/danielo515/alt_tab.c deleted file mode 100644 index 1602ee6fb2..0000000000 --- a/users/danielo515/alt_tab.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "danielo515.h" -#include "alt_tab.h" - -bool altPressed = false; -__attribute__((weak)) void alt_tab_activated(void){}; -__attribute__((weak)) void alt_tab_deactivated(void){}; -extern bool onMac; - -// =============== ALT_TAB single key handling -bool process_alt_tab(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case ALT_TAB: - if (!record->event.pressed) { - return false; - } - if (altPressed) { - tap_code(KC_TAB); - } else { - altPressed = true; - onMac ? register_code(KC_LGUI) : register_code(KC_LALT); - tap_code(KC_TAB); - alt_tab_activated(); - } - // avoid alt releasing if the key is of movement - case KC_RIGHT ... KC_UP: - if (altPressed) { - return true; // yes QMK, do your stuff - } - } - // Reset sticky alt tab when any other key is pressed - if (altPressed) { - onMac ? unregister_code(KC_LGUI) : unregister_code(KC_LALT); - altPressed = false; - alt_tab_deactivated(); - return false; - } - return true; -}; |