I'd like to write a program to remap user input for stuff like changing keyboard layouts, but also more complex things like making a shorthand program (i.e. "t qk fx jmps ovr t lzy dg" outputs as "the quick fox jumps over the lazy dog"). I'd prefer to do this at the X level or below.
Can I make some kind of virtual keyboard based on actual user output? Ideally I'd like some kind of simple interface (i.e. standard input to the program is a series of real user input events, output is the user input events for the virtual keyboard), but if that's not possible I'd still be interested in pointers to how this can be done. I don't know anything about Linux hardware devices, low-level X stuff, or the kernel right now; in fact I'm fairly new to Linux. Links to "Basics" tutorials would not be unappreciated.