App switch keystroke function for alt-tab command-tab

12 votes

Add a custom keystroke function, FN_ALTTAB (like how Via has FN_MO13 and FN_MO23) for alt-tab (or for Mac, command-tab FN_CMDTAB).

Ideally, tapping this key would trigger Alt+Tab.

Because of the behaviour of holding Alt to hold the OS app switcher panel open, if an MO or TT key is being held, releasing that layer should be the point when Alt is released.

If this is bound to a naked key or rotary encoder, start a timeout before alt is released, or perhaps release alt before the next keystroke is sent. Every time the function is called, the timeout is reset. The timeout could be 1000ms.

EG:
FN_ALTTAB is assigned to a keymap spot on layer 1.

MO(1)
...
FN_ALTTAB --> hold LAlt, send KC_TAB
...
FN_ALTTAB ---> (continue hold LAlt) send KC_TAB
...
FN_ALTTAB ---> (continue hold LAlt) send KC_TAB
...
any other event, or release MO(1), or timeout ---> release LAlt, clear timeout

see: https://github.com/qmk/qmk_firmware/blob/master/keyboards/dz60/keymaps/_bonfire/not-in-use/super-alt-tab.c

Under consideration Suggested by: Juniper Upvoted: 04 Nov, '23 Comments: 1

Comments: 1