Fehérke's GitHub Site == glue between Fehérke's GitHub hosted projects

Key Compose

All started with Alex Benenson’s great extension for Firefox, Transliterator. With that writing letters with diacritical marks became fast and easy.

When I met AutoHotkey, my first question was, could I write something similar to Transliterator, but not limited to the browser ? Well, I think yes.

Screenshot

screenshot right after changing the mode

Usage

Once started, KeyCompose just sits in the system tray and waits. Then when you type a key sequence for which a replacement was set, it does its job.

There can be more modes defined and you can change between them :

Action Change
Alt-Ctrl-F2 next mode
Alt-Ctrl-Shift-F2 previous mode
double-click on the tray icon next mode
click on a mode name in the context menu that mode

To cancel a replacement, press Shift-Shift before finishing the triggering sequence. ( I mean, press both Shift keys simultaneously. )

Context menu

menu

screenshot of the context menu

In the top part of the context menu there are enumerated the currently defined modes. ( The one with the checkmark is the active one, the one in bold is the mode to which you can change by double-clicking the tray icon. )

The other command, below the list of modes :

Configuration

Sadly the hotstring definition in AutoHotkey accepts only barewords, no variables. So the configuration must be an AutoHotkey script itself.

Anyway, I tried to reduce its format to the minimum, so the configuration not requires programmer skills. Things to keep in mind :

And some explanations on the syntax elements :

file fragment - KeyCompose-conf.ahk

; Key Compose   version 0.2   february 2013   written by Fehérke
; key compose functionality and more
; configuration file

#If compose==0 ; None

#If compose>=1 ; Diacritical
  ::a'::á ; a with acute
  ::a`::à ; a with grave
  ::a^::â ; a with circumflex
  ::a;::ä ; a with diaeresis
  ::a~::ã ; a with tilde
  ::ae::æ ; ae

The configuration file is also read by KeyCompose to display the definitions in the Show key compose. So better do not add more complex expressions, even if you know AutoHotkey.

With the configuration shipped with the script there are some particularities :

Versions

Plans

Download

You can find the related files on GitHub in my AutoHotkey-script repository’s key-compose directory :