Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't just merely need software to create a custom keyboard layout. I need software that dynamically redefines the meaning of certain keys, depending on previously pressed keys. I want to set rules like "the key b when preceded by the key a must produce letter c, otherwise b". So, for example, typing abracadabra must produce the string acracadacra (because after pressing the a key, the meaning of the key b gets redefined to produce the letter c), however typing bat or ebony must produce bat and ebony, respectively.

Is there software for this? Question for programmers: what is the most simple way to create such software? (I do know some programming) What tools would you use? Do I need to write a new keyboard driver, or can it be done by a scripting tool, like Autoit?

It starts to sound like a stackoverflow question :-)

share|improve this question

What you're trying to do... confuses and scares me, however I do believe it can be done by AutoHotKey (or AutoIt, if you're so inclined). There's variables, arrays (Sorta. %variable% expands BEFORE execution of the line, meaning array%i% type syntax can create almost-sorta arrays nearly), and conditional execution of code. It has inbuilt variables like A_PriorHotKey, which is the last hotkey pressed (and A_TimeSincePriorHotkey, if you want), as well.

It'd take a little work, but I'm pretty confident you could get it working.

share|improve this answer

Well, the easiest, if not the cleanest, way to do it is to use hotstrings in AutoHotKey:


and just keep going with that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.