Sometimes I want to switch between multiple windows quickly, or even toggle between them. Having two keys - alt+tab - allows me to enter the "window switching" state by pressing alt, while tab increments the selection, and shift+tab decrements (all while holding alt down). I leave switching state when I release alt.
Alt+tab is an optimal controller.
Maybe operating on the order of items in the queue, and use your prediction to sort windows, allowing faster selection? Even that disrupts sense of place - I know what applications I have open and where they are, and if I'm using alt+tab over 5 or more, I know the order in which I've opened them, and "where" I need to go to navigate to them.
There are second and third order impacts to changing interface behaviors, so the superficial benefit you might gain will be lost by creating friction at different levels.
A single key is insufficient for granular control, and no AI widget short of human level AI is going to capture the edge cases, which will create friction, at which point I will aggressively remove the offending piece of software.
I'd go back to the drawing board and work on a more complex model of window switching and all the ways in which people use alt+tab, and see if there's a use case for your idea at a different level. As it is, for me, it would interfere with a reliable and predictable interface, and I would be very unhappy.
> Alt+tab is an optimal controller.
Having to iterate through your windows is not optimal. I use sway, with windows divided across workspaces. So if I want to switch to my web browser I hit super+1. If I want to switch to my code editor I hit super+2. If I want to switch to my terminal(s) I hit super+3. I use 4 through 0 for other random windows (for example, I usually launch games or videos on 0. If I'm working in two code bases I generally put the editor and terminal for the 2nd code base on 4 and 5).
What takes you O(n) takes me only O(1).
Standard out-of-the-box Windows behavior: quick Alt-Tab press switches between last two windows; pinned apps on taskbar are switched with Win-1..9 shortcuts.
press alt, tap tab, click the window you want
If you're going to go all the way to the mouse, you could just... click the window you want.
I don't understand why people like to navigate their windows temporally.
Super+h/j/k/l (left, down, up, right) to move focus spatially feels much more natural, given that you can know at a glance which window is to the left of yours but they typically give no indication about whether a window is the 6th most recently touched or the 7th...
I do this with tiling and Super+f for maximizing the focused window. It feels wrong when I work in other environments without this.