Overview of Lirc2Keys

Lirc2Keys is a windows application that listens to a WinLirc process and can send keystrokes in response. It also has the ability to launch applications based on your infrafred remote control button presses. While there are other applications that have the ability to do this as well, the goal of Lirc2Keys is to be simple: simple to run and install, and simple to configure.




  • Lirc2Keys depends on the .Net framework, which you can download from Microsoft at no charge.
  • WinLirc is needed to process the remote control button presses. Lirc2Keys generates keypresses by responding to WinLirc

To install Lirc2Keys, just run the installation file. Alternatively, as only the executable and a configuration file are needed, you can download the zip file package, and extract Lirc2Keys to any location you desire. See the next section for how to configure Lirc2Keys.


Lirc2Keys depends upon a configuration file to tell it what to do based on the signals it gets from WinLirc. By default, it looks for a file in the working directory called lirc2keys.cfg. You can change where it should look for the configuration file by specifying it as a command-line parameter:

lirc2keys.exe c:\temp\configFile.txt

The configuration file specifies what actions Lirc2Keys should take based on the response it gets from WinLirc, as wel as optionally specifying a server and port where WinLirc is located (thus you can run WinLirc on a different machine than the one you are controlling with Lirc2Keys).

The configuration file format is quite simple -- you should be able to easily edit the sample configuration file. For those interested in full details of the configuration file format:

Configuration Parameters:

  • Lines beginning with # are comments
  • To specify the server and port to connect to, use the line:
    SERVER: myserver.domainname.or.ipaddress:8765

    You can specify either an ip address or a domain name. If the server is specified, the port must be specified as well. If the server line doesn't appear in the config file, it will assume the WinLirc server is found at
  • The rest of the configuration file is a series of lines, where each line specifies first the remote button to match, then an action to take if that button is pressed. The format of the lines is:
    remotename buttonname repeatrate actiontype actiondetail

    Each item in the line is separated by whitespace (spaces or tabs).
    • remotename The name of the remote (from WinLirc's config) that you want to match. To match any remote, use *
    • buttonname The name of the button (from WinLirc's config) that you want to match.
    • repeatrate This determines how quickly the action should repeat if the remote button is held. To never repeat actions, use 0. 1 means the action will repeat with every time it gets the button signal from WinLirc. A number n higher than 1 means it will repeat once for each n times it receives the signal from WinLirc. Note that the repeat rate is dependant on how the physical remote control handles held button presses and how WinLirc processes them.
    • actiontype Must be "key" or "run" -- whether to send a keypress or run an application (In the future or by request, other actiontypes might be supported)
    • actiondetail The details of what action to do. For actiontype "key", tells the keypress(es) to send. For actiontype "run", the path to the executable should be specified.

Format for specifying keys to send

Lirc2Keys uses the same format for specifying keypresses as the SendKeys object in the .Net framework, with the exception that leading or trailing spaces should be specified as {space}. Note that quotes are not needed around the parameter. As Microsoft has a tendency to rearrange their website documentation without warning, a brief summary of the format is below:

Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, pass in the string "A" to the method. To represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, specify the parameter as "ABC".

The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses () have special meanings. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use "{+}". To specify brace characters, use "{{}" and "{}}". Brackets ([ ]) have no special meaning, but you must enclose them in braces.

To specify characters that aren't displayed when you press a key, such as ENTER or TAB, and keys that represent actions rather than characters, use codes as in the following table:














{ENTER}or ~











To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes.









To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".


For help/questions/bugs/feature requests/etc, check the sourceforge page, or send email to Nathan Tolbert (