Kodi Community Forum

Full Version: How-To bind a key to a socket command?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i need to bind this simple command to a key on XBMC but i don't know how:

def send(cmdopen):
client = socket(AF_INET, SOCK_STREAM)
client.connect((my_ip, int(my_port)))

So I need that when i click a key (e.g. "s") it run "send (cmdopen)
How can I do?

p.s. all that variables can be fixed (i know all of them and never change)