Author Topic: COmbine key Press with Mouse Click?  (Read 2639 times)

iliad

  • Newbie
  • *
  • Posts: 8
COmbine key Press with Mouse Click?
« on: January 16, 2018, 10:10:21 AM »
I would like to make a command, such that a keyboard click & mouse button combined together, do an action.
In this case, I want to use say Left ALT + Left mouse click, then do action.

Is this possible? Can't seem to get it to work.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: COmbine key Press with Mouse Click?
« Reply #1 on: January 16, 2018, 08:58:41 PM »
VoiceAttack can't natively trigger off that combination, but you can trigger off part of it, and check for the other part:

Code: [Select]
Start Loop While :  Keyboard Key 'Left Alt' Is Pressed
    Begin Device State Check :  Left Mouse Button Is Pressed
        Write '[Blue] Left Alt + Left Mouse detected' to log
        Loop Break
    End Condition
End Loop
Set the "When I press keys" option to "Left Alt"; Pressing and holding Left Alt will start the command, if you click the left mouse button while Left Alt is still pressed, anything before "Loop Break" will execute, and the command will stop checking for the combination and end(otherwise it'll execute continuously while Left Alt and the Left Mouse Button are down).