Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Make the Fn key usable

  • Please log in to reply
3 replies to this topic
  • Members
  • 11 posts
  • Last active: Mar 09 2011 10:37 PM
  • Joined: 02 Mar 2011
It would be extremely helpful if we could use the Fn key in our scripts... Is there any way this can be incorporated? It would also grant access to more hotkeys...

  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
This only works for some notebooks, as it is handled somewhat deeper in the system through a driver sometimes.

  • Moderators
  • 3165 posts
  • Last active: Apr 01 2014 01:46 AM
  • Joined: 07 Oct 2006
Remapping the Fn key - a solution
FN key on a notebook ...

  • Members
  • 1 posts
  • Last active: Jun 13 2014 02:01 PM
  • Joined: 13 Jun 2014

Wanting to disable the Fn key altogether, I found this in AuthotKey help; it's beyond my abilities but perhaps you have what it takes:


Special Keys

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.

Reverse direction: To remap some other key to become a "mystery key", follow this example:

; Replace 159 with the value discovered above. Replace FF (if needed) with the
; key's virtual key, which can be discovered in the first column of the Key History screen.
#c::Send {vkFFsc159}

Alternate solutions: If your key or mouse button is not detectible by the Key History screen, one of the following might help:

  1. Reconfigure the software that came with your mouse or keyboard (sometimes accessible in the Control Panel or Start Menu) to have the "mystery key" send some other keystroke. Such a keystroke can then be defined as a hotkey in a script. For example, if you configure a mystery key to send Control+F1, you can then indirectly make that key as a hotkey by using ^F1:: in a script.

  2. Try DllCall: Support for Human Interface Devices. You can also try searching the forum for a keyword like RawInput*.

  3. The following is a last resort and generally should be attempted only in desperation. This is because the chance of success is low and it may cause unwanted side-effects that are difficult to undo:
    Disable or remove any extra software that came with your keyboard or mouse or change its driver to a more standard one such as the one built into the OS. This assumes there is such a driver for your particular keyboard or mouse and that you can live without the features provided by its custom driver and software.