Skip to content

WM Keyboard plugins

github-actions[bot] edited this page Sep 15, 2026 · 5 revisions

A plugin is a small Lua script that adds a tool to the keyboard. It draws a panel (some text, a few buttons, maybe a text box) and does whatever you write it to do.

function render()
  return ui.column {
    ui.label { text = "Hello!", style = "title" },
    ui.button { id = "wave", text = "Wave back" },
  }
end

function on_event(e)
  if e.id == "wave" then wm.log("👋") end
end

That is a complete plugin, minus its plugin.json.

You can also write one on the phone. Tools / Plugins / Write a plugin opens an in-app editor with a live preview and starter templates, and its Install button installs the result directly, with no ZIP file.

Start here

  • Getting started Build a working cipher tool from an empty folder. Assumes you have never written Lua.
  • API reference The manifest, every widget, every event, every wm.* function, and every limit.
  • Permissions The one thing a plugin can ask for, and the many it cannot.
  • Security What the sandbox does, what it leaves out on purpose, and where the limits really are.

What a plugin can do

Compute things, and draw its own panel. That is genuinely the whole list.

What a plugin cannot do

  • See what you type. There is no key event API. A plugin cannot observe, change or delay a single keystroke going to your app.
  • Read the text you are writing in. No API returns the contents of the field.
  • Read your clipboard. No API.
  • Use the internet. No HTTP, no sockets, no URLs.
  • Reach Android. No files, no reflection, no other apps, no device information, no permissions of its own.
  • Run in the background. A plugin only runs while its panel is open.
These are absences, not settings

No version of a plugin gets around them. The sandbox has no function for any of it. See Security for how that is enforced, and what the residual risks honestly are.

Text still gets into a plugin: you type into its box, or tap Paste on it. Results come back out when you tap Insert under a result. Both directions are a deliberate tap, on a control the keyboard drew.

Trying the examples

The five demo plugins in the addon repository are meant to be read:

Plugin Shows
Cipher Tool Tabs, inputs, buttons, insertable output. The getting-started build.
UI Kitchen Sink Every widget and every event, with a live event log.
Todo List wm.storage. The one capability a plugin can ask for.
Text Tools The paste-in, transform, insert-out flow.
Math Mode A real text engine: a tokenizer, symbol tables, a live result on every keystroke, and options kept in wm.storage.
Enabling plugins

Plugins are off until you ask for them. Turn them on here, with Allow plugins. Then install one from the Addons screen, or open a .wmplugin file:

Tools / Plugins / Manage plugins

Clone this wiki locally