Creating Macros
Creating Macros
Helo I need help because my keyboard had extra buttons and I don't know how to configure them. Please Help
Re: Creating Macros
Hallo,
see https://autohotkey.com/docs/KeyList.htm#SpecialKeys
or try:run this script and press your special key, you should get the corresponding scancode (different from SC0).
For example, you would get SC16A, then this script should work:Same for a virtual code other than VK0 e.g. VK53:But there are sometimes special keys, especially these that are only available on specific brands, that cannot be remapped. Probably these keys do not use the usual drivers, but work at a lower level, which may not be accessible.
see https://autohotkey.com/docs/KeyList.htm#SpecialKeys
or try:
Code: Select all
; Show information for the last pressed key.
#InstallKeybdHook
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
For example, you would get SC16A, then this script should work:
Code: Select all
SC16A::
MsgBox, %A_ThisHotKey% was pressed.
Return
Code: Select all
VK53::
MsgBox, %A_ThisHotKey% was pressed.
Return
Re: Creating Macros
Hi matixx732,
Please tell us what kind of keyboard you have.
I, for example, have a Logitech G15 which has 18 G-Keys and 3 modes.
The keys themselves cannot be read by AHK (in my case).
For this reason, I simply map keys or key combinations to my G keys.
Example:
G1 = Ctrl+Shift+F1
G2 = Ctrl+Shift+F2
etc.
In AHK, I link the combinations Ctrl+Shift+F1, Ctrl+Shift+F2 etc to my scripts.
Later, instead of pressing these key combinations, I just press the G keys, which is much easier.
Regards
Please tell us what kind of keyboard you have.
I, for example, have a Logitech G15 which has 18 G-Keys and 3 modes.
The keys themselves cannot be read by AHK (in my case).
For this reason, I simply map keys or key combinations to my G keys.
Example:
G1 = Ctrl+Shift+F1
G2 = Ctrl+Shift+F2
etc.
In AHK, I link the combinations Ctrl+Shift+F1, Ctrl+Shift+F2 etc to my scripts.
Later, instead of pressing these key combinations, I just press the G keys, which is much easier.
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Who is online
Users browsing this forum: OrangeCat and 324 guests