LButton remapped for single click but does not lose function for drag

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

LButton remapped for single click but does not lose function for drag

24 Feb 2018, 04:49

Hi I want to remap my Left Mouse button to something, but not use it's function when I need to hold and drag.
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: LButton remapped for single click but does not lose function for drag

24 Feb 2018, 05:02

You can use Lbutton UP:: as the hotkey (using the hotkey modifier UP) but then the function will still trigger after you drag. Is that okay?
But what you can do is hold a modifier like ctrl while you're dragging. That will prevent the hotkey from triggering.

Or else you will have to use an expression of some sort.. or a directive??
I am your average ahk newbie. Just.. a tat more cute. ;)
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

Re: LButton remapped for single click but does not lose function for drag

24 Feb 2018, 05:37

Nwb wrote:You can use Lbutton UP:: as the hotkey (using the hotkey modifier UP) but then the function will still trigger after you drag. Is that okay?
Hi thank you unfortunately that will be more of a pain than ..
....hold a modifier like ctrl while you're dragging.
This is indeed possible. However the below would be ideal!:
Or else you will have to use an expression of some sort.. or a directive??
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

Re: LButton remapped for single click but does not lose function for drag

25 Feb 2018, 16:18

Could someone help in how to use an expression or a directive?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: LButton remapped for single click but does not lose function for drag

25 Feb 2018, 16:34

Congratulations on your 111th posting. The AHK Help is your friend too :arrow: [Expressions]
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

Re: LButton remapped for single click but does not lose function for drag

26 Feb 2018, 02:01

BoBo wrote:Congratulations on your 111th posting. The AHK Help is your friend too :arrow: [Expressions]
Yep good sarcasm.. except I have already read that.. sorry.
blad4
Posts: 315
Joined: 07 Oct 2015, 11:06

Re: LButton remapped for single click but does not lose function for drag

10 Mar 2018, 06:18

Can someone help me in where to get started as I cannot code
User avatar
divanebaba
Posts: 805
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: LButton remapped for single click but does not lose function for drag

10 Mar 2018, 21:13

blad4 wrote:... except I have already read that.. sorry.
A help file is not for reading, it is for understanding. :D :D
So if you already have read it, maybe reading a second time is necessary. :lol: :lol:

As I don't have precise information, I can't give you suggestions different then in help file.
Maybe you want your "remapping" ony in a specific window, an expression could like below

Code: Select all

#If WinActive("PacMan2000") ; <--- this is the expression
Lbutton::send Do something ; not a real remapping, more something like a hotkey
#If ; <--- necessary when other "global" hotkeys are following
Einfach nur ein toller Typ. :mrgreen:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, RussF and 395 guests