How to use unsupported keys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
abdurrahman1
Posts: 2
Joined: 17 Jul 2018, 17:51

How to use unsupported keys

18 Jul 2018, 15:16

How do you script a key that isn't part of the autohotkey registry? So far all I know is to use the keyboard hook, but I have no idea what that means. Can anyone tell me how the whole process works?

Thanks
gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: How to use unsupported keys

18 Jul 2018, 18:14

You didn't give much details, but please look at the 'special keys' section here: https://autohotkey.com/docs/KeyList.htm#SpecialKeys
Some keys, like Fn keys on a laptop might or might not be accessed via AHK. It depends...
Rohwedder
Posts: 7614
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to use unsupported keys

19 Jul 2018, 11:21

Hallo,
try this script. #InstallKeybdHook and #InstallMouseHook force the use of the hooks.

Code: Select all

; Show information for the last pressed key.
#InstallKeybdHook
#InstallMouseHook   
SetTimer, Information, 300
Information:
ToolTip, % Format(
(Join
"Key Name:`t{}`nVirtual Code:`tVK{:X}`nScan Code:`tSC{:X}"
,A_PriorKey,GetKeyVK(A_PriorKey),GetKeySC(A_PriorKey))
)
Return
Run this script and press your special key, you should get the corresponding scancode and virtual code.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 282 guests