AutoHotkey: Remap Keys

By Xah Lee. Date: . Last updated: .

Here are examples of simple key remap or set a key to send some other key combo.

Right Win as App Key

; make the right Win key do AppsKey
RWin::AppsKey

Single Key to Switch Previous Window

It is useful to have a single button to switch to last window.

; make Left Windows Key do switching to previous window
$LWin::Send !{Tab}

Single Key for Cut, Copy, Paste

; cut
$F2::Send ^x

; copy
$F3::Send ^c

; paste
$F4::Send ^v

Close Tab

; Pause/Break key close current tab
Pause::Send ^w

Switch to Previous/Next Tab

; F11 and F12 do switch prev/next tab
$F11::Send ^{PgUp}
$F12::Send ^{PgDn}