CShadowRun released a G15 Super macro program Which you can use for customising your G-keys.

For sending it to the inactive Windows, Keyclone is your best solultion.