How to switch focus between screens in MacOS

As a software developer I tend to use two screens for my workflows.

One is for web browsing (StackOverFlow, Google) and testing in localhost. And the second screen is dedicated for terminal/vim.

One source of frustration of mine was that I had to use the mouse only to click in the other screen in order to switch the focus.

Luckily, I was able to learn how to avoid doing that:

# Download and unzip Catch Mouse
wget https://github.com/round/CatchMouse/archive/master.zip
# install Karabiner Elements
brew cask install karabiner-elements

Move Catch Mouse.app to Applications folder

And then open it

Currently these are the shortcuts that I am using for CatchMouse

You will be able to switch the mouse between the screens, but you will still need a mouse click in order to switch the focus.

This is when Karabiner Elements comes to rescue.

When I press the right shift key my OS thinks that I am clicking with the left button

And thats all !!
When I need to switch to my terminal I just press:

⌥⌘l (option+command+l) -> to switch the mouse to my right screen
right⇧ (right shift) -> to click to switch the focus

And when I need to switch to the web browser I just press:

⌥⌘k (option+command+k) -> to switch the mouse to my left screen
right⇧ (right shift) -> to click to switch the focus