Need help with a Lean script (binding TrackIR axis to keys)
Posted: Sat Nov 10, 2018 4:04 pm
Hello there,
In my quest to bind the tilting of my head to leaning in games, I stumbled upon GlovePie, which did the job but a massive delay. Then I found FreePie, this amazing software that is unfortunately not very intuitive for me that barely knows anything about python.
I found this script here which allows to bind an axis of TrackIR and its value to a key. The problem is, it outputs the key only once and that's it. I need a way to keep the key pressed down as long as the axis value is greater than the chosen threshold, and release the key when the axis value is lower than it.
For example, setting a roll axis value greater than 20 for Q, and when my head is tilted 20 or more degrees it outputs Q, while if it's tilted 19 degrees or less it releases Q and outputs nothing. Same for the opposite (-20 for E, lower than -20 it outputs E, higher than -20 like -19 or more it releases E and outputs nothing).
I have no idea what and how to mess with the script above to make this happen, so any help would be extremely appreciated.
In my quest to bind the tilting of my head to leaning in games, I stumbled upon GlovePie, which did the job but a massive delay. Then I found FreePie, this amazing software that is unfortunately not very intuitive for me that barely knows anything about python.
I found this script here which allows to bind an axis of TrackIR and its value to a key. The problem is, it outputs the key only once and that's it. I need a way to keep the key pressed down as long as the axis value is greater than the chosen threshold, and release the key when the axis value is lower than it.
For example, setting a roll axis value greater than 20 for Q, and when my head is tilted 20 or more degrees it outputs Q, while if it's tilted 19 degrees or less it releases Q and outputs nothing. Same for the opposite (-20 for E, lower than -20 it outputs E, higher than -20 like -19 or more it releases E and outputs nothing).
I have no idea what and how to mess with the script above to make this happen, so any help would be extremely appreciated.