Hi community:
I am using opentrack to track my head position for flight simulation.
The software does not allow me to use left alt for tracking active for some reason, therefore i have to use AHK to remap left alt to another key troke (namely Home).
So this is my goal:
Press down and hold left alt key, the home key will be pressed down and held. in the meantime, num 2 key will be pressed and released one time.
so far I experimented with this script:
LAlt::Send {Home down}
For some reason it worked in notepad, but have no effect on opentrack.
Then I changed the script to:
LAlt::Home
Then it worked!
I am just very curious why the first script didn't work.
And How would I add a Num2 key press once with left alt being pressed and held?
Thanks!
How to send key once while press down the other key at the same time? Topic is solved
How to send key once while press down the other key at the same time?
Last edited by BoBo on 23 Jul 2020, 00:24, edited 1 time in total.
Reason: Moved to Gaming section.
Reason: Moved to Gaming section.
Re: How to send key once while press down the other key at the same time? Topic is solved
Hallo,
try (only tested in the editor):
try (only tested in the editor):
Code: Select all
#InputLevel 1
LAlt::Home
#InputLevel 0
~Home::
Sleep, 200
Send, {Numpad2}
KeyWait, LAlt
Return
Re: How to send key once while press down the other key at the same time?
@Rohwedder
Wow thank you! I didn't expect an answer this fast.
So just to explain your code to the anyone that wonders the same:
LAlt triggers Home, and Home sends a single Numpad2 press. "KeyWait, LAlt" is waiting LAlt to be released so that the script wont keep sending Numpad2 presses.
~on Home means it will still let Home be home.
Thanks again.
Wow thank you! I didn't expect an answer this fast.
So just to explain your code to the anyone that wonders the same:
LAlt triggers Home, and Home sends a single Numpad2 press. "KeyWait, LAlt" is waiting LAlt to be released so that the script wont keep sending Numpad2 presses.
~on Home means it will still let Home be home.
Thanks again.