Author Topic: Easiest way to Mimic key presses?  (Read 2478 times)

JDsplice

  • Newbie
  • *
  • Posts: 20
Easiest way to Mimic key presses?
« on: March 03, 2019, 02:17:22 AM »
I want to press A and have VA press Q, and when I release A have VA release Q.

I have already gotten close to setting this up in VA, but only if I use "Repeat command while keys are pressed" which I don't want the command to repeat.

What is the easiest way to set this up?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Easiest way to Mimic key presses?
« Reply #1 on: March 03, 2019, 02:31:58 AM »
You can use a while loop for that:
Code: [Select]
Press down Q key
Start Loop While :  Keyboard Key 'A' Is Pressed
End Loop
Release Q key

JDsplice

  • Newbie
  • *
  • Posts: 20
Re: Easiest way to Mimic key presses?
« Reply #2 on: March 03, 2019, 04:06:42 AM »
Thank you, that worked like a charm.