# Keyboard Shortcuts

> Complete reference for keyboard shortcuts in Last9 to navigate, query, and analyze your telemetry data faster.

Source: https://last9.io/docs/keyboard-shortcuts/

Last9 has keyboard shortcuts available throughout the application. **Press `?` on your keyboard to display all available shortcuts** for the current page.

This page documents the most commonly used shortcuts. The in-app shortcut reference (`?`) always shows the complete and up-to-date list.

## Global Shortcuts

These shortcuts work anywhere in the Last9 application.

| Shortcut      | Description             |
| ------------- | ----------------------- |
| `?`           | Show keyboard shortcuts |
| `⌘/Ctrl + K`  | Open command palette    |
| `⌘/Ctrl + \`  | Toggle sidebar          |
| `g h`         | Go to home              |
| `g l`         | Go to Logs Explorer     |
| `Alt/Opt + T` | Open time picker        |

:::tip
The command palette (`⌘/Ctrl + K`) provides quick access to all pages, dashboards, and settings. Start typing to filter results.
:::

---

## Logs Explorer

### Query Modes

Switch between different query modes using number keys.

| Shortcut | Description                                   |
| -------- | --------------------------------------------- |
| `1`      | Switch to Ask mode (natural language queries) |
| `2`      | Switch to Builder mode (visual query builder) |
| `3`      | Switch to LogQL mode (code editor)            |

### Query Execution

| Shortcut         | Description                    |
| ---------------- | ------------------------------ |
| `r`              | Refresh / re-run current query |
| `/`              | Focus search input             |
| `⌘/Ctrl + Enter` | Run query (in Editor mode)     |

### Log Navigation

Navigate through log results using vim-style or arrow key navigation.

| Shortcut           | Description                            |
| ------------------ | -------------------------------------- |
| `↓` or `j`         | Move to next log row                   |
| `↑` or `k`         | Move to previous log row               |
| `Enter` or `Space` | Open log details panel                 |
| `⌘/Ctrl + Click`   | Open log details panel (mouse)         |
| `Esc`              | Close details panel                    |
| `c`                | Copy selected log as JSON to clipboard |

:::note
When the details panel is open, `j` and `k` navigate through logs while keeping the panel open, allowing you to quickly scan through multiple log entries.
:::

### Log Details Panel

When the log details side panel is open, use these shortcuts to navigate between tabs.

| Shortcut | Description  |
| -------- | ------------ |
| `[`      | Previous tab |
| `]`      | Next tab     |

The tabs include: Content, Log Attributes, Resource Info, Related Logs, Related Traces, and Related Metrics.

### Toggle Controls

Toggle shortcuts use `t` as a prefix key (press `t`, then the second key within 1 second).

| Shortcut | Description              |
| -------- | ------------------------ |
| `t a`    | Toggle attributes column |
| `t w`    | Toggle line wrap         |
| `t f`    | Toggle filters sidebar   |
| `t v`    | Toggle volume chart      |
| `t q`    | Toggle query library     |

### Query Builder

These shortcuts work when using the Builder mode.

| Shortcut                   | Description                       |
| -------------------------- | --------------------------------- |
| `Shift + Enter`            | Add a new stage                   |
| `Shift + Delete`           | Remove the current stage          |
| `Tab`                      | Navigate to next field in a stage |
| `,`                        | Jump to next input field          |
| `⌘/Ctrl + Z`               | Undo last change                  |
| `⌘/Ctrl + Shift + Z` (Mac) | Redo                              |
| `Ctrl + Y` (Windows/Linux) | Redo                              |

:::tip
The undo/redo functionality maintains a history of up to 50 changes, so you can safely experiment with different query configurations.
:::

---

## Traces Explorer

### Trace Navigation

Navigate through trace results using vim-style or arrow key navigation.

| Shortcut           | Description                      |
| ------------------ | -------------------------------- |
| `↓` or `j`         | Move to next trace row           |
| `↑` or `k`         | Move to previous trace row       |
| `Enter` or `Space` | Open trace details panel         |
| `⌘/Ctrl + Click`   | Open trace details panel (mouse) |
| `Esc`              | Close details panel              |

:::note
When the details panel is open, `j` and `k` navigate through traces while keeping the panel open, allowing you to quickly scan through multiple traces.
:::

### Trace Details Panel

When the trace details side panel is open, use these shortcuts to navigate between tabs.

| Shortcut | Description  |
| -------- | ------------ |
| `[`      | Previous tab |
| `]`      | Next tab     |

The tabs include: Waterfall, Span List, Span Tree, Metadata, Related Logs, and Context.

---

## Quick Reference

The most commonly used shortcuts across Logs and Traces explorers:

| Category      | Shortcut        | Action                        |
| ------------- | --------------- | ----------------------------- |
| Global        | `?`             | Show all shortcuts            |
| Global        | `⌘/Ctrl + K`    | Command palette               |
| Navigation    | `j` / `k`       | Navigate rows (Logs & Traces) |
| Navigation    | `↓` / `↑`       | Navigate rows (Logs & Traces) |
| Navigation    | `Enter`         | Open details                  |
| Navigation    | `Esc`           | Close panel                   |
| Navigation    | `[` / `]`       | Previous/Next tab in details  |
| Query (Logs)  | `r`             | Re-run query                  |
| Query (Logs)  | `1` / `2` / `3` | Switch modes                  |
| Query (Logs)  | `/`             | Focus search                  |
| Toggle (Logs) | `t f`           | Filters sidebar               |
| Toggle (Logs) | `t v`           | Volume chart                  |
| Toggle (Logs) | `t w`           | Line wrap                     |
| Toggle (Logs) | `t q`           | Query library                 |

---

## Troubleshooting

Please get in touch with us on [Discord](https://discord.com/invite/Q3p2EEucx9) or [Email](mailto:support@last9.io) if you have any questions.
