Firefox 4 and AutoHotkey: MozillaWindowClass

By Xah Lee. Date:

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.

;; -------------------
;; 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
$XButton2::Send ^w ; close

Send ^t
sleep 100
Send ^v
sleep 100
Send {Enter}
Did i $save$ you from getting a brick?

$5 me, at patreon
or paypal to

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