keyboard - application to fake keybord strike (for slides' scroll) with python? -
i computer science student , working, electronic engineer on gloves recognize hand's motions (vertical, horizontal ones).
to present project, thought making little application control power point slides. concept simple: when move 1 hand left, slides passes next one, , when move right, goes previous one.
to that, thought simulating keyboard right , left arrows (that's use change slides).
the question is: possible that? or think there better idea?
thank reading
i found script wanted.
it based on linux command line generates fake inputs xte (use sudo apt-get install xte
in debian based distribution download it.
i'm using system call in python job.
in example, generating 2 right arrow strikes each 2 seconds. can test positioning cursor in text document, launch script, , watch cursor move.
from subprocess import popen, pipe import time def keypress(sequence): p = popen(['xte'], stdin=pipe) p.communicate(input=sequence) time.sleep(2) keypress("key right ") time.sleep(2) keypress("key right ") time.sleep(2) keypress("key right ") time.sleep(2) keypress("key right ")
Comments
Post a Comment