The online racing simulator
Make indicators more accessible for keyboards
Hi.

The only ways to use indicators is either by (1) pressing 7, 8 and 9 on the keyboard, or (2) use script to map them to buttons on a wheel, joystick, etc.

However I'd like to remap 7 to Q and 8 to E. This is impossible, because using scripts, "ctrl_fXX" functions can not be remapped to "/key" - only "/button". I don't see any reasons why it should only work for button and not keys.

So I would suggest either make use of "ctrl_fXX" functions work for both keys and buttons, or make the indicators possible to remap in the options menu.
not sure if this is the same as i need to make my script work....i have my script set so when i switch cars with different shift types on my g25, it ghanges my butons, so my padals are lights, and spec, and when in a paddle car they are shift...but it doesnt work
-
(JasonJ) DELETED by JasonJ : oops - re-reading question.
logitekg25:
No it's not the same problem as you have.



Skagen:

Sounds like you want to assign 7 to "q" and 8 to "e" ?


1) Map the Q key to hit Ctrl+F1
/key q ctrl_f1

2) Map the Ctrl+F1 to press the 7 key
Quote :/ctrlf 1 /press 7

Oh shizz.. that doesn't work even though it's documented that it works! I just accidently........
FUNCTION NAMES for the /button AND /key COMMANDS :
--------------------------------------------------
steer_left, steer_right, steer_fast, steer_slow
throttle, brake, shift_up, shift_down, clutch, handbrake
left_view, right_view, rear_view, horn, flash, reset
pit_speed, tc_disable, ignition, zoom_in, zoom_out
reverse, gear_1 - gear_7, ctrl_f1 - ctrl_f12

Probably something missed in the documentation as the GUI has no space for Key assignments in the Ctrl + Fn menu. Whole assignment needs to be re-written because so many keys are reserved and you can't customise a few things. But my guess that's a while off 'cause many want Scirocco and tyres first LoL.

Might I suggest in the interim either:
1) Use PPJoy(Keyboard>>Joystick) to remap Key presses to a Virtual joystick you also create in PPJoy. Then use those Virtual joystick buttons to /press 7 & /press 8 in LFS. (This will require you understand PPJoy, and will require you to install the free software)

2) Use GlovePIE or AutoHotKey to script the 'q' to either press the 7 key or press an existing joystick button.
( This is a more elegant solution, but will require you read some of the documentation on how to write a script for that software. It about as easy to understand as the LFS script system. The documentation includes many examples so you will find something that maps keypresses to buttons or even other keuys pretty easily. Give yourself about an hour. AutoHotKey can generate your own .exe that runs in the background and will sit in the Task tray - is nice!. GlovePIE will do the same but I haven't figured out how to make .exe files with that one. )
Ok, I hav8 no lif8 so I mad8 on8 in autohotk8y for you. As you can s88 from my typing that th8 script works w8ll

Ok, turned off the task.....

q presses 7
e presses 8

Source Code (AutoHotkey.zip) (text file)
q::7
e::8

The .exe is attached (Q-7..E-8). It must be running for the translation to occur. It runs in the task tray and uses about 3.5MB of memory. To close it right click the task tray icon and choose exit. It works for me in WinXP, but it should work in Vista/Win7. If you want to reprogram it you must download AutoHotKey (google) and use that.
Attached files
Q-7..E-9.zip - 196.8 KB - 133 views
AutoHotkey.zip - 415 B - 143 views
Probably will turn out to be quite annoying when you try to chat to your mates in LFS.

/exit
hmm...what about my problem, i have the current script

EDIT: and the ones i recently added dont work at all, it has an error message in lfs, but i cba to remove them
Attached files
script files.zip - 929 B - 138 views
Quote from logitekg25 :hmm...what about my problem, i have the current script

EDIT: and the ones i recently added dont work at all, it has an error message in lfs, but i cba to remove them

A few points why I, and probably others ignored you....

1) You posted a vague description of an error in an unrelated thread. Someone asked for a feature to be implemented: The topic mentions indicators and keyboard input and lack of support for a particular function. You problem is related to a script error and G25 buttons. You can't just hijack a thread off-topic with relatively no information about your problem and expect help. No one is psychic.

2) You didn't initially post your script with the problem, how can anyone help with little information? Later rectified.

3) You didn't say which script didn't work. "It doesn't work" does not really explain what's going on for you. ie: say something useful like "The /spec and headlights won't work in Sequential mode."

4) You didn't specify the error displayed or what it said. I had to debug it myself without ruining my own scripts and button assignments.

Not flaming you or trying to have a go at you, but you must exhibit some sort of forum etiquette if you expect someone to reply to you. You also should give as much related information as possible.

Upon investigating your script, the error quite clearly states...
sequential : line 11 - Unknown button function
sequential : line 12 - Unknown button function

You said you cba removing it - have you considered that this is the exact reson your script wouldn't work? Errors are there for a reason, not just something to fill the chat. Open up that file and count down 11 lines

The lines 11 and 12 in your sequential script:
/button 36 /spec
/button 37 /press 3

This will not work because they do not follow the script rules found in \**\lfs\docs\Commands.txt
These are the only allowable funtions when re-assigning buttons:
FUNCTION NAMES for the /button AND /key COMMANDS :
--------------------------------------------------
steer_left, steer_right, steer_fast, steer_slow
throttle, brake, shift_up, shift_down, clutch, handbrake
left_view, right_view, rear_view, horn, flash, reset
pit_speed, tc_disable, ignition, zoom_in, zoom_out
reverse, gear_1 - gear_7, ctrl_f1 - ctrl_f12

(note: atl_f1 - alt_f12 also work it appears, yet this is unrelated to logiekg25's issue)

You need to assign the buttons to one of the Function Names listed above (not use text). Then after that, you can assign function keys to [text] commands

So replace those lines with this solution:
/button 36 ctrl_f11
/ctrlf 11 /spec

/button 37 ctrl_f12
/ctrlf 12 /spec

I used F11 and F12, you might already have those assigned to something else so use any others that are available.
You need to do the same to the road.lfs script.

I hope this solution helps you and that you take the time to read the other points I outlined above.

LoL Germany v Australia 4:0 thrashed
so much hype.........
Skagen, buy a wheel!
#9 - pik_d
Quote from JasonJ :Probably will turn out to be quite annoying when you try to chat to your mates in LFS.

/exit

This is true for anything suggested in this thread. If you typed anything with 'e' in the word it would do the bind then "enter" and your message would be displayed as:

Skagen : You'll n/ctrlf 2 /press 8

instead of

Skagen : You'll never beat me!


Trust me on this, it's quite embarrassing to hit binded keys when you're trying to chat.
sorry and your totally right

never been a pro with scripts in lfs
Thank you all for the replies.

I believe the reason for the documentations falsely stateing you can bind ctrl_fn to keys is because the documentation on scripting have been written by a third party, and not the developers themselves.

For the moment beeing, I'll just have to live without the indicators as I do not have the desk space for a wheel, and I recon I'll be chating more frequent than the cases I'd need the indicators.

But thanks again, especially to you JasonJ.

Quote from pik_d :If you typed anything with 'e' in the word it would do the bind then "enter" and your message would be displayed as: (...)

Trust me on this, it's quite embarrassing to hit binded keys when you're trying to chat.

Well, I could always remap two other keys to Q and E "-uite +l+gantly"
-
(Keling) DELETED by Keling

FGED GREDG RDFGDR GSFDG