Input Syntax: Difference between revisions

From Dolphin Emulator Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
As a follow-up by right-clicking the button in GameCube, Wiimote, and Hotkey configuration windows, this page explains how to properly assign multiple input and combination of each command in hotkey and controller configuration window.
This page explains how to properly assign multiple inputs and the control expression syntax in the input configuration dialogs.


== Assignment Buttons ==
== Buttons ==
When opening Configuring Controller window the text cursor will be placed on beginning of lines in small text field.


{| class="wikitable"
{| class="wikitable"
|-
|-
! ''Detect''
! ''Detect''
| It will automatically highlight the selected input in the list which can save your time looking through there. It will wait for input from the selected device in '''Device''' dropdown for 3 seconds.
| Wait for input from the selected device, and highlight the corresponding input in the list.
|-
|-
! ''Select''
! ''Select''
| Assigns the selected input from the list to the current text cursor location in small text field.
| Copy the selected input name into the control expression field.
|-
|-
! ''| OR''
! ''| OR''
| Similar to '''''Select''''', adds "<var> &#124; </var>" before a selected input. Input parameter with '''''&#124; OR''''' can trigger the same command independently. Differences between this and '''''+ ADD''''' unknown.
| Copy the selected input name into the control expression field, with "&#124;" prepended.
* Syntax error when selected first.
|-
|-
! ''& AND''
! ''&amp; AND''
| Similar to '''''Select''''', adds "<var> & </var>" before a selected input. Input parameter with '''''& AND''''' will wait for the last input parameter to active to trigger the command.
| Copy the selected input name into the control expression field, with "&amp;" prepended.
* Syntax error when selected first.
|-
|-
! ''! NOT''
! ''! NOT''
| Similar to '''''Select''''', adds "<var>!</var>" before a selected input. Input parameter with '''''! NOT''''' will disable the next input parameter so that input will not trigger the current command.
| Copy the selected input name into the control expression field, with "!" prepended.
* This is one confusing part, requires additional combination and/or manual editing in the text field. Check the [[#Using ! NOT|#! NOT]] example in next section.
|-
|-
! ''+ ADD''
! ''+ ADD''
| Similar to '''''Select''''', adds "<var> + </var>" before a selected input.  Input parameter with '''''+ ADD''''' can trigger the same command independently. Differences between this and '''''&#124; OR''''' unknown.
| Copy the selected input name into the control expression field, with "+" prepended.
* Syntax error when selected first.
|}
|}



Revision as of 13:24, 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.

Parentheses

Using () parentheses can group input parameters together and thus can solve & AND troubles.

The first two parameters don't work.
`Pad W` & `Button X` | `Pad E` & `Button B`
However using parentheses can solve this.
(`Pad W` & `Button X`) | (`Pad E` & `Button B`)

Parameter Examples

This is personalized input combination for Fullscreen in hotkey setting. The first parameter is for Guide (Big "X") button on Xbox 360 controller and the final parameters are for Alt + Enter key combination on keyboard. Both devices can trigger Fullscreen.

Guide | `DInput/0/Keyboard Mouse:RMENU` & `DInput/0/Keyboard Mouse:RETURN`

Using ! NOT

Command will always active unless this input is triggered.
!`Pad W`
Command will active when Button X is pressed, but it won't be triggered when Pad W is also pressed.
!`Pad W` & `Button X`
The first two parameters will not work anymore. #Parentheses can help.
!`Pad W` & `Button X` | !`Pad E` & `Button B`
This will work too.
`Button X` & !`Pad W` | `Button B` & !`Pad E`