Being able to use F for mouse click functions while holding down mouse 4 Topic is solved

Ask gaming related questions (AHK v1.1 and older)
jennya
Posts: 3
Joined: 24 Sep 2022, 12:41

Being able to use F for mouse click functions while holding down mouse 4

Post by jennya » 24 Sep 2022, 12:57

Hiya! I'm trying to make it so that I can hold down Mouse 4 and use F for clicking/dragging/shift-clicking and ctrl-clicking.
Basically just to allow it to work when I hold down Mouse 4.

I managed to get F clicking and its function to work somewhat (shift clicking bugs out at times though) and whenever I hold down Mouse 4 it reverses what I want to do, it works by default and when I hold down Mouse 4 it disables it.
I'm completely new to this with no experience so I thought I'd just ask here.

This is what I got so far:

Code: Select all

*XButton1::
Suspend
Pause,,1 
KeyWait,XButton1`
Suspend
Pause,,1 
Return

^F::
Send ^{LButton}
return

*F::
Send {Shift down}{LButton down}
KeyWait,F`
Send {Shift up}{LButton up}
return

F::
click Down left
keywait,F`
click Up left
return

F9::
ExitApp
return
Any help would be greatly appreciated!

User avatar
mikeyww
Posts: 26437
Joined: 09 Sep 2014, 18:38

Re: Being able to use F for mouse click functions while holding down mouse 4  Topic is solved

Post by mikeyww » 25 Sep 2022, 05:29

Welcome to this AutoHotkey forum!

An idea is below.

Code: Select all

XButton1::XButton1
XButton1 & f::LButton

jennya
Posts: 3
Joined: 24 Sep 2022, 12:41

Re: Being able to use F for mouse click functions while holding down mouse 4

Post by jennya » 26 Sep 2022, 07:53

Thank you!

It works perfectly, I tried to add the ctrl and shift functions like this:

Code: Select all

XButton1::XButton1
XButton1 & f::LButton
XButton1 & ^f::^LButton
XButton1 & *f::*LButton
return
It is telling me invalid hotkey, my guess is it doesn't let me do a key combination within a key combination?

User avatar
mikeyww
Posts: 26437
Joined: 09 Sep 2014, 18:38

Re: Being able to use F for mouse click functions while holding down mouse 4

Post by mikeyww » 26 Sep 2022, 08:55

You do not need those extra lines, because a key remapping already handles those conditions.

Explained: Blind mode
The Blind mode avoids releasing the modifier keys (Alt, Ctrl, Shift, and Win) if they started out in the down position.

jennya
Posts: 3
Joined: 24 Sep 2022, 12:41

Re: Being able to use F for mouse click functions while holding down mouse 4

Post by jennya » 26 Sep 2022, 14:21

Ohh I'm starting to get it now, it works perfectly, thanks a lot for your help!

Post Reply

Return to “Gaming Help (v1)”