I have two images open in a full-screen mode on my Raspberry Pi (using ristretto image viewer). When certain conditions are met, I need to pass an ALT+TAB keystroke combination to display the other one. I am trying to use Popen.communicate, but I don't know how to pass a key combination like ALT+TAB). Does anyone have any ideas?
What I need is something like below (replacing "ALT+TAB" with a working code):
s = Popen(['ristretto', '-f', 'my.gif' ,'&'],stdin=PIPE)
if my_condition:
s.communicate("ALT+TAB")
I heard about SendKeys package, but it works only for Windows...
Thanks, Michal