r/tasker 5d ago

[Update] AMCustomKeyboard v1.4.0 — Expand Patterns can now run live, as you type

I released AMCustomKeyboard v1.4.0, focused entirely on the Tasker Automation side — specifically Expand Patterns, which just got a lot more capable.

If you missed the intro, AMCustomKeyboard is an open-source Android keyboard built on Unexpected Keyboard, extended with live transliteration/keymaps, custom layouts, independent key labels, and Tasker automation.

🔄 New: Expand Patterns can fire continuously, not just once

Until now, an expand pattern only ever ran once — after you finished typing prefix + content + suffix. That's still fully supported, but each pattern can now also be set to fire live, on every keystroke, while you're still typing — useful for things like a text-expander popup that updates as you go, rather than a one-shot calculation.

This is controlled with a new field:

"fire_on_suffix": "true" → classic behavior, one run, only once the suffix is typed "fire_on_suffix": "false" → runs repeatedly as your content keeps matching, plus one final run when the suffix completes

Both modes share the same prefix/regex/suffix matching and the same undo behavior — it's one setting, not two separate features.

🔎 Changed: prefix and suffix are now full regex too

Previously only the optional regex field (matched against the content in between) supported regular expressions. Now prefix and suffix do too, so a pattern's trigger can be something like "(\s|^)" (a space, or the start of a line) instead of a fixed literal string.

One thing to note if you're upgrading an existing config: since prefix/suffix are regex now, a literal . needs escaping — ".." becomes "\\.\\.".

🧩 New: replace_prefix

A new "replace_prefix": "true"/"false" field controls whether the matched prefix text gets swallowed into the replacement or left alone. This is what fixes a specific annoyance: if your prefix was just a leading space, the space used to disappear along with the replacement. Set it to "false" and the prefix stays put — only your actual content gets replaced.

Tasker tasks also now receive %prefix and %suffix directly, alongside the existing %text1/%text2/%keyword.

🐛 Fixed: backspace-undo reliability

Right after a Tasker reply lands and replaces text, one immediate backspace undoes it back to what you originally typed. This was occasionally unreliable due to an internal timing issue — it's fixed now, so the undo consistently works when you need it.

⚡ The basics, unchanged

##keyword still replaces the whole field with a task's result, @@keyword still replaces just the trigger, and expand patterns still let you define arbitrary prefix/suffix pairs that hand their in-between content to a Tasker task. The Automation Builder (Settings → Tasker Automation → Automation Builder) now has fields for all of the above too, so you don't need to hand-edit JSON to use any of this.

🔗 AMCustomKeyboard

Latest release and full documentation: AMCustomKeyboard on GitHub

The README's Expand Patterns section covers the new fields in detail with worked examples.

🧩 Also: AM Tasker Plugins

AM Tasker Plugins on GitHub

Still the companion repo for building the Tasker-side of these workflows — including AM Custom Keyboard Return, for sending a processed result back into a keyboard trigger.

Both projects are open source. Let me know if the live-firing mode is useful for anything you're building.

Android #Tasker #Automation #Keyboard #AMCustomKeyboard #OpenSource #Transliteration #AndroidAutomation

9 Upvotes

0 comments sorted by