# hx\_GenPseudo

## Description

This command decompiles the current function. If the decompilation is successful, it opens a new window titled **"Pseudocode"** and places the generated C text in this window.

The following commands can be used in the pseudocode window:

* [Rename](/ida-actions/hx_rename.md)
* [Set type](/ida-actions/hx_settype.md)
* [Set number representation](/ida-actions/hx_hexdec.md)
* [Edit indented comment](/ida-actions/hx_editcmt.md)
* [Edit block comment](/ida-actions/hx_editblockcmt.md)
* [Stock comments](/ida-actions/hx_stockcomments.md)
* [Show all call decompilations](https://github.com/HexRaysSA/ida-docs/blob/9.3/ida-actions/hx_/README.md)
* [Show all xref decompilations](https://github.com/HexRaysSA/ida-docs/blob/9.3/ida-actions/cmd_xref_decomp.md)
* [Hide](/ida-actions/hx_collapsedecls.md) / [Unhide](/ida-actions/hx_expanddecls.md)statements
* [Split](/ida-actions/hx_splitexpr.md) / [Unsplit](/ida-actions/hx_unsplitexpr.md) expression
* [Force call type](/ida-actions/hx_forcecalltype.md)
* [Set call type](/ida-actions/hx_setcalltype.md)
* [Add](/ida-actions/hx_addvararg.md) / [Del](/ida-actions/hx_delvararg.md) variadic arguments
* [Del function argument](/ida-actions/hx_removearg.md)
* [Add/delete function return type](/ida-actions/hx_addremovereturn.md)
* [Jump to cross reference](/ida-actions/hx_jmpxref.md)
* [Jump to cross reference globally](/ida-actions/hx_jumpglobalxref.md)
* [Generate HTML file](/ida-actions/hx_genhtml.md)
* [Mark](/ida-actions/hx_markdecompiled.md) / [Unmark](/ida-actions/hx_unmarkdecompiled.md) as decompiled
* [Copy to assembly](/ida-actions/hx_copy2asm.md)
* [Show/hide casts](/ida-actions/hx_toggleshowcasts.md)

If the current item is a local variable, additional items may appear in the context menu:

* [Reset pointer type](/ida-actions/hx_resetptrtype.md)
* [Convert to struct \*](/ida-actions/hx_cvt2strucptr.md)
* [Create new struct type](/ida-actions/hx_newstruc.md)
* [Map to another variable](/ida-actions/hx_map2othervar.md)
* [Unmap variable(s)](/ida-actions/hx_map2othervar.md)
* [Split variable](/ida-actions/hx_splitvar.md)
* [Unsplit variable](/ida-actions/hx_unsplitvar.md)
* [Forbid assignment propagation](/ida-actions/hx_nopropvar.md)

If the current item is a union field, an additional item may appear in the context menu:

* [Select union field](/ida-actions/hx_selunionfield.md)

If the current item is a parenthesis, bracket, or a curly brace, the following hotkey is available:

* [Jump to paired paren](/ida-actions/hx_jumpnextparen.md)

The user can also select text and copy it to the clipboard with the **Ctrl-C** combination.

If the current item is C statement keyword, an additional item may appear in the context menu:

* [Collapse/uncollapse item](/ida-actions/hx_collapseitem.md)

The user can also select text and copy it to the clipboard with the **Ctrl-C** combination.

Pressing <kbd>Enter</kbd> on a function name will decompile it. Pressing <kbd>Esc</kbd> will return to the previously decompiled function. If there is no previously decompiled function, the pseudocode window will be closed.

**Ctrl-Enter** or **Ctrl-double click** on a function name will open a new pseudocode window for it.

Pressing <kbd>F5</kbd> while staying in a pseudocode window will refresh its contents. Please note that the decompiler never refreshes pseudocode by itself because it can take really long.

The user can use the mouse right click or keyboard hotkeys to access the commands.


---

# 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/ida-actions/hx_genpseudo.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.
