Using an Arduino, your Mac can receive IR remote signals. Using any TV or stereo remote, you can send those signals. And with your Mac, you can respond to those signals however you like. Press keyboard buttons, run scripts, do anything to can do in Terminal.
The Fritzing file can be found in the Gothub repo