Is there any way in controls.sii to set up "on only" or "off only" buttons for a toggle?

alblks
Posts: 2
Joined: 05 Dec 2025 04:58

Is there any way in controls.sii to set up "on only" or "off only" buttons for a toggle?

#1 Post by alblks » 05 Dec 2025 05:31

So, I want to assign one controller button for putting some toggle (like parking brake or similar) to ON, and another button for OFF. I tried setting it in "controls.sii" to something like this:

Code: Select all

config_lines[383]: "mix parkingbrake `keyboard.space?0 | (joy2.b29?0 & !parkingbrake) | (joy2.b30?0 & parkingbrake)  | semantical.parkingbrake?0`"
but it doesn't seem to have any effect.

As far as I understand the logic behind a toggle mix - if the mix expression evaluates to true, it toggles the setting to the opposite state, and referring to the mix name in the mix should evaluate to its previous state. So, the idea is to check its state and react to a button only if the toggle is in the needed position (OFF or ON accordingly).

Referring to "parkingbrake" from other mixes works, like if you set, say, hblight to it, it does switch on and off depending on parkingbrake position. But when I try using it in its own mix, something goes wrong (or I don't understand the way it works).

(Sure, I could do the same by using any button remapping software, or making a simple input plugin, but first I want to make certain I can't do that by just editing the config file.)

Return to “Steering wheel + pedals”

Who is online

Users browsing this forum: CCBot [Bot]