Well, you'd first need some hardware - a remote, and a device
that receives the signals from the remote. Then you need a
driver so that you can communicate with the device, to see
which signal(s) the remote sent. Then you would need some XS
code to interface with the driver.
Abigail