Remote Controls
From Performous
Performous doesn't include built-in support for infrared remote controls, but this can be achieved using external tools.
Linux
Irxevent
Irxevent program is part of the lirc-x package and it converts lirc input to X window events. It is invoked with a customised configuration file to map the remote keys to X window events which are sent to performous. With the remote, you can navigate through the menus and songs.
Configuration file for MCE remote control follows (name it performous_ir.conf):
# Walking the menu up, down and enter begin prog = irxevent button = Up config = Key Up CurrentWindow end begin prog = irxevent button = Down config = Key Down CurrentWindow end begin prog = irxevent button = OK config = Key Return CurrentWindow end # Playing the game left/right begin prog = irxevent button = Left config = Key Left CurrentWindow end begin prog = irxevent button = Right config = Key Right CurrentWindow end begin prog = irxevent button = Red config = Key S CurrentWindow end begin prog = irxevent button = Green config = Key P CurrentWindow end begin prog = irxevent button = Yellow config = Key C CurrentWindow end begin prog = irxevent button = Blue config = Key Q CurrentWindow end begin prog = irxevent button = Pause config = Key space CurrentWindow end begin prog = irxevent button = ChanUp config = Key Page_Up CurrentWindow end begin prog = irxevent button = ChanDown config = Key Page_Down CurrentWindow end begin prog = irxevent button = Home config = Key F9 CurrentWindow end begin prog = irxevent button = Radio config = Key F4 CurrentWindow end begin prog = irxevent button = VolDown config = Key F2 CurrentWindow end begin prog = irxevent button = VolUp config = Key F3 CurrentWindow end begin prog = irxevent button = Enter config = Key Tab CurrentWindow end begin prog = irxevent button = Stop config = Key Escape CurrentWindow end # Exiting the game/menu begin prog = irxevent button = Back config = Key Escape CurrentWindow end begin prog = irxevent button = Power config = Key Escape CurrentWindow end
Here's the same config file for Hauppage Nova remote control:
# Walking the menu up, down and enter begin prog = irxevent button = ArrowUp config = Key Up CurrentWindow end begin prog = irxevent button = ArrowDown config = Key Down CurrentWindow end begin prog = irxevent button = OK config = Key Return CurrentWindow end # Playing the game left/right begin prog = irxevent button = ArrowLeft config = Key Left CurrentWindow end begin prog = irxevent button = ArrowRight config = Key Right CurrentWindow end begin prog = irxevent button = Red config = Key S CurrentWindow end begin prog = irxevent button = Green config = Key P CurrentWindow end begin prog = irxevent button = Yellow config = Key C CurrentWindow end begin prog = irxevent button = Blue config = Key Q CurrentWindow end begin prog = irxevent button = Pause config = Key Space CurrentWindow end begin prog = irxevent button = ChannelUp config = Key Page_Up CurrentWindow end begin prog = irxevent button = ChannelDown config = Key Page_Down CurrentWindow end begin prog = irxevent button = Menu config = Key F9 CurrentWindow end begin prog = irxevent button = Radio config = Key F4 CurrentWindow end begin prog = irxevent button = VolumeDown config = Key F2 CurrentWindow end begin prog = irxevent button = VolumeUp config = Key F3 CurrentWindow end begin prog = irxevent button = PrevCh config = Key Tab CurrentWindow end # Exiting the game/menu begin prog = irxevent button = BackExit config = Key Escape CurrentWindow end
Following script is used to start the irxevent with correct config file. Name it startgame and place it in your $PATH, next to the actual irxevent configuration file. (The script assumes /usr/games but you can edit it for other locations, such as /usr/local/bin).
#!/bin/sh # Files startgame and performous_ir.conf added in /usr/games for remote control support in performous cd /usr/games # Start the game and get the PID GAME_BIN=$1 $GAME_BIN & GAME_PID=$! # Start the irxevent and get the PID irxevent "$GAME_BIN"_ir.conf & IRXEVENT_PID=$! # Wait for game to exit then kill irxevent wait $GAME_PID kill $IRXEVENT_PID
Now to start Performous with IR remote control support, run: startgame performous
