code
FPLib FRP – new mouse and keyboard event sources and signals
On 16, Dec 2013 | No Comments | In code | By admin
Inspired by the signals provided by elm for mouse and keyboard interaction I’ve revised the corresponding event sources and signals in FPLib and updated them to be usable with ENDef.
Mouse:
- mouseClicksENInputES – EventSource – fires when mouse clicks come in
- mousePosENInput – FPSignal – tracks mouse position. Needs .acceptsMouseOver_(true) on the view.
- mouseIsDownENInput – FPSignal – tracks if mouse is down.
Examples:
Keyboard
- keyDownENInputES – EventSource – fires when keyboard keys are pressed
- keysDownENInput – FPSignal -tracks the currently pressed keys.
Examples:
Submit a Comment