Firefox 4 and AutoHotKey, MozillaWindowClass

Perm url with updates: http://xahlee.org/kbd/Firefox4_AutoHotkey_MozillaWindowClass.html

Firefox 4 and AutoHotkey: MozillaWindowClass

Xah Lee, 2011-03-22

Firefox 4 is released today.

If you use AutoHotkey, you'll notice that Firefox's “ahk_class” changed. It was MozillaUIWindowClass, which is also used by Mozilla Thunderbird. But now for Firefox 4 it's MozillaWindowClass.

This is a good change. Because now you can define key sets separate for Firefox and Thunderbird, without resorting to using the window's title or other tricks.

Here's my Firefox keys.

; tttt --------------------------------------------------
;; Mozilla Firefox 4 hotkeys

#IfWinActive ahk_class MozillaWindowClass
; #IfWinActive ahk_class MozillaUIWindowClass
; #IfWinActive Mozilla Firefox

NumpadDiv::Send ^{PgUp} ; previous tab
NumpadMult::Send ^{PgDn} ; next tab

Pause::Send ^w ; close window

; swap middle/right buttons
$RButton::MButton
$MButton::RButton
$XButton2::Send ^w ; close

^F12::
{
Send ^t
sleep 100
Send ^v
sleep 100
Send {Enter}
}
Return

Popular posts from this blog

Browser User Agent Strings 2012

11 Years of Writing About Emacs

does md5 creates more randomness?