Tuesday, July 14, 2009

Autokey, keyboard macros for linux

Finally a keyboard macro/text replacement tool for linux! After quitting Windows several years ago, I have been looking for a replacement for the "shortkeys" program for automatic text subsitution/macros. KDE 3.5 provided macro-like substitutions within the keyboard shortcuts, however these were removed in KDE 4.0. After considering writing one myself and briefly looking at the X11 protocols for hooking the keyboard events, I decided against this. More recently a Lifehacker post pointed me to Autokey... a relatively new and very neat Python utility that sits in the system tray providing keyboard text subsitution/macros.

Autokey Homepage
Autokey Wiki FAQ
Autokey Wiki Manual
Ubuntu announcement

To install on Ubunty jaunty:
sudo bash
echo "deb http://ppa.launchpad.net/cdekter/ppa/ubuntu jaunty main" > /etc/apt/sources.list.d/autokey.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E3C0CE5
aptitude update
aptitude install autokey

Run "autokey" to load into the system tray. Right click on the icon in the system tray and choose "configure". Read the manual for examples.

As I am a touch-typer, I use simple but uncommon text strings as trigger words. Examples of the macros I use:
  • ,em → "[email protected]" enters my email address
  • ,ds → "2009-07-21" ISO date stamp
  • ,dts → "2009-07-14 23:54:04" full ISO date/time stamp

No comments:

Post a Comment