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 :-)


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.


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


and just keep going with that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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