Remap to multiple keys

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
obor
Posts: 5
Joined: 03 Feb 2023, 07:52

Remap to multiple keys

Post by obor » 03 Feb 2023, 07:57

Hi,
What is the correct syntax to map F4 to LShift + MButton ?

[Mod edit: Topic moved to v2 help.]

Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Remap to multiple keys

Post by Rohwedder » 03 Feb 2023, 08:55

Hallo,
try:

Code: Select all

*F4::SendInput,% GetKeyState("MButton")?"":"{Blind}{LShift DownR}{MButton DownR}" 
*F4 Up::SendInput, {Blind}{MButton Up}{LShift Up}

obor
Posts: 5
Joined: 03 Feb 2023, 07:52

Re: Remap to multiple keys

Post by obor » 03 Feb 2023, 10:42

Rohwedder wrote:
03 Feb 2023, 08:55
Hallo,
try:

Code: Select all

*F4::SendInput,% GetKeyState("MButton")?"":"{Blind}{LShift DownR}{MButton DownR}" 
*F4 Up::SendInput, {Blind}{MButton Up}{LShift Up}
Thanks,
But it looks this works only for v1, not for v2. Since I did this change, I get a message when launching autohotkey saying that I should install v1, otherwise it does not launch.

Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Remap to multiple keys

Post by Rohwedder » 03 Feb 2023, 11:23

Then simply:

Code: Select all

#Requires AutoHotkey v2.0-
*F4::SendInput GetKeyState("MButton")?"":"{Blind}{LShift DownR}{MButton DownR}" 
*F4 Up::SendInput "{Blind}{MButton Up}{LShift Up}"

obor
Posts: 5
Joined: 03 Feb 2023, 07:52

Re: Remap to multiple keys

Post by obor » 03 Feb 2023, 13:07

Rohwedder wrote:
03 Feb 2023, 11:23
Then simply:

Code: Select all

#Requires AutoHotkey v2.0-
*F4::SendInput GetKeyState("MButton")?"":"{Blind}{LShift DownR}{MButton DownR}" 
*F4 Up::SendInput "{Blind}{MButton Up}{LShift Up}"
@Rohwedder Thanks ! It works like a charm.
I can now use fusion 360 with my trackball and easily rotate the camera.
This app is wonderfull. :D

obor
Posts: 5
Joined: 03 Feb 2023, 07:52

[solved] Re: Remap to multiple keys

Post by obor » 06 Feb 2023, 03:47

solved

Post Reply

Return to “Ask for Help (v2)”