Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,594 Members 38,984 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][XPOSED] Macro / Text Expansion

Tip us?
 
mikmitch
Old
(Last edited by mikmitch; 12th September 2014 at 02:52 AM.) Reason: add notes for autohotkey import
#1  
Member - OP
Thanks Meter 110
Posts: 56
Join Date: Jul 2008
Location: Tallahassee
Default [MOD][XPOSED] Macro / Text Expansion

Automatically expand text sequences in any text box in (almost) all apps!

Featured on XDA-portal. Thanks to @Will Verduzco (willverduzco) for the article!

This is an Android Xposed module to perform Macro / Text expansion. The module allows short key sequences to be transformed into other, usually more time-consuming, sequences of keystrokes. This means that frequently used or repetitive sequences of keystrokes can easily be automated. Since it uses Xposed and operates at the text widget level, it works with all factory and third party keyboards, and can be added to user dictionaries for even faster use.

After creating my fun I am Groot module, I thought I'd do something more practical with run-time text processing using Xposed.

Screenshots





Requirements
Instructions
  • Download apk from Xposed Module Repository
  • Install module as a normal apk
  • Open Xposed Installer and click checkbox to enable
  • Reboot device to activate module

Download
v1.2 - Xposed Module Repository


Tips & Hints
It's best to set the macro phrase to a term that is not normally used in conversation, since all instances of this phrase will be replaced.
For example, using the macro 'address' to denote your home address would be a poor choice, since this would change a statement like 'enter your email address' into 'enter your email '123 xyz street'
A better choice is to add a symbol and set the alias to something like '@addr' to prevent inadvertent text expansion.
Changes to macro list require reboot to activate.


AutoHotKey import file notes
  • Import macro lines that match ::macro::expansion
  • Does not yet handle AutoHotKey wildcards/regular expressions
  • Lines containing non-ASCII characters are also ignored
  • Enable import/restore debug logging to troubleshoot missed macro issues
Any AutoHotKey text file should be importable without modification.
If the module is not able to handle the macro (yet) it will simply ignore the line.
The module does not have an upper limit on the number of macros that can be entered/imported, but performance will degrade on significantly large lists, especially on older devices.


Known Issues
FC issue with MultiAutoCompleteTextViews; temporarily disabled
Not yet working in web browsers & WebViews; work in progress
Macros should be functional with these browsers: Atlas, Dolphin, Now Browser Extended
Limited/no function with these browsers: AOSP, Chrome, Chrome Beta, Now Browser Pro
Support for these in progress


Disclaimer
I try my best to thoroughly test everything I publish, but given the staggering number of devices, ROMs, and apps I cannot make any guarantee that something will go wrong. Use at your own risk!


Source code
This module is open source software, available on my Github page, licensed under the Apache 2.0 license
If you are a developer and want to contribute, fork the repo and submit a pull request.


Credits
Problems/feedback
  • If you find this useful, click thanks!
  • If something is broken, let me know and I'll try my best to fix it!
  • If a feature is missing, suggest it and I'll try to add it!
The Following 48 Users Say Thank You to mikmitch For This Useful Post: [ Click to Expand ]
 
mikmitch
Old
(Last edited by mikmitch; 12th September 2014 at 02:41 AM.) Reason: update changelog
#2  
Member - OP
Thanks Meter 110
Posts: 56
Join Date: Jul 2008
Location: Tallahassee
Changelog

Version 1.2 (current)
  • Backup/export & restore/import macro list in AutoHotKey & JSON formats
  • Support for MultiAutoCompleteTextView boxes
  • Option to disable macro expansion in password boxes
  • Option to make macro expansion case insensitive
  • In-app about/support/donation links

Version 1.1
  • Removed the regular expression restriction from macros
  • Update minimum SDK for ICS support (API Level: 14 and up)

Version 1.0
  • Initial release
 
chavocarlos
Old
#3  
chavocarlos's Avatar
Senior Member
Thanks Meter 100
Posts: 382
Join Date: Mar 2011
Location: Guayaquil
Mmmm good work, but I will pass, I prefer to fight with my lazyness instead to save sensible data in the phone or third app with root access. Anyways good work dude!.
Device: Nexus 4 + Stock 4.4 ROM + Semaphore + Moto X Qualcomm optimizations = Great performance
Feat.: LMT + Xposed Framework + AppSettings + GravityBox = Awesome look and feel!
 
-V-O-Y-A-G-E-R-
Old
#4  
-V-O-Y-A-G-E-R-'s Avatar
Senior Member
Thanks Meter 41
Posts: 200
Join Date: Jun 2006
Location: \dev\null -yu
I was sooo happy when I saw this module tonight, but soon realized that it's not really usable for me. Just because those chars that are forbidden because reg exp.

I use similar app on OS X and BlackBerry has it natively. I replace m@ with my email and a number of Skype smiles (cch becomes (chuckle)), but because of those limitations, none of the above examples cannot be actually used.

Could you please explain more in detail what exactly seems to be the problem with those banned chars? Could there be an option to switch them if user needs them?
www.mariotomic.com .:. my photography gallery
 
mikmitch
Old
#5  
Member - OP
Thanks Meter 110
Posts: 56
Join Date: Jul 2008
Location: Tallahassee
Quote:
Originally Posted by -V-O-Y-A-G-E-R- View Post
I was sooo happy when I saw this module tonight, but soon realized that it's not really usable for me. Just because those chars that are forbidden because reg exp.
Thanks for the feedback. I've been able to correct the issue and have removed the regular expression restriction. The updated module has been pushed to the Xposed Module Repository. Let me know if you have any more issues!
The Following 2 Users Say Thank You to mikmitch For This Useful Post: [ Click to Expand ]
 
DrRuckingFetard
Old
#6  
DrRuckingFetard's Avatar
Member
Thanks Meter 10
Posts: 86
Join Date: Sep 2013
Location: Sydney
I was looking for a way to get the look of disapproval --> ಠ_ಠ into a keyboard emoticon list but now with this mod i can insert it via a macro shortcut.. probably not really the purpose of the module but until I can think of something more productive to add in there it's just for that haha

good work!
Nexus 7 2013 (Flo)- PAC ROM 4.4.4, ElementalX kernel
Nexus 5- PAC 4.4.4
HTC One X (endeavoru)- CM 11 (retired)
Sony Tablet S (retired)- stock 4.1.2

The Following User Says Thank You to DrRuckingFetard For This Useful Post: [ Click to Expand ]
 
is0l4ted
Old
#7  
Senior Member
Thanks Meter 115
Posts: 280
Join Date: Jul 2012
Nice module and thamxxx for sharing but whatsapp+ is crashing. ☺


 
undaclazz
Old
#8  
undaclazz's Avatar
Senior Member
Thanks Meter 52
Posts: 162
Join Date: Oct 2011
Location: Yogyakarta
Nice, Now I can make shortcut on Swiftkey... but it requires reboot everytime I add new shortcut? Would be nice if we can add on the fly ...
 
mikmitch
Old
#9  
Member - OP
Thanks Meter 110
Posts: 56
Join Date: Jul 2008
Location: Tallahassee
Quote:
Originally Posted by is0l4ted View Post
Nice module and thamxxx for sharing but whatsapp+ is crashing. ☺
Can you PM me your Xposed logs so I can get this issue fixed?
The Following User Says Thank You to mikmitch For This Useful Post: [ Click to Expand ]
 
mikmitch
Old
#10  
Member - OP
Thanks Meter 110
Posts: 56
Join Date: Jul 2008
Location: Tallahassee
Quote:
Originally Posted by undaclazz View Post
Nice, Now I can make shortcut on Swiftkey... but it requires reboot everytime I add new shortcut? Would be nice if we can add on the fly ...
Thanks for the feedback. I'll see if I can remove the reboot requirement!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes