Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
OCaml Graphics bug with Key_pressed and Poll #7194
Original bug ID: 7194
If you put wait_next_event[Key_pressed; Poll; ...] and press a key, this key will never be dequeued although it's specifically written in the documentation :
val wait_next_event : event list -> status
Wait until one of the events specified in the given event list occurs, and return the status of the mouse and keyboard at that time. If Poll is given in the event list, return immediately with the current status. Keypresses are queued, and dequeued one by one when the Key_pressed event is specified.
I attached a test file.