The online racing simulator
Key press bug?
(5 posts, started )
Key press bug?
I can't seem to get a bound key pressed by any method available to me.

I bound x to pitspeed:
/key x pit_speed

If i'm in LFS and press x the pit limiter goes on and off.

But i can't programatically press it. I tried:
  1. sending IS_SCH for x
  2. sending IS_MST with /press x
  3. typing /press x in LFS
  4. creating a script with /press x and then running the script
Anyone else having this problem? Thanks!
#2 - filur
I had the same problem a few days ago trying to press I (ignition), i tried:
  • SCH i
  • /press i
  • WshShell.SendKeys("i")
  • AutoHotkey Send/SendInput/SendRaw i
.. and nothing worked, finally solved it by using PostMessage in user32.dll to send a WM_KEYDOWN, WM_KEYUP combo with a few milliseconds of sleep inbetween.
I think it is intentional. Because, you can invert axises with a key press, but not cut the ignition.
The symptoms of this certainly are that you can press any reserved keys, but not any keys that can be bound. If this was intentional, then the docs are a bit confusing:


/key [key] [function] - e.g. /key Q handbrake (see below)
[...]
/press [key] - simulate key press

both refer to [key] and finally under "PARAMETERS for the key commands (press / ctrl / shift) :" it explicitly mentions "Letters A to Z".

Given all that, it would seem more likely that it's a bug with the press command not resolving dynamic bindings, but resolving static bindings. Either way, it'd appreciate clarification, before I descend into InterOp land for my keypresses, especially I was trying to do this from a central machine for all stations.
#5 - nikka

Key press bug?
(5 posts, started )
FGED GREDG RDFGDR GSFDG