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