Input Syntax: Difference between revisions

Line 31: Line 31:
Adding backticks around the button name makes it able to be parsed correctly: <code>`Button 1`</code>
Adding backticks around the button name makes it able to be parsed correctly: <code>`Button 1`</code>
|-----------
|-----------
! ''(''
| The left parenthesis is used to open an expression group.
| rowspan="2" | <code>(`Button 1` & `Button 2`) | `Button 3`</code>
The virtual controller button will be pressed if both Button 1 and Button 2 are pressed, and/or Button 3 is pressed.
|-----------
! '')''
| The right parenthesis is used to close an expression group.
|-----------
! '':''
| The LHS is used as the device name, and the RHS is used as the control name. The whole expression may need to be wrapped around backticks so it parses correctly.
| <code>`evdev/0/Device:Button 0`</code>
The virtual controller button will be pressed if Button 0 (from device "evdev/0/Device") is pressed.
|-----------
|}
{| class="wikitable"
|-
! scope="col" | Token
! scope="col" | Explanation
! scope="col" | Example usage
|-----------
! ''&#124;''
! ''&#124;''
| The expression is true if the left-hand side (LHS) or the right-hand side (RHS) are true. (This is not an exclusive OR.)
| The expression is true if the left-hand side (LHS) or the right-hand side (RHS) are true. (This is not an exclusive OR.)
Line 51: Line 72:
| Sums up the LHS value and the RHS value and clamps the sum to the 0.0-1.0 range.
| Sums up the LHS value and the RHS value and clamps the sum to the 0.0-1.0 range.
| <code>`Axis 1+` + `Axis 2+`</code>
| <code>`Axis 1+` + `Axis 2+`</code>
|-----------
! ''(''
| The left parenthesis is used to open an expression group.
| rowspan="2" | <code>(`Button 1` & `Button 2`) | `Button 3`</code>
The virtual controller button will be pressed if both Button 1 and Button 2 are pressed, and/or Button 3 is pressed.
|-----------
! '')''
| The right parenthesis is used to close an expression group.
|-----------
! '':''
| The LHS is used as the device name, and the RHS is used as the control name. The whole expression may need to be wrapped around backticks so it parses correctly.
| <code>`evdev/0/Device:Button 0`</code>
The virtual controller button will be pressed if Button 0 (from device "evdev/0/Device") is pressed.
|-----------
|-----------
|}
|}


[[Category:Tutorials]]
[[Category:Tutorials]]