I would like some sort of blockade that waits until a certain hotkey is pressed. I would be happy with something like input('Press Enter to continue') except for the fact that that would require my screen be on the terminal page, I would like this to pick up my keys while im focused on another window.
Luis Jose's solution from here seemed like it might work adn its good that im already using opencv for smoethign else so its imported: How to kill a while loop with a keystroke? However running the code does nothing for me and it doesn't pick up the fact that i pressed 'a' and just stays int he loop forever.
import cv2
while (1):
k=0xFF & cv2.waitKey(1)
if k == ord('a'):
break