I am using cv2.waitKey(1) & 0xFF to capture key events, but I found that it cannot correctly detect the Delete key. My current code is as follows: import cv2 while True: key = cv2.waitKey(1) if key != -1: # -1 : timeout/no key event print(f"Key pressed: {key}") if key == 127: print("Delete key detected!") break cv2.destroyAllWindows() However, when I run this code and press the Delete key, it is not detected. Environment: Windows 10, Python 3.9, OpenCV 4.5.5 Issue: key == 127 does not work Expected Behavior: When I press Delete, it should print Delete key detected. Questions: Can cv2.waitKey(1) correctly detect the Delete key? Is there a more accurate way to detect the Delete key? Continue reading...