[openbox] Sending fake input events

Mikael Magnusson mangosoft at comhem.se
Fri Dec 22 20:32:08 EST 2006


On Fri, 22 Dec 2006, Kre?imir ?pes wrote:

> I'm using different keyboard shortcuts for copy\paste and since many
> apps have C-c & C-v hardcoded, I was thinking of faking input events.
>
> eg. when I press C-u, openbox or X catches it and translates to C-c.
>
> I have accomplished this by writing a small C program that uses the Xtst
> extension, but it's not performing too well;
>
> Is there a different (better) way to address this issue?
>
> Also, I'd like to use this oppertunity to ask if anyone knows how to
> send fake char events? I need to use some non ascii chars and I dont
> like switching between keyboard layouts to be able to use them;

You can use the ~/.XCompose file for this. (note both the X and the C is 
big). An example entry is
include "%L"     # this always goes on the first line
<Multi_key> <e> <u> <r> : "result string goes here"

--
Mikael Magnusson



More information about the openbox mailing list