LButton misses Up event when clicking on the task bar, away from the active program.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Leo Vitalis
Posts: 15
Joined: 31 Aug 2018, 07:01

LButton misses Up event when clicking on the task bar, away from the active program.

19 Jan 2019, 13:49

Hello. I am trying to remap navigation in Autodesk Revit.

Code: Select all

LButton::
If GetKeyState("Space", "P") && !GetKeyState("Alt", "P") {
	Send {Blind}{LButton Up}{Space Up}{MButton Down}               ;Pan
	KeyWait LButton
	Send {MButton Up}
}
else if !GetKeyState("Space", "P") && GetKeyState("Alt", "P") {
	Send {Blind}{LButton Up}{Space Up}{Shift Down}{MButton Down}         ;Rotate
	KeyWait LButton
	Send {MButton Up}{Shift Up}
}
else if GetKeyState("Space", "P") && GetKeyState("Alt", "P") {
	Send {Blind}{LButton Up}{Space Up}{Ctrl Down}{MButton Down}         ;Zoom 
	KeyWait LButton
	Send {MButton Up}{Ctrl Up}
}
else {
	Send {LButton Down}
	; KeyWait LButton
	; Send {LButton Up}
}
return

LButton Up:: Send {LButton Up}
The code works, except for one thing. When I click on the task bar or away from the active window, the left mouse button misses the Up event. I have to click a couple of times, before it starts behaving normally. This behavior can be fixed If I put KeyWait instead of LButton Up. But Revit doesn't like KeyWait for some reason, and the drop-down menus refuse to respond to mouse clicks.

I would appreciate any ideas on how this can be fixed. Thank you.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Panaku, Rohwedder, roysubs and 316 guests