Is it possible to make a keypress trigger in python? and if so, then what's the simplest approach to make it?
What I'm trying to accomplish is just to make a simple fake trigger, that by executing a function makes the system listen that I've pressed the key.
for example that in a code, that I have pressed the 'Page Up' Key. I am currently using Ubuntu 10.04 this is what I am looking for
#function for auto trigger key pressed
def autoPressedPageUp():
pressed.key("PageUp")
#if it recieved a message from a network
#it will call the function of trigger
if recievedMessage:
autoPressedPageUp()
is it possible?