Appearance
Custom keyboards
The iOS soft keyboard is designed for prose, not code. Curly braces, brackets, pipes, tildes — half the punctuation a coder needs is buried two layers deep. Hachicode adds a customizable accessory bar above the soft keyboard so the keys you actually use are one tap away.
This page is about the soft-keyboard accessory bar. If you're using an external hardware keyboard, the accessory bar is hidden; see Editor basics for the hardware-keyboard story.
What's on the accessory bar
A horizontal row of up to 10 customizable key slots. Each slot can hold one of several action types:
- Insert text — a single character (
{,],~) or a short string. - Cursor motion — arrow keys, jump to line start / end, jump by word.
- Editor command — undo / redo / indent / outdent / save.
- Insert a snippet — paste a snippet's template at the cursor; see Snippets.
- Special — Hide keyboard (always present, pinned to the trailing edge).
Each key can also bind up to four additional actions as diagonal swipes — swipe up-left, up-right, down-left, or down-right on the key for one of four extra actions. So one key can really be five.
Long-press any key to enter cheatsheet mode, which overlays all the swipe actions on every key at once. Useful when you've just configured a bunch and can't remember what swipes you set up.
Defining a custom keyboard
- Settings → Keyboard → Keyboards
- Tap + to start a new keyboard
- Give it a name (e.g. "TypeScript", "Python", "Default")
- Pick the keys for each of the 10 slots — drag to reorder; tap a slot to choose what it does
- For slots that bind to a snippet, the slot label uses the snippet's mnemonic (the one or two characters you set in the snippet definition — see Snippets → Mnemonics)
Hachicode ships with one or more starter keyboards out of the box. You can edit those, duplicate them as a base, or create new ones from scratch.
Mapping a keyboard to a file type
Once you have a keyboard, tell the app when to use it:
- Settings → Keyboard → File-type mappings
- Tap a file type row (TypeScript, Python, JSON, Markdown, etc.)
- Pick which custom keyboard to activate when this file type is open
You can map two keyboards per file type — a primary and a secondary. While editing a file, a small pill at the trailing edge of the accessory bar lets you swap between the two without leaving the editor. This is the main UX for "I have a keyboard with brackets and a separate one with snippets, let me toggle."
If a file type has no explicit mapping, the file uses whatever default the app ships with (or, more precisely, falls through to a generic fallback configured in the keyboard settings).
Switching keyboards while editing
The trailing-edge switcher pill on the accessory bar shows which of the two assigned keyboards is currently active. Tap to swap. Long-press to enter cheatsheet mode for whichever keyboard is active.
The active selection is per file — switching to keyboard B while editing foo.ts doesn't change what bar.ts defaults to. It also doesn't persist across app restart; the file opens with its primary keyboard each session.
Binding snippets to keyboard slots
Snippet bindings are the most powerful feature of the accessory bar. The mechanism:
- Settings → Snippets — define a snippet with
name,template(with${name}placeholders), and a 1–2 charactermnemonic. - Settings → Keyboard → Snippet bindings — bind that snippet to a slot (s0…s9). Each slot can carry a default snippet plus per-file-type overrides.
- Add the slot key to one of your custom keyboards.
- Tap the key — the snippet's template inserts at the cursor; placeholders become tab stops.
The same snippet can be bound to different slots on different keyboards, or to the same slot with different per-file-type overrides. This means "slot 3 is my for loop in TypeScript but my def skeleton in Python" — handled by per-file-type binding, not by maintaining two separate keyboards.
Common setups
- One keyboard per language. Each language gets its own custom keyboard tuned to its punctuation and snippets. File-type mappings switch automatically.
- Two keyboards per language: "syntax" + "snippets". Primary has the brackets, operators, and structural punctuation; secondary has snippet keys for the constructs you write most. Swap with the trailing pill while editing.
- One generic keyboard + per-file-type snippet overrides. One keyboard with snippet slot keys (s0…s9); the snippet bindings override per file type so the same slot does the right thing in each language.
The right answer depends on how many languages you work in and how much your snippet vocabulary differs across them.
See also
- Snippets — defining the snippets you'll bind to keys
- Editor basics — the hardware-keyboard story for context
