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, or terminal.

There are 2 or 3 apps we use perhaps 80% of time. So, it's nice to set a single F key to switch to them.

What is wrong with 【Alt+Tab ↹】?

Alt+Tab ↹】 or 【⌘ Cmd+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 X

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. See: Mac Keyboard Software Guide .

Windows

For Windows, one solution is AutohotKey.

AutoHotkey System Notification Area
AutoHotkey icon in Taskbar

You'll need to install AutoHotkey. See: AutoHotkey Tutorial.

Here's a sample AHK script:

; 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, then you can use Microsoft IntelliType (bundled with Microsoft Keyboards) to set F9 to run this script.

Or, in your main AutoHotkey script, add this line:

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

Linux

Linux: Add Key to Switch App

Increase Productivity Using Function Keys

Why do you want to use a single key to switch? See: Keyboard: What's the Use of Function Keys?.

Set Window to Auto-Raise

Also, do this: Mouse Hover to Auto-Raise Window

and Single-click Open File {Windows, Linux}

Shop at Xah Keyboard Store