# Keyboard macros

You can define a keyboard macro to automate frequent keystroke sequences. They are defined in the same manner as in the Borland IDE:

```
        - Press Alt--
        - Press <key> - macro name
        - Enter macro body
        - Press Alt-=
```

All macros are lost when you [exit](/9.0/user-guide/user-interface/menu-bar/file/exit-ida.md) IDA. If you want to have a static macro which is not lost when you quit IDA, then write it down into IDATUI.CFG file. The format of a macro definition is explained [here](/9.0/user-guide/configuration/configuration-files.md).

**NOTE:** keyboard macros are available only in the text version of IDA.


---

# 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://docs.hex-rays.com/9.0/user-guide/configuration/keyboard-macros.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.
