I am writing a simple game in Ocaml using my module Graphicsfor drawing and interacting. I ran into a problem that Graphics.read_key()stops all keystrokes for later use, so when I hold the key for a while, many “keystrokes” are put into memory. After release, the action is still in progress.
Is there a way to remove entries from this queue or just (even better) not to queue them?
mechu source
share