Author Topic: How do I?  (Read 2537 times)

Hyda_Scarface

  • Newbie
  • *
  • Posts: 4
How do I?
« on: January 19, 2019, 04:22:02 PM »
I want to make a command that keeps track of if I press a button (left ctrl) if it is being pressed then release it.
its to be used as a walk command in a game. I don't want to use toggle because i still use the key sometimes just for a sec or 2.

icepir

  • Newbie
  • *
  • Posts: 2
Re: How do I?
« Reply #1 on: January 19, 2019, 10:40:48 PM »
If you're just worried about holding down left control, just goto create new command and under "key presses" click the "release key" button and assign it to left ctrl. alternatively you could set up another key to hold the button down using the same method.

edit: i might have misunderstood you originally, but you could set it to have TTS(text-to-speech), or a sound effect, remind you everytime you press control, or toggle it to hold it down and tell you its down or up, and remind you.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do I?
« Reply #2 on: January 20, 2019, 03:51:34 AM »
Can you provide more details?

I don't want to use toggle because i still use the key sometimes just for a sec or 2.
So then when should it be released?

If you release it every time you press it, you won't be able to hold it down, in any application.

Hyda_Scarface

  • Newbie
  • *
  • Posts: 4
Re: How do I?
« Reply #3 on: January 21, 2019, 09:51:05 AM »
i want to be able to say "walk" then have VA press the left control key down and holds it. then  when i say walk again, it VA remembers that the left control key is down. so then it releases it. Just so i dont have to have a walk and a walk off command. its not working like i want it. just wondering thanks for your time

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: How do I?
« Reply #4 on: January 21, 2019, 04:31:59 PM »
Pressing and releasing the key using a single command is not a problem:
Code: [Select]
Begin Device State Check :  Keyboard Key 'Ctrl' Is Not Pressed
    Press down Left Ctrl key
Else
    Release Left Ctrl key
End Condition

However, this does mean that if the physical Ctrl key is pressed, it will no longer be held down.

As the physical key will always send a release message, you'd have to monitor for the key getting released and press it again, though if you plan to use the Ctrl key for other things you'd likely have to release it before using it anyway.

Hyda_Scarface

  • Newbie
  • *
  • Posts: 4
Re: How do I?
« Reply #5 on: January 23, 2019, 02:40:12 PM »
I think that's what I needed. I just need it for a game and rarely use it. But still would like to have it as an option. Thank you for your time.