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 Tab Key

#Requires AutoHotkey v2.0
; make the right Win key do Tab
RWin::Tab

Single Key to Switch Previous Window

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

#Requires AutoHotkey v2.0
; make F9 do switching to previous window
F9::Send "!{Tab}"

Single Key for Cut, Copy, Paste

#Requires AutoHotkey v2.0

; select all
F1::Send "^a"

; cut
F2::Send "^x"

; copy
F3::Send "^c"

; paste
F4::Send "^v"

Close Tab

#Requires AutoHotkey v2.0
; f10 key close current tab
f10::Send "^w"

Switch to Previous/Next Tab

#Requires AutoHotkey v2.0
; F11 and F12 do switch prev/next tab
F11::Send "^{PgUp}"
F12::Send "^{PgDn}"