> ## Documentation Index
> Fetch the complete documentation index at: https://sonamu.cartanova.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Shortcuts & Commands

> Sonamu Extension shortcuts and commands

Available shortcuts and Command Palette commands in the Sonamu Extension.

## Keyboard Shortcuts

### Navigation

| Shortcut  | Action                      | Description                                                                  |
| --------- | --------------------------- | ---------------------------------------------------------------------------- |
| F12       | Go to Definition            | Jump to Naite key's definition location (`Naite.t()`)                        |
| Shift+F12 | Go to References            | Display all reference locations for Naite key (`Naite.get()`, `Naite.del()`) |
| Cmd+Click | Go to Definition/References | Jump to definition or references based on VS Code settings                   |
| Cmd+T     | Workspace Symbol Search     | Search for Naite keys in workspace                                           |

### Autocomplete

| Trigger       | Action           | Description                |
| ------------- | ---------------- | -------------------------- |
| `Naite.t("`   | Key autocomplete | Display all Naite key list |
| `Naite.get("` | Key autocomplete | Display all Naite key list |
| `Naite.del("` | Key autocomplete | Display all Naite key list |

When autocomplete triggers, navigate with arrow keys and select with Enter or Tab.

<Frame caption="Autocomplete Trigger">
  <img src="https://mintcdn.com/cartanova-7788888c/s1_oTUDBU5sL85Nu/images/vscode-extension1.png?fit=max&auto=format&n=s1_oTUDBU5sL85Nu&q=85&s=7cbc9862f60e400c93c219de6c79b49f" alt="Naite Key Autocomplete (Naite.t)" width="1050" height="92" data-path="images/vscode-extension1.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/cartanova-7788888c/s1_oTUDBU5sL85Nu/images/vscode-extension2.png?fit=max&auto=format&n=s1_oTUDBU5sL85Nu&q=85&s=3877ba9dce89270bbc3c0e451a2f15e2" alt="Naite Key Autocomplete (Naite.del)" width="908" height="54" data-path="images/vscode-extension2.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/cartanova-7788888c/s1_oTUDBU5sL85Nu/images/vscode-extension3.png?fit=max&auto=format&n=s1_oTUDBU5sL85Nu&q=85&s=b0db38087e9245c661b28ab996c83ee8" alt="Naite Key Autocomplete (Naite.get)" width="1428" height="94" data-path="images/vscode-extension3.png" />
</Frame>

## Command Palette Commands

Use the following commands from the Command Palette (Cmd+Shift+P).

### Sonamu: Open Naite Trace Viewer

Opens the Naite Trace Viewer. Check values recorded with `Naite.t()` during test execution in real-time.

```
Cmd+Shift+P → "Sonamu: Open Naite Trace Viewer"
```

<Frame caption="Opening Trace Viewer" />

### Sonamu: Rescan Naite Keys

Rescans all Naite keys in the workspace. Useful when the key list isn't updated or autocomplete isn't working.

```
Cmd+Shift+P → "Sonamu: Rescan Naite Keys"
```

Running this displays the number of found keys as a notification.

<Frame caption="Rescan Naite Keys">
  <video autoPlay muted loop playsInline controls className="w-full rounded-xl" src="https://mintcdn.com/cartanova-7788888c/W1Yp58PwXUAHLkNG/images/vscode-extension17.mp4?fit=max&auto=format&n=W1Yp58PwXUAHLkNG&q=85&s=52da2596be98fb407a6c183d755e981a" data-path="images/vscode-extension17.mp4" />
</Frame>

## Context Menu

Right-clicking on a Naite key string displays the following menu:

* **Go to Definition**: Jump to definition location
* **Go to References**: Display reference location list
* **Peek Definition**: Preview definition inline
* **Peek References**: Preview references inline

<Frame caption="Context Menu">
  <img src="https://mintcdn.com/cartanova-7788888c/W1Yp58PwXUAHLkNG/images/vscode-extension18.png?fit=max&auto=format&n=W1Yp58PwXUAHLkNG&q=85&s=9a1451d9747a54a36706f2d8fb05d44c" alt="Context Menu" style={{ width: "70%", borderRadius: "8px" }} width="1508" height="642" data-path="images/vscode-extension18.png" />
</Frame>

## Changing Shortcuts in Settings

You can customize shortcuts in VS Code settings:

1. Open Command Palette (Cmd+Shift+P)
2. Run "Preferences: Open Keyboard Shortcuts"
3. Search "Sonamu" to find related commands
4. Change to desired shortcuts

<Frame caption="Shortcut Settings">
  <img src="https://mintcdn.com/cartanova-7788888c/W1Yp58PwXUAHLkNG/images/vscode-extension19.png?fit=max&auto=format&n=W1Yp58PwXUAHLkNG&q=85&s=5e9e8ca84ff46ae223d278e745c62d0e" alt="Shortcut Settings" style={{ width: "70%", borderRadius: "8px" }} width="2528" height="816" data-path="images/vscode-extension19.png" />
</Frame>

## Common Workflows

### Test Writing Workflow

1. Type `Naite.t("` for key autocomplete
2. Run tests
3. Trace Viewer opens automatically
4. Click trace to check code location
5. Verify values with `Naite.get()` as needed

### Debugging Workflow

1. Add `Naite.t()` to problematic section
2. Run tests
3. Check recorded values in Trace Viewer
4. Jump to location with F12
5. Fix code and rerun

### Key Cleanup Workflow

1. Open Workspace Symbol Search with `Cmd+T`
2. Search for key to clean up
3. Check all references with Shift+F12
4. Remove unused keys
