Hello List,

I am trying to make the following quasi-code example work:

registerMouseButton :: IO (Event MouseButton)
registerMouseButton = do
(addHandler, fire) <- newAddHandler
setMouseButtonCallback $ \button _ -> fire button
fromAddHandler addHandler

According to http://stackoverflow.com/questions/8631816/reactive-banana-how-to-create-an-addhandler it looks like it should be something straightforward.  

Can somebody show an example of a functional code that registers a key or a mouse event?


Thanks,
Vladimir