Map "fn" + "home" to screen brightness using AutoHotKey?

Autohotkey offers a great possibility to find the "number" of the key:

If your keyboard or mouse has a key not listed above, you might still be able to make it a hotkey by using the following steps (requires Windows XP/2000/NT or later):

  1. Ensure that at least one script is running that is using the keyboard hook. You can tell if a script has the keyboard hook by opening its main window and selecting "View->Key history" from the menu bar.
  2. Double-click that script's tray icon to open its main window.
  3. Press one of the "mystery keys" on your keyboard.
  4. Select the menu item "View->Key history"
  5. Scroll down to the bottom of the page. Somewhere near the bottom are the key-down and key-up events for your key. NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. For possible solutions, see further below.
  6. If your key is detectible, make a note of the 3-digit hexadecimal value in the second column of the list (e.g. 159).
  7. To define this key as a hotkey, follow this example:

    SC159:: ; Replace 159 with your key's value.
    MsgBox, %A_ThisHotKey% was pressed.
    return

So it's very easy to find the numbers of your keys and script a shortcut to increase the brightness.


Fn

key problem

You will not likely be able to use Fn+Home because the Fn is usually a special key that is handled internally by the keyboard controller. Because it is handled in hardware and never goes through software (i.e., the OS), it cannot be intercepted or remapped. You’ll have to pick another hotkey combo (try the ⊞ Win key or something).

SmartBright

If you are willing to pick another hotkey, then there are ways to provide easier access to the screen brightness. One option is the SmartBright script on the AutoHotkey forums. It lets you adjust the brightness of the screen with the mouse by creating a click-through overlay. Because of the way it works, it does not actually affect the backlight that you see in the Control Panel’s Power Options. This could be a problem or a benefit depending on your situation. In fact, because it works independently of the main brightness control, you can use it in conjunction with the main control to further reduce the brightness beyond what is available with the backlight control by itself (some people complain that the minimum brightness is still too bright).

nircmd

Another option is what I have been using for the past several years. It is just two lines of AutoHotkey code that set up a hotkey to call out to Nirsoft’s nircmd to allow me to adjust the screen backlight:

; Screen brightness
; Ctrl+Alt+Shift + PgUp/PgDown to adjust screen brightness
^!+PgUp::Run nircmd.exe changebrightness +10
^!+PgDn::Run nircmd.exe changebrightness -10

Make sure that nircmd.exe is in the same directory as the script and it works perfectly. The only problem is that if you run it under a user account, it won’t work while programs running under the administrator account are active (e.g., the log in screen). That’s fixable, but rarely necessary.