# Keyboard Shortcuts

Frihet is built for people who don't want to leave the keyboard. Memorize these shortcuts and you'll save hours of clicking every month.

## Universal shortcuts

| Shortcut | Action |
|----------|--------|
| `Cmd+K` | Opens the **Command Palette** — search any action or document |
| `Cmd+/` | Shows this **Shortcuts help** page |
| `Esc` | Closes dialogs, modals, and palettes |

---

## Section navigation (G-sequences)

Frihet uses a **G-sequence** system: press `G`, then within **800ms** press a second key.

### How they work

1. Press `G` (a visual indicator appears)
2. Within 800ms, press the second key
3. Frihet takes you to that section

Example: to go to the Dashboard, press `G` and then `D` quickly.

### G-sequence reference

| Shortcut | Section |
|----------|---------|
| `G` → `D` | **Dashboard** — income, expenses, upcoming invoices |
| `G` → `F` | **Invoices** — all your invoices and issued quotes |
| `G` → `Q` | **Quotes** — quotes not yet converted to invoices |
| `G` → `E` | **Expenses** — expense log and categorization |
| `G` → `P` | **Products** — your product and service catalog |
| `G` → `T` | **Tax Calendar** — tax deadlines (quarterly, annual) |
| `G` → `C` | **Contacts** — client, vendor, and staff management |
| `G` → `S` | **Settings** — company configuration, taxes, integrations |

---

## Inside the Command Palette (`Cmd+K`)

Open `Cmd+K` and start typing:

- `new invoice` — Create a new invoice
- `new budget` — Create a quote
- `new expense` — Log an expense
- `new product` — Add an item to the catalog
- `new contact` — Create a client or vendor
- `search invoices` — Find an invoice by number, client, date
- `search expenses` — Find expenses
- `search products` — Search your catalog
- `settings` — Open settings

You can also type in natural language (if you have the AI assistant active):
- `create invoice for john for 500` — Understands intent, finds client, creates document
- `transport expense today 50 euros` — Logs a categorized expense
- `new client acme corp` — Creates a contact

---

## Inside a document (invoice, quote, etc.)

| Shortcut | Action |
|----------|--------|
| `Cmd+S` | **Save** — saves changes without closing |
| `Cmd+Enter` | **Send** — opens dialog to send by email |
| `Cmd+P` | **Preview** — generates and displays PDF |
| `Tab` | Next field — navigate through the form |
| `Shift+Tab` | Previous field — go back |

---

## In lists (invoices, expenses, contacts)

| Shortcut | Action |
|----------|--------|
| `/` | Open quick filter — type to search |
| `Cmd+A` | Select all results |
| `↑` / `↓` | Navigate between rows (when filter is active) |
| `Enter` | Open the selected item |
| `Delete` | Delete the selected item (asks for confirmation) |

---

## Important notes

### Shortcuts are disabled while you type

If you're inside a text field (client name, description, etc.), shortcuts are **disabled**:

- `Cmd+K` inside an input still opens Cmd+K but doesn't reopen the palette
- `G` sequences don't respond inside fields

**Fix:** Press `Esc` to exit the field, then use the shortcut.

### G-sequences have a timeout

You have **800ms** from pressing `G` to press the second key. If you exceed that, `G` cancels.

This is intentional: it lets you type "Google Analytics" without accidents — only fast `Ga` opens Analytics.

### Customize shortcuts

Some shortcuts are standard (Cmd+K, Cmd+S). Navigation shortcuts (`G`-sequences) can be customized from `Settings > Keyboard Shortcuts`.

---

## Typical workflow

Here's how an experienced Frihet user invoices in 30 seconds:

```
Cmd+K                          # Open palette
new invoice                    # Type and press Enter
[Type client name]             # Frihet autocompletes
Tab Tab                        # Jump to line items field
[Type description + price]     # Add a line
Cmd+S                          # Save
Cmd+K send                     # Command palette: send
```

---

## Visual reference

For a visual reference of all shortcuts, press `Cmd+/` at any time. Frihet shows an interactive card with everything available in your current context.

---

**Tip:** Bookmark this page. Within a week, the shortcuts will be automatic.
