In a related thread there has been given a quasi-code example, that is, supposedly, easy to fix:
registerMouseButton :: IO (Event MouseButton)
registerMouseButton = do
(addHandler, fire) <- newAddHandler
setMouseButtonCallback $ \button _ -> fire button
fromAddHandler addHandler
I could not fix it so far. Can somebody provide a snippet of a functional code that registers a key event?