When setting up my MythTV project, I had a couple options for remote control. Initially, I set up MythTV to use it’s internal lirc client. However, for emulators which didn’t support lirc directly and didn’t work with irxevent, I needed something else, and so I switched to using a combination of irexec and XMacro. This worked well enough, except now, on every key press, xmacro needed to be executed, which seemed kind of silly.

And hence this project. You can think of irxkeys as a simplified merger of xmacro and irexec. Given an lirc configuration file, irxkeys which send key presses to the X server using the XTest extension. The result is a nice, all-in-one solution for remotely controlling applications which don’t work with irxevent (such as SDL applications).

Downloads

irxkeys-1.0.tar.gz

Configuration

Configuration is dead simple. Key strings are the same as those used with the xmacro KeyStr event type, and so are standard X11 key strings. Below is an example:

begin
    prog = irxkeys
    button = up
    config = Up
    repeat = 2
end

begin
    prog = irxkeys
    button = down
    config = Down
    repeat = 2
end

begin
    prog = irxkeys
    button = left
    config = Left
end

begin
    prog = irxkeys
    button = right
    config = Right
end

begin
    prog = irxkeys
    button = pageup
    config = Page_Up
    repeat = 2
end

begin
    prog = irxkeys
    button = pagedown
    config = Page_Down
    repeat = 2
end

As you can see, it’s really incredibly straight forward (assuming you have lircd running and your lircd.conf is set up correctly).

Licensing

This thing is public domain. Do with it as you will (yes, I realize I should include a license in the source file :).