Skip to content
WM KeyboardWM Keyboard
Accessibility

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.

main.lua
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.

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

  • 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.

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

PluginShows
Cipher ToolTabs, inputs, buttons, insertable output. The getting-started build.
UI Kitchen SinkEvery widget and every event, with a live event log.
Todo Listwm.storage — the one capability a plugin can ask for.
Text ToolsThe paste-in, transform, insert-out flow.