Get a utility that has a shutdown command, like Sysinternals Process Explorer. Figure out the keystrokes to execute what you want, e.g. alt-f-h-s-y to shutdown. Set up a gesture with the keys - send keystrokes command and put the sequence in ([ALT_DOWN][ALT_UP]FHSY I think).