Here’s how I’ve set up F3 to toggle between the last two active tabs in Chrome and Safari.
First, a demo:
Step 1
Download the macro set from https://forum.keyboardmaestro.com/t/macro-set-toggle-between-browser-tabs/6824.
Step 2
Open the file and import the “Browsers” group to Keyboard Maestro.
Enable the macro group and both the macros inside.
Step 3
Select the “@Browser @Toggle to @Previous @Tab” macro and set F3 as the trigger.