shine-0.1.0.0: Declarative graphics for the browser using GHCJS

Copyright(c) Francesco Gazzetta, 2016
LicenseMIT
Maintainerfrancygazz@gmail.com
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell98

Graphics.Shine.Input

Description

Datatypes representing inputs.

Synopsis

Documentation

data KeyState Source

The state of a button on the keyboard

Constructors

Down 
Up 

data Modifiers Source

The four key modifiers

Constructors

Modifiers 

data MouseBtn Source

The three mouse buttons

Constructors

BtnLeft 
BtnRight 
BtnMiddle 

data Input Source

Datatype representing all possible inputs

toMouseBtn :: Word -> Maybe MouseBtn Source

Convert a js mouse button identifier to the corresponding datatype

toKeyState :: Bool -> KeyState Source

Convert a bool (from js) to a keystate