Linux Infrared Remote Control (LIRC) is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls. The most important part of LIRC is the lircd daemon that will decode IR signals received by the device drivers and provide the information on a socket. It will also accept commands for IR signals to be sent if the hardware supports this. The second daemon program called lircmd will connect to lircd and translate the decoded IR signals to mouse movements. You can configure X to use your remote control as an input device.