On a normal day I have several different windows open of all my applications. But for the sake of simplicity I will name one simple example:
- Chrome A left side of the screen (documentation)
- Chrome B right side of the screen (viewing result)
- Terminal A left side of the screen (the webserver, useful when viewing results)
- Terminal B right side of the screen (code window, I need the documentation chrome when using this).
Is there any keyboard shortcut to move Chrome A to the foreground without moving Chrome B to the foreground as well?
- With Apple-tab it switches the application and move both of them to the foreground.
- With Apple-` it switches the windows between the application so that doesn't work either.
Is there any keyboard shortcut to do this?
Desired behaviour: show Chrome A with Terminal B and Chrome B with Terminal A.
Note that I am looking for keyboard shortcuts, NO mouse clicks 🙂
Best Answer
You can use Witch to select and raise only specific windows.
This would usually focus the second window in creation order:
set frontmost to true
andactivate
would also raise other windows.set index to 1
doesn't actually raise the window, but it makes it appear as window 1 to System Events, which canAXRaise
it. See this answer for different ways to assign shortcuts to scripts.This would select a window by the URLs of tabs: