I am using:-
key=cv2.waitKey(1) #& 0xFF
if key== ord('q'):
....................
but I need the input from user to be ctrl+q
Thanks
CTRL+Q is encoded as 17 in ASCII control key table. Below is a sample code.
cv2.imshow('frame', frame)
key = cv2.waitKey(1)
if key == 17: # Ctrl+Q or ^Q
break
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With