AHK replaces Alt+Shift+LMB to Alt+Shift+Ctrl+LMB?

0

I'm newbie in AHK, but i could compose few scripts to one. This: `

!+LButton::
SendInput {MButton down}{RButton down}  
Loop
{
    Sleep, 10
    GetKeyState, state, LButton, P
    if state = U       
    break

}
SendInput {MButton up}{RButton up} 
return

I don't know why, but when i debug this script on MacrorRecorder or other, it wrote :

Keyboard : ShiftLeft : KeyDown
Keyboard : AltLeft : KeyDown
Mouse : 193 : 306 : LeftButtonDown : 0 : 0 : 0
Keyboard : ControlLeft : KeyDown
Keyboard : ControlLeft : KeyUp
Keyboard : ControlLeft : KeyDown
Keyboard : ControlLeft : KeyUp
Keyboard : AltLeft : KeyUp
Keyboard : ShiftLeft : KeyUp
Mouse : 193 : 306 : MiddleButtonDown : 0 : 0 : 0
Mouse : 193 : 306 : RightButtonDown : 0 : 0 : 0
Keyboard : ControlLeft : KeyDown
Keyboard : AltLeft : KeyDown
Keyboard : ControlLeft : KeyUp
Keyboard : ShiftLeft : KeyDown
Keyboard : ControlLeft : KeyDown
Keyboard : ControlLeft : KeyUp
Keyboard : AltLeft : KeyUp
Keyboard : ShiftLeft : KeyUp
Mouse : 236 : 336 : MiddleButtonUp : 0 : 0 : 0
Mouse : 236 : 336 : RightButtonUp : 0 : 0 : 0
Keyboard : AltLeft : KeyDown
Keyboard : AltLeft : KeyDown
DELAY : 38
Keyboard : AltLeft : KeyUp
Keyboard : ShiftLeft : KeyUp

From where appeared CTRL???? Where is mistake? Thank you!

OpenglNoob

Posted 2015-12-27T12:13:36.303

Reputation: 3

Answers

0

Control gets toggled before the mouse buttons are 'clicked', but AutoHotkey is not replacing the key combination as implied in the title of this post. I see nothing wrong with the keystrokes recorded because the Control key is never down for any action, it's just toggled down and then up again immediately. If you look at the script keystrokes in AutoHotkey instead of MacroRecorder you will see that the keystrokes generated after the hotkey trigger are ignored by AutoHotkey because they are generated internally. Are you experiencing some other issue as a result of the control key being toggled in the middle of the script execution?

Fyi, you can also use an Up hotkey as shown below...

!+LButton::
    SendInput {MButton down}{RButton down}  
return

!+LButton Up::
    SendInput {MButton up}{RButton up} 
return

JJohnston2

Posted 2015-12-27T12:13:36.303

Reputation: 1 341

Also wondering if the extra control is related to #MenuMaskKey and whether changing it would have an effect for you – JJohnston2 – 2016-01-02T23:15:41.327