> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/remapping.md).

# Remapping

Remappings are defined at the beginning of a script and must be done before the `main` procedure. They cannot be executed during run time.

| Command Name | Description                                             |
| ------------ | ------------------------------------------------------- |
| `remap`      | Assigns the value of the controller input to the output |
| `unmap`      | Disconnects an input from the output report             |

***

### Remap

`remap` assigns the value of the input identifier to the output identifier.

```gpc
remap PS4_CROSS -> PS4_SQUARE;
```

Although you define remaps at the beginning of a script, the virtual machine does not execute the remaps until the `main` section has finished the current iteration. This means that any scripting operations on the remapped entries for inputs should be programmed for the original buttons without considering the remapped item.

#### Syntax

```
remap <input identifier> -> <output identifier>;
```

#### Parameters

| Parameter             | Description                                              |
| --------------------- | -------------------------------------------------------- |
| `<input identifier>`  | Any defined variable                                     |
| `<output identifier>` | Index point of the bit to be set with a range of 0 to 15 |

#### Returns

Nothing.

***

### Unmap

`unmap` disconnects an input from the output report. This means that although the virtual machine can still see the value of the button/axis on the input report, it will not pass its value onto the console in the output report.

You can therefore still use an unmapped button to run code or start combos in your GPC script without worrying about its original function being sent to the console.

```gpc
unmap PS4_TRIANGLE;        // unmaps the PS4 Triangle identifier
unmap ALL_REMAPS;          // unmaps all controller identifiers which have been remapped
```

#### Syntax

```
unmap <output identifier>;
```

#### Parameters

| Parameter             | Description          |
| --------------------- | -------------------- |
| `<output identifier>` | Any defined variable |

#### Returns

Nothing.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/remapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
