# Complete Guide to Keyboard Shortcuts in Zakirullin Files Web App

> Master Zakirullin Files web app shortcuts. Discover ⌘P search, ⌘N new files, ⌘D delete, and text commands like jj for journal entries. Boost your productivity now.

- Repository: [Artem Zakirullin/files.md](https://github.com/zakirullin/files.md)
- Tags: how-to-guide
- Published: 2026-05-21

---

**Zakirullin Files provides comprehensive keyboard shortcuts including ⌘P for search, ⌘N for new files, ⌘D for deletion, and text commands like "jj" for journal entries, all implemented across [`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js) and [`server/bot.go`](https://github.com/zakirullin/files.md/blob/main/server/bot.go).**

The Zakirullin Files web app is an open-source markdown-based file manager that prioritizes keyboard-driven workflows. Understanding the available keyboard shortcuts in the Zakirullin Files web app can significantly speed up navigation, file management, and journaling tasks. This guide covers every shortcut mapped in the client-side JavaScript and server-side Go code.

## UI Navigation and File Management Shortcuts

All primary interface shortcuts are defined in [`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js) and use the `isMetaKey()` helper to ensure cross-platform compatibility between macOS (⌘), Windows, and Linux (Ctrl/Alt).

### Window and Sidebar Controls

- **⌘W** (or **CtrlW**): Hides the secondary editor pane by invoking `hideEditor2()`. Implemented at [lines 703-705](https://github.com/zakirullin/files.md/blob/main/web/app.js#L702-L705).

- **⌘~** or **⌘§**: Toggles the sidebar visibility ([lines 790-797](https://github.com/zakirullin/files.md/blob/main/web/app.js#L790-L797)).

### File Operations

- **⌘N**: Creates a **new file** via `newFile()`. Add **Shift** to create a **new folder** using `newFolder()` instead ([lines 735-745](https://github.com/zakirullin/files.md/blob/main/web/app.js#L735-L745)).

- **⌘D**: Deletes the currently opened file by calling `removeCurrentFile()` ([lines 728-733](https://github.com/zakirullin/files.md/blob/main/web/app.js#L728-L734)).

### Modal and Search Shortcuts

- **⌘P** or **⌘K**: Opens the *Search* modal and focuses the search input ([lines 707-714](https://github.com/zakirullin/files.md/blob/main/web/app.js#L706-L714)).

- **⌘M**: Opens the *Move* modal, focusing the move-input field for quick file relocation ([lines 721-726](https://github.com/zakirullin/files.md/blob/main/web/app.js#L720-L726)).

## Chat and Editor Interface Shortcuts

### Chat Panel Controls

- **Esc**: Context-aware behavior—closes the chat panel if open, deselects messages if selected, or otherwise hides the secondary editor ([lines 749-775](https://github.com/zakirullin/files.md/blob/main/web/app.js#L749-L775)).

- **⌘Enter**: Opens the chat view directly ([lines 798-800](https://github.com/zakirullin/files.md/blob/main/web/app.js#L798-L800)).

- **⌘ShiftEnter**: Toggles the chat modal state (opens if closed, closes if open) ([lines 779-788](https://github.com/zakirullin/files.md/blob/main/web/app.js#L779-L788)).

### Visual Feedback System

When any meta key (**⌘**, **Ctrl**, or **Alt**) is held down, the application adds the `cmd-pressed` CSS class to the `<body>` element for visual feedback ([lines 802-807](https://github.com/zakirullin/files.md/blob/main/web/app.js#L802-L807)). This is handled by the `isMetaKey(event)` function used throughout the event listeners.

## Text Command Shortcuts for Journal and Recent Files

Beyond traditional hotkeys, Zakirullin Files implements **textual shortcuts** processed server-side in [`server/bot.go`](https://github.com/zakirullin/files.md/blob/main/server/bot.go). These allow quick command entry by typing specific character sequences.

The shortcut mappings are defined in the `Shortcuts` map at [lines 200-205](https://github.com/zakirullin/files.md/blob/main/server/bot.go#L200-L205):

```go
var Shortcuts = map[string][]string{
    CmdAddToJournalShortcut:            {"/ж", "jj", "жж"},
    CmdAddToJournalAndContinueShortcut: {"жд", "jd", "ja"},
    CmdAddToRecentFileShortcut:         {"++"},
}

```

### Journal Entry Shortcuts

- **`/ж`**, **`jj`**, or **`жж`**: Expands to the `j` command, creating a new journal entry.

- **`/жд`**, **`jd`**, or **`ja`**: Expands to the `ja` command, adding a journal entry while keeping the editor focused for continued writing.

### Recent File Shortcuts

- **`++`**: Expands to the `+` command, adding the current file to the "Recent" list for quick access later.

## Source Code Architecture

The shortcut system spans two main components:

1. **Client-side ([`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js))**: Handles global hotkeys using standard JavaScript event listeners. The `isMetaKey()` helper normalizes cross-platform modifier keys (Meta, Ctrl, Alt).

2. **Server-side ([`server/bot.go`](https://github.com/zakirullin/files.md/blob/main/server/bot.go))**: Parses text input for command shortcuts after messages are sent. This allows for contextual commands that operate on the current file or journal state.

## Summary

- **Navigation**: Use **⌘P** for search, **⌘M** for move operations, and **⌘~** to toggle the sidebar.
- **File Management**: Create files with **⌘N**, folders with **⌘ShiftN**, and delete with **⌘D**.
- **Chat Interface**: Toggle chat with **⌘ShiftEnter**, open with **⌘Enter**, and use **Esc** for context-aware closing.
- **Text Commands**: Type `jj` to add journal entries, `ja` to continue journaling, or `++` to bookmark recent files.
- **Cross-platform**: All shortcuts support macOS (⌘), Windows, and Linux (Ctrl/Alt) through the `isMetaKey()` abstraction in [`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js).

## Frequently Asked Questions

### Do these keyboard shortcuts work on Windows and Linux?

Yes. The application uses an `isMetaKey(event)` helper function in [`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js) that treats **⌘ (Meta)**, **Ctrl**, and **Alt** as command keys, ensuring shortcuts work across macOS, Windows, and Linux operating systems.

### How do I create a new folder instead of a new file?

Press **⌘ShiftN** (hold Shift while pressing the new file shortcut). This triggers `newFolder()` instead of `newFile()`, as implemented in [`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js) lines 740-743.

### What happens when I press the Escape key?

The Escape key behavior is context-aware. According to [`web/app.js`](https://github.com/zakirullin/files.md/blob/main/web/app.js) lines 749-775, it first checks if the chat panel is open and closes it, then checks if a message is selected and deselects it, and finally falls back to hiding the secondary editor pane.

### Where are the "jj" and "++" text shortcuts processed?

These text commands are processed server-side in [`server/bot.go`](https://github.com/zakirullin/files.md/blob/main/server/bot.go) at lines 200-205. When you type these sequences and send the message, the backend bot matches them against the `Shortcuts` map and executes the corresponding journal or recent-file commands.