Tuesday, April 08, 2008 at 3:42 PM
Most Mac models today ship with a six-button remote control and matching built-in infrared receiver. The remote control's primary purpose is to drive Apple's Front Row media application.
But maybe you'd like to use the remote for your own experiments. There are several software approaches to obtaining remote-button-press information. One of them is to communicate with Mac OS X's in-kernel infrared driver, which is implemented by the AppleIRController kernel extension. The I/O Kit layer in Mac OS X, which we would use for this kind of communication, is particularly powerful and flexible when it comes to allowing user-space access to hardware. So this approach is quite nice.
iremoted is a command-line program that uses I/O Kit interfaces to talk to the infrared driver and prints information about button presses and releases as they occur. I recently overhauled iremoted for Leopard, and the new version should work on both Tiger and Leopard. Moreover, the source for iremoted is now also available.
Enjoy talking to the remote control!