Input Syntax

From Dolphin Emulator Wiki
Jump to navigation Jump to search

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

| 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 both the LHS and the RHS are true.
! Negates the following expression's value.
+ The expression value is equal to the LHS value and the RHS value summed up.

Parentheses

() parentheses are used to group expressions.

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`