WM Keyboard plugins
Plugins are small sandboxed Lua scripts that add tools to the keyboard.
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("👋") endendThat is a complete plugin, minus its plugin.json.
Start here
Section titled “Start here”Getting startedBuild a working cipher tool from an empty folder. Assumes you have never written Lua.
API referenceThe manifest, every widget, every event, every wm.* function, and every limit.
PermissionsThe one thing a plugin can ask for, and the many it cannot.
SecurityWhat the sandbox does, what it deliberately does not offer, and where its limits actually are.
What a plugin can do
Section titled “What a plugin can do”Compute things, and draw its own panel. That is genuinely the whole list.
What a plugin cannot do
Section titled “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.
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
Section titled “Trying the examples”The four 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. |
