up vote 3 down vote favorite
share [g+] share [fb]

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

link|improve this question
feedback

2 Answers

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.

link|improve this answer
feedback

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

::ab::ac  
::ac::ab

and just keep going with that.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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