Skip to content
WM KeyboardWM Keyboard
Accessibility

Permissions

What a plugin can declare, which permissions apply on install, and which stay off until the user grants them.

A plugin lists what it needs in its manifest:

plugin.json (excerpt)
"permissions": ["storage", "network", "field.write"],
"hosts": ["api.open-meteo.com"]

Most plugins declare [] and need nothing. Every declared permission is shown to the user before they install, on the addon page and in the file-import confirmation.

Permissions come in three kinds:

KindWhat happens
ListedApplies as soon as the plugin is installed. Shown in the list before install.
RiskyShown before install in a separate, warned block. Off until the user turns it on on the plugin’s page, after reading a warning, and only while WM Keyboard  Tools  Plugins  Allow risky permissions is on.
Not availableThings no permission grants, listed below.

Plugins written for API 4 can declare only storage, reminders and selection. Everything else needs "apiVersion": 5.

Gives you storage, and secrets for API keys.

  • Local to the device and to your plugin. No other plugin can read it.
  • Deleted when the user uninstalls you, and clearable by them any time from WM Keyboard  Tools  Plugins  Manage plugins  your plugin. An update leaves it alone.
  • API 4: 128 keys, 64 characters per key, 8 KB per value, 64 KB in total. API 5: 512 keys, 64 KB per value, 1 MB in total.
  • Values in secrets are kept in a file of their own in the keyboard’s private storage, which other apps cannot read. They never appear in the storage inspector or a backup. They are not encrypted on the phone.

Ask the app to show a line of text in a notification at a time you set.

from wm import reminders
reminders.set("item:7", time.time() + 3600, "Buy milk")
  • The app shows it, not your script. No plugin code runs in the background, and none runs when it fires.
  • The title is always your plugin’s name, so a reminder cannot pretend to come from the system or another app.
  • 64 pending, 200 characters of text, up to ten years ahead.

Adds buttons to the bar over selected text, listed under actions in the manifest. Your script sees the selection only when the user tapped one of your buttons on it, never on a password field. See Selection actions.

Type, replace the selection, delete, move the cursor and press the field’s action key, through field. The user sees every change happen. Refused in password fields and incognito.

Copy text with clipboard.set.

Motion, light, pressure and step readings while your panel is open.

Open the keyboard’s own QR and text scanners. You get the result, never the camera.

Vibrate, turn on the flashlight, read text aloud, and read the battery level.

Hand text to another app or open a link. The keyboard shows what is shared, and where, before it goes. A link opened with ask=False skips that step and goes straight to the app the phone uses for it, so the keyboard allows it only while the plugin answers a tap or a hold of the user’s own in its panel.

Show a notification, titled with your plugin’s name.

Set an alarm or start a timer in the keyboard’s own Clock. The keyboard says so on screen each time, naming your plugin, and the alarm or timer is the user’s from then on. Your plugin never sees the user’s alarms.

Show files in the keyboard’s file manager. Your plugin reads the one file the user opens with it, and draws it. It never sees the file’s path, its folder or any other file, and each call starts from nothing. Needed exactly when the manifest lists previews. Showing files explains how.

Each of these is off after install. The user turns it on, one plugin at a time, on the plugin’s page in WM Keyboard  Tools  Plugins  Manage plugins  your plugin, after a warning that says what it allows. A call before that raises PermissionError, and the keyboard asks over your panel, the way Android asks for an app’s permission: your plugin’s icon and name, each permission it needs with its warning, and Allow or Don’t allow. The panel can’t be used until the user answers. Allow turns the permission on for your plugin (and the risky-permissions switch, when it was off, which the dialog says), and your plugin’s next call goes through; nothing is retried for you. The same switches stay on the plugin’s page, where the user can turn them off again.

PermissionGives youWarning the user reads
networkhttp: https requests to the hosts in hostsData you give the plugin can go to those websites, which see your IP address.
network.localWith network: the server the user typed into a host setting may be on the local network, over http or https. MoreThe plugin can connect to the server you type into its settings on your local network, and use plain http there, where anyone else on that network can read what is sent, including passwords and tokens.
aiai: the AI model the user set upText goes to that model, online or on the phone.
field.readfield.selection(), field.text_before(), field.text_after(), field.info()The plugin can read what you are writing, each time you tap something in its panel.
clipboard.readclipboard.get()The plugin can read what you copied, each time you tap something in its panel.
locationlocation.get()The plugin can find out where your phone is while its panel is open.
filesfiles.pick(), files.photo(), files.save()The plugin can read every file you pick for it, and every photo you take for it.
calendarcalendar: events(), calendars(), add()The plugin can read the events in your phone’s calendars while its panel is open, and add new events to them.
todotodo: the keyboard’s To-do listThe plugin can read every task in the keyboard’s To-do list, and add, tick, change and delete tasks.

Rules that hold whatever was granted:

  • Reads need the user’s hand. field.* reads and clipboard.get work only while your plugin handles something the user did in its panel: a tap, a change, a submit, a key, a header button, a keyword chip. A timer, a network answer or on_open cannot call them, so a plugin cannot poll the field.
  • Never protected text. Password fields, incognito, and clips marked private are refused.
  • Network rules. https only, to a host your manifest lists (exactly, or under a *. entry) or one the user typed into a host setting. No IP addresses or localhost, except a server on the local network that the user typed in, with network.local. Every redirect is checked again. Replies up to 1 MB, 15 seconds at most, 60 requests a minute. Nothing is sent while Data saver is on, and every request appears in the keyboard’s Network activity under your plugin’s name.
  • Only while open. Timers, sensors and streams stop when your panel or floating box closes. In the floating box a plugin keeps running over the app with the keyboard closed, until the user closes the box; its text boxes never type there, because tapping one moves the plugin into the keyboard.

When a plugin can read something of the user’s and send data away (for example field.read with network), the install screen says so in plain words: “This plugin can read text or files you give it and send them to api.example.com.”

An update that adds a risky permission, or a host, leaves it off, and the plugin’s page says what is new.

Required with network, unless a host setting lets the user type their own server:

plugin.json (excerpt)
"hosts": ["api.open-meteo.com", "*.openfoodfacts.org"]

At most 16. Host names only: no scheme, port or path.

The user can type a whole address into a host setting, such as https://money.example.com:8443/firefly. Only the host joins your list; your script reads the setting and builds its own addresses from it.

Self-hosted services often live at http://192.168.1.20:8080 or http://nas:9283, with no https and no public name. network.local lets a plugin reach such a server, under three conditions:

  • The plugin also has network and a host setting.
  • The server is the one the user typed into that setting. A plugin can never reach a local address its manifest names, or one the user did not type.
  • The user turned network.local on, after its own warning.

A local address is an IPv4 address in 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 (Tailscale and other carrier-grade NAT) or 169.254.0.0/16; a one-word name such as nas; or a name ending in .local, .lan, .home, .home.arpa, .internal or .localdomain. Requests there may use http or https. localhost, 127.0.0.1 and every public IP address stay refused, with or without the grant, and plain http to anywhere else is still refused.

Without the grant, a request to the typed server raises PermissionError and the keyboard asks for it over the panel, as for any risky permission.

What the user typesNo key event API.
Text outside your own boxes, without the user actingField reads only happen inside a user’s action in your panel.
Password fields and incognito textRefused in every build.
Background workNothing of yours runs while none of your panels is open. A reminder is text the app shows.
Downloaded codeNo eval, exec or compile, and import reaches your own files and the bundled library only.
Android itselfOnly the named host calls. No Intents, no file paths, no reflection.
Your own lookEvery widget is drawn by the keyboard in its theme; colours are roles like danger, never values.

You often do not need field.read at all.

In: draw an input. The user types into it, or taps Paste beside it. They can see exactly what they gave you.

Out: draw an output. The keyboard puts an Insert button under it.

Both at once: a selection action. The user selects text and taps your button, and what you return replaces it.

Security covers how all of this is enforced.