Author Topic: A problem with repeating the same key-press  (Read 2978 times)

kittykatze

  • Guest
A problem with repeating the same key-press
« on: July 26, 2018, 09:31:45 AM »
I've just started using Voice Attack again for the first time in about six months (microphone was broken, didn't bother replacing it until now.) I loaded up my old profile for Elite Dangerous and realigned all the key-presses. I've noticed that a few multi-keypress commands involving the cockpit UI aren't working if they involve pressing the same key twice consecutively. I set it up this same way in the past and it worked fine.

So, for example, I have one to request docking, and for that, I had the following commands:

Quote
Press 1 key and hold for 0.1 seconds and release
Press E key and hold for 0.1 seconds and release
Press E key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press S key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press Escape key and hold for 0.1 seconds and release

Voice Attack would carry out all of the commands except the second E to tab the menu over, and if I added additional E's it would skip those too even if I changed the duration that the key was held. I did the commands really fast manually just to make sure it wasn't an Elite Dangerous problem and I had no similar issue. Nonetheless, I was able to work around this ultimately by just adding an extra key that doesn't do anything in-between the two "E" key-presses.

I'm just curious at this stage what might be causing this. I saw the sticky at the top of the forum but it doesn't seem to apply to this particular instance and I'm pretty sure I'm running 1.7.2 anyway.
« Last Edit: July 26, 2018, 09:50:14 AM by kittykatze »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2825
Re: A problem with repeating the same key-press
« Reply #1 on: July 26, 2018, 10:00:48 AM »
You'll want to add some kind of pause between your key presses.  Since what you are doing is 'releasing' a key and immediately 'pressing' a key, ED is not detecting that the events have occurred.  Apps/games that work with events would pick that up, but since most games use some sort of key state polling, what you've got in place is happening too fast.  So, I'm thinking you if just change to this it should work:

Press 1 key and hold for 0.1 seconds and release
Press E key and hold for 0.1 seconds and release
Pause 0.1 second                                               <<<<<<<<<<<
Press E key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press S key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press Escape key and hold for 0.1 seconds and release

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 280
  • Upstanding Lunatic
    • My AVCS Homepage
Re: A problem with repeating the same key-press
« Reply #2 on: August 09, 2018, 10:04:21 AM »
In Elite: Dangerous Options, disable "Menu Transitions" if they are on.  They will make menus appear faster, and macros will not have to incorporate large pauses after those keys.

Like Gary said, you need pauses between those keys, but really, you should have pauses between EVERY keypress action when working with the Elite Dangerous menus - they can be testy.  I have been able to lower the timings to 40 milliseconds, but it could be system dependent.  A safe timing would be 0.05 - 0.06 when you go to speed up the macro.

Would look something like this:
Code: [Select]
Press 1 key and hold for 0.06 seconds and release
Pause 0.06 second
Press E key and hold for 0.06 seconds and release
Pause 0.06 second
Press E key and hold for 0.06 seconds and release
Pause 0.06 second
Press Space key and hold for 0.06 seconds and release
Pause 0.06 second
Press S key and hold for 0.06 seconds and release
Pause 0.06 second
Press Space key and hold for 0.06 seconds and release
Pause 0.06 second
Press Escape key and hold for 0.06 seconds and release

When you want to get more in-depth, you can begin using a variable for those pauses (page 32 of the manual), so you can change one number to affect all pauses, and get the speed of this macro just as you like it, as it works best on your computer in-game. Cheers!