# mux

Configuring a `mux` (multiplexed) input controller allows you to combine one or more controllers into a single virtual controller.

This lets you control a machine from different locations, such as the web and a locally connected gamepad, or use multiple controllers as one device.

For example, you could use a joystick alongside a numpad.

## Configuration

To combine multiple controllers into a `mux` controller, you must first configure each controller individually.

- [JSON Template](https://docs.viam.com/reference/components/input-controller/mux/#configure-a-mux-input-controller-0)
- [JSON Example](https://docs.viam.com/reference/components/input-controller/mux/#configure-a-mux-input-controller-1)

```json

```

Copy

The following example configuration combines a `gamepad` and a `webgamepad` controller:

```json

```

Copy

The following attributes are available for `mux` input controllers:

| Name       | Type   | Required?  | Description                                                                 |
|------------|--------|------------|-----------------------------------------------------------------------------|
| `sources`  | array  | **Required** | The `name` of every controller component you wish to combine input from.  |

#### Important

You must put each controller’s `name` that you add in `sources` in `depends_on`.
This tells the program loading the config to fully load the source components first.

## Test the input controller

After you configure your input controller, open the input controller’s **TEST** panel on the **CONFIGURE** or [**CONTROL**](https://docs.viam.com/monitor/default-interface/#web-ui) tabs.
View the current value of each input on your controller.
