Is it possible to automatically move the mouse to anywhere in the window that has gained focus by a keystroke?
For example:
- There are two monitors.
- Mouse is near the left edge of the monitor on the left.
- Using Alt+Tab, a window residing at the monitor on the right is switched and you have to move the mouse to this window.
- It will be great to move the mouse into this window automatically or at least with a keyboard shortcut.
Best Answer
I just had the same need and ended up here looking for a solution to the problem.
As it doesn't seem like something that anybody else solved anywhere else, I used my basic shell skills to create the following script, which does the job using
xdotool
:I've put this in a file and added a custom keyboard shortcut that runs it.