How to Set Key to Switch to Browser

By Xah Lee. Date: . Last updated: .

This page shows you how to set a function key to switch to your favorite app. For example, set F8 to switch to browser.

There are 2 or 3 apps you use all the time. So, it's nice to set a single key to switch to them.

What is wrong with Alt+Tab?

Alt+Tab】 or 【⌘ command+Tab】 are inferior, because:

If you set a single F key to switch to a specific app, it becomes muscle memory.

Here's how for {Mac OS X, Linux, Microsoft Windows}.

Mac OS

Mac Quicksilver key trigger panel
Mac Quicksilver key trigger panel

Use QuickSilver. Just install it and use the GUI to set a key to app.

Mac: Keyboard/Automation Tools

Microsoft Windows

For Windows, use AutohotKey.

Install AutoHotkey. See: AutoHotkey Tutorial.

Copy and paste the following into a file:

; 2010-04-01, 2011-11-27
; launch or switch to firefox

#NoTrayIcon
SetTitleMatchMode, 2

If WinExist("Mozilla Firefox")
{
  If WinActive("Mozilla Firefox") {
    WinActivateBottom, Mozilla Firefox
      } Else {
    WinActivate
}
}
Else
{
  Run "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
}
Return

ExitApp

Save it as a file and name it launch_or_switch_firefox.ahk

Create another file, with the following content:

$F9::Run "C:\Users\mary\ahk_scripts\launch_or_switch_firefox.ahk"

Double click to run it.

Now, F9 will switch to Firefox, or launch it if not already running.

Linux

Linux: Add Keyboard Shortcut to Switch App

Did i $save$ you from getting a brick?

$5 me, at patreon
or paypal to xah@xahlee.org

If you have a question, put $5 at patreon and message me.

  1. Ergo Keyboards
  2. PC Keyboards
  3. Fun Keyboards
  4. Keypads
  5. Do-It-Yourself
  6. History
  7. Design
  8. Layout
  9. Keybinding
  10. Typing
  11. Key How-To
  12. Mouse
  13. Trackball
  14. Trackball History
  15. Misc
  16. Blog