Code: Select all
config_lines[383]: "mix parkingbrake `keyboard.space?0 | (joy2.b29?0 & !parkingbrake) | (joy2.b30?0 & parkingbrake) | semantical.parkingbrake?0`"
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.)