Input Syntax: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 36: | Line 36: | ||
| <code>Button 1</code> results in a syntax error, because the expression is ambiguous. | | <code>Button 1</code> results in a syntax error, because the expression is ambiguous. | ||
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> | ||
|----------- | |----------- | ||
! ''&'' | ! ''&'' | ||
Line 55: | Line 50: | ||
| The expression value is equal to the LHS value and the RHS value summed up. | | The expression value is equal to the LHS value and the RHS value summed up. | ||
| <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. | |||
< | |----------- | ||
|- | |||
| | |||
|- | |||
|} | |} | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Revision as of 13:49, 28 July 2016
This page explains how to properly assign multiple inputs and the control expression syntax in the input configuration dialogs.
Buttons
Detect | Wait for input from the selected device, and highlight the corresponding input in the list. |
---|---|
Select | Copy the selected input name into the control expression field. |
| OR | Copy the selected input name into the control expression field, with "|" prepended. |
& AND | Copy the selected input name into the control expression field, with "&" prepended. |
! NOT | Copy the selected input name into the control expression field, with "!" prepended. |
+ ADD | Copy the selected input name into the control expression field, with "+" prepended. |
Syntax
Token | Explanation | Example usage |
---|---|---|
` | The backtick is used in cases where the expression is ambiguous. | Button 1 results in a syntax error, because the expression is ambiguous.
Adding backticks around the button name makes it able to be parsed correctly: |
& | The expression is true if both the LHS and the RHS are true. | `Button 1` & `Button 2`
The virtual controller button will be pressed if and only if both Button 1 and Button 2 are pressed. |
! | Negates the following expression's value. | !`Button 1`
The virtual controller button will be pressed if and only if Button 1 is not pressed. |
+ | The expression value is equal to the LHS value and the RHS value summed up. | `Axis 1+` + `Axis 2+`
|
( | The left parenthesis is used to open an expression group. | (`Button 1` & `Button 2`) | `Button 3`
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. |