# Customization

## Custom Keymaps

If you want to make custom keymaps, you can create `keymap.json` at the user configuration path:

* `/Users/<user>/Library/Application Support/StarUML` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML` for Windows.
* `~/.config/StarUML` for Linux.

You can get how to edit the custom keymap file (`keymap.json`) at [Keymaps](/developing-extensions/keymaps.md).

Here is an example:

```javascript
{
  "cmdctrl-alt-1": null,
  "cmdctrl-alt-g": "view:show-grid"
}
```

The first entry is to release the `Ctrl+Alt+1` (`Cmd+Option+1` in MacOS) key binding and the second entry is to change key binding of **View > Show Grid** (Command ID is `view:show-grid`) to `Ctrl+Alt+G` (`Cmd+Option+G` in MacOS).

If you want to know all command IDs, enter the following expression at **Console** (Debug > Show DevTools > Console tab).

```javascript
Object.keys(app.commands.commands)
```

## Custom Fonts

If you want to use custom fonts, you can add a font folder in the custom fonts folder:

* `/Users/<user>/Library/Application Support/StarUML/fonts` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML\fonts` for Windows.
* `~/.config/StarUML/fonts` for Linux.

1. Create a font folder (e.g. `my-font`) at the custom fonts folder.
2. Place a font description file (`font.json`) and the TrueType font files `.ttf` in the font folder.

The font description file looks as below:

```javascript
[
  {
    "name"       : "MyFont",
    "regular"    : "MyFont-Regular.ttf",
    "italic"     : "MyFont-Italic.ttf",
    "bold"       : "MyFont-Bold.ttf",
    "boldItalic" : "MyFont-BoldItalic.ttf"
  }
]
```

StarUML should be restarted to recognize the added custom fonts.


---

# 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.staruml.io/user-guide/customization.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.
