Author Topic: PoV Press and Hold keyboard key  (Read 1155 times)

Cirrus

  • Newbie
  • *
  • Posts: 6
PoV Press and Hold keyboard key
« on: September 17, 2019, 02:36:38 PM »
I apologize in advance if this has already been covered somewhere but, I've searched here and on the net for a solution that makes sense and I continually come up empty.

This is for use in Star Citizen 3.6.2 - I want to use the PoV hat of my joystick to press and hold a keyboard key until released.  Specifically, strafe left (A key) and right (D key) and I want the strafe to continue while I hold the PoV button down and then stop when the key press is released.  I'm currently using the Event Horizon (beta) 1.2.1 profile.

Is there a built in way to achieve this or do I have to code some kind of loop?

Any guidance would be very much appreciated.  Thank you.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: PoV Press and Hold keyboard key
« Reply #1 on: September 17, 2019, 02:45:58 PM »
You can do this one of two ways:

Using two commands per direction, where the first is triggered by pressing the POV hat in that direction ("Shortcut is invoked only when all buttons are released" unchecked) and presses the keyboard key, and the second is triggered by releasing the POV hat ("Shortcut is invoked only when all buttons are released" checked) and releases the keyboard key

Or, using one command per direction, where the command is triggered by pressing the POV hat in that direction ("Shortcut is invoked only when all buttons are released" unchecked), and runs a loop while it remains pressed:
Code: [Select]
Press down D key
Start Loop While :  Joystick 1 POV 1 Button 3 Is Pressed
End Loop
Release D key

Cirrus

  • Newbie
  • *
  • Posts: 6
Re: PoV Press and Hold keyboard key
« Reply #2 on: September 17, 2019, 08:12:06 PM »
Awesome!  Thanks so much for the quick response, Pfeil.  Cheers!