Remap FN Key Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ChuckxxNorris
Posts: 7
Joined: 22 Mar 2017, 10:06

Remap FN Key

24 Mar 2017, 07:59

Hello,

I want to remap an FN Key, so I have du find it's ScanCode and I found some threads about it, but any helped me!

For example I found this:
Ok, I think i found a suitable solution for you. Basically, do this:

1 - Create a script with the following lines:
#Installkeybdhook
#Persistent
2 - Run it and while it is under execution, right click its tray icon and choose "Open".

3 - On the open window, click Control+K (or choose the option "key history and script info" inside the menu "view".).

4 - Press Fn + F2 (or any combination you desire to use of the Fn-key, expect for Fn alone).

5 - Press F5 (to update the window) and check the key history table.

6 - You should see a new entry on the table (other than the F5 you just pressed) that is not actually the fn-key code but rather a "Remapped" key-code for the key you pressed while holding fn-key (Fn-key usually works on hardware level by changing the code that is sent when you press any of the keys that fn-functions, so it doesn't actually have a code itself).

7 - Check the codes on the "VK" and "SC" columns for the row of that entry.

8 - Create a script that sends both the codes with the following syntax:

Send {vk74sc03F}
Where "74" and "03F" should be replaced by the VK and SC codes you have read from the table.

9 - Don't forget to consider how the key should be sent and script that aswell! (Via a hotkey, on a planned routine, or etc).

Example:

The code bellow sends the F5 key when the hotkey Win+Z is activated.

#z::
Send {vk74sc03F}

And thats it! Not that hard huh? :p
https://autohotkey.com/board/topic/7720 ... nt-solved/

But like described in 1. thery is no "Open" for me, when I am clicking the tray button.

What should I do?

Greetings :D
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Remap FN Key

24 Mar 2017, 09:23

Double click it
Please excuse my spelling I am dyslexic.
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Remap FN Key

24 Mar 2017, 09:25

Most laptops you can't remap the Fn key from what I remember. It can only be detected at a hardware level

ChuckxxNorris
Posts: 7
Joined: 22 Mar 2017, 10:06

Re: Remap FN Key

24 Mar 2017, 10:52

Capn Odin wrote:Double click it
Does not work for me :/
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Remap FN Key  Topic is solved

24 Mar 2017, 15:07

ChuckxxNorris wrote:
Capn Odin wrote:Double click it
Does not work for me :/
Then I have misunderstood your problem.
My guess was that you were able to run ahk scripts and when right clicking the tray icon of the running script you get a custom menu, double clicking the tray icon will open the gui you want.

If you can run scripts then try running this.

Code: Select all

#Persistent
#InstallKeybdHook

KeyHistory

SetTimer, update, 1000
return

update:
	WinMenuSelectItem, %A_ScriptFullPath%, , View, Refresh
return
Else you can run it in cmd with the command ".\AutoHotkey.exe" ".\keyboard hook.ahk" you need to include the paths.
Please excuse my spelling I am dyslexic.
ChuckxxNorris
Posts: 7
Joined: 22 Mar 2017, 10:06

Re: Remap FN Key

25 Mar 2017, 09:36

Capn Odin wrote:
ChuckxxNorris wrote:
Capn Odin wrote:Double click it
Does not work for me :/
Then I have misunderstood your problem.
My guess was that you were able to run ahk scripts and when right clicking the tray icon of the running script you get a custom menu, double clicking the tray icon will open the gui you want.

If you can run scripts then try running this.

Code: Select all

#Persistent
#InstallKeybdHook

KeyHistory

SetTimer, update, 1000
return

update:
	WinMenuSelectItem, %A_ScriptFullPath%, , View, Refresh
return
Else you can run it in cmd with the command ".\AutoHotkey.exe" ".\keyboard hook.ahk" you need to include the paths.
Thank you very much! This helped me out :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: GEOVAN, jameswrightesq, jollyjoe and 159 guests