See /usr/X11R6/share/examples/keylaunch/keylaunch.rc for a sample configuration.