com.harryaskham.omni · Swift · iPhone · iPad · Apple Watch · Mac

Omni

A keyboard that reads the same XML layout files as Omni on Android, so one layout serves both phones. It is a clean reimplementation in Swift from the file format and observed behaviour, not a port of the Android code.

  • swipe eight characters per key
  • chord ctrl,a,g as one key
  • TERM escape sequences for SSH
The Omni app on an iPhone with its setup steps and a QWERTY Omni keyboard showing small corner characters on its keys.
US QWERTY on an iPhone.
Omni on an Apple Watch: a compact QWERTY keyboard under a text field.
On the Watch.

One layout, every keyboard

Each key holds a main character and up to eight more, one for each direction you can swipe from it; the small characters printed in a key's corners show where they are. Widths and leading gaps are measured in key units, as in the Android format, so a layout written for a phone renders the same way here.

A key can play a comma-separated chord such as tmux's ctrl,a,g as a sequence. A tapped modifier applies to the next key and a held one locks, and Control, Alt and Meta turn into the control characters and escape prefixes a terminal expects. In terminal mode the arrows and editing keys send ANSI escape sequences, which is what SSH apps such as Blink read.

Omni's Code QWERTY Compact layout on an iPhone with the TERM toggle on; the test field shows the escape sequence for Control-Right.
Code QWERTY Compact in terminal mode: Control-Right typed [1;5C.
One engine, four targets OmniCore, the shared engine. It parses the XML layout format, lays keys out by key units, resolves swipes in eight directions, plays comma-separated chords, latches modifiers and turns them into control characters or escape sequences, and plans cast commands. The same Swift files compile into the iPhone keyboard, the watch app, the Mac receiver and a test suite that runs on the Mac without a simulator. layout XMLshared with Android OmniCoreparse · lay out · swipechords · modifiers · cast iPhone & iPad keyboard Watch app Mac receiver tests on the Macno simulator

Typing from somewhere else

Omni can be typed into from another machine. A command-line tool sends small commands, one JSON object per line, and whichever Omni is listening types them: the iPhone keyboard into the field it is focused on, the Watch into its own field, the Mac receiver into the frontmost app. The Android keyboard reads the same wire.

Typing on a device from somewhere else Omni's keystroke casting. A command-line tool sends small semantic commands, one JSON object per line: text to insert, a named key such as backspace or enter, a chord such as ctrl,a,g, a scroll, the clipboard or a layout change. On iPhone it reaches the Omni app, which hands it to the keyboard extension through their shared app group; the keyboard types it into whatever field it is focused on. The watch app and the Mac receiver accept the same commands, and the Android keyboard uses the same wire. omni-cliNDJSON commands Omni app (iPhone)network listener Omni keyboardtypes into the field Omni on the watchits own keyboard Omni on the Macmenu-bar receiver focused field app group
{"v":1,"type":"text","text":"hello"}
{"v":1,"type":"key","key":"backspace"}
{"v":1,"type":"combo","combo":"ctrl,a,g"}

An iOS system keyboard cannot float, snap or resize the way the Android one does, and casting needs the keyboard's Full Access setting.

Where it runs

DeviceWhat Omni is there
iPhone, iPadA system keyboard, chosen from the globe key, with an app for layouts and settings
Apple WatchA keyboard inside the Omni watch app, with its own layout picker
MacA menu-bar app that receives cast typing
Command lineSends casts to any of them
The Omni watch app's layout picker listing Code QWERTY, Code QWERTY Compact (selected) and a third compact layout.
Picking a layout on the Watch.

The engine's test suite runs on the Mac without a simulator. Signed builds reach testers through TestFlight.