# /mapclick

## Syntax

**/mapclick \[ list |** ***keycombo*** **| clear ]** ***command***

## Description

Allows you to define custom *commands* to execute when right-clicking with a certain key combination on the in-game map.

* List will show you the current mapclicks that have been defined.
* *Keycombo* can be one or more of the following (multiple keys must be specified with +):
  * ctrl
  * lalt
  * ralt
  * shift
* The default mapclicks are the following:

|          |                  |                               |
| -------- | ---------------- | ----------------------------- |
| **ctrl** | /maphide id %i   | Hides that spawn from the map |
| **lalt** | /highlight id %i | Highlights the clicked spawn  |

## Example

```
/mapclick lalt+shift /mycommand %i
```

When holding down the left alt, shift and then right-clicking a spawn on the map, "/mycommand %i" will be executed.

## See Also

* [MQ2Map](/macroquest/plugins/core-plugins/mq2map.md)

[Return to Slash Commands](/macroquest/commands/slash-commands.md)


---

# Agent Instructions: 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://macroquest.gitbook.io/macroquest/plugins/core-plugins/mq2map/mapclick.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.
