helm-1.0.0: A functionally reactive game engine.

Safe HaskellNone
LanguageHaskell2010

Helm.Keyboard

Contents

Description

Contains subscriptions to events from the keyboard.

Synopsis

Types

data Key Source

Represents a key that can be pressed on the keyboard.

Constructors

ReturnKey 
EscapeKey 
BackspaceKey 
TabKey 
SpaceKey 
ExclaimKey 
QuoteDblKey 
HashKey 
PercentKey 
DollarKey 
AmpersandKey 
QuoteKey 
LeftParenKey 
RightParenKey 
AsteriskKey 
PlusKey 
CommaKey 
MinusKey 
PeriodKey 
SlashKey 
Number0Key 
Number1Key 
Number2Key 
Number3Key 
Number4Key 
Number5Key 
Number6Key 
Number7Key 
Number8Key 
Number9Key 
ColonKey 
SemicolonKey 
LessKey 
EqualsKey 
GreaterKey 
QuestionKey 
AtKey 
LeftBracketKey 
BackslashKey 
RightBracketKey 
CaretKey 
UnderscoreKey 
BackquoteKey 
AKey 
BKey 
CKey 
DKey 
EKey 
FKey 
GKey 
HKey 
IKey 
JKey 
KKey 
LKey 
MKey 
NKey 
OKey 
PKey 
QKey 
RKey 
SKey 
TKey 
UKey 
VKey 
WKey 
XKey 
YKey 
ZKey 
CapsLockKey 
F1Key 
F2Key 
F3Key 
F4Key 
F5Key 
F6Key 
F7Key 
F8Key 
F9Key 
F10Key 
F11Key 
F12Key 
PrintScreenKey 
ScrollLockKey 
PauseKey 
InsertKey 
HomeKey 
PageUpKey 
DeleteKey 
EndKey 
PageDownKey 
RightKey 
LeftKey 
DownKey 
UpKey 
NumLockClearKey 
KeypadDivideKey 
KeypadMultiplyKey 
KeypadMinusKey 
KeypadPlusKey 
KeypadEnterKey 
KeypadNumber1Key 
KeypadNumber2Key 
KeypadNumber3Key 
KeypadNumber4Key 
KeypadNumber5Key 
KeypadNumber6Key 
KeypadNumber7Key 
KeypadNumber8Key 
KeypadNumber9Key 
KeypadNumber0Key 
KeypadPeriodKey 
ApplicationKey 
PowerKey 
KeypadEqualsKey 
F13Key 
F14Key 
F15Key 
F16Key 
F17Key 
F18Key 
F19Key 
F20Key 
F21Key 
F22Key 
F23Key 
F24Key 
ExecuteKey 
HelpKey 
MenuKey 
SelectKey 
StopKey 
AgainKey 
UndoKey 
CutKey 
CopyKey 
PasteKey 
FindKey 
MuteKey 
VolumeUpKey 
VolumeDownKey 
KeypadCommaKey 
KeypadEqualsAS400Key 
AltEraseKey 
SysReqKey 
CancelKey 
ClearKey 
PriorKey 
Return2Key 
SeparatorKey 
OutKey 
OperKey 
ClearAgainKey 
CrSelKey 
ExSelKey 
Keypad00Key 
Keypad000Key 
ThousandsSeparatorKey 
DecimalSeparatorKey 
CurrencyUnitKey 
CurrencySubunitKey 
KeypadLeftParenKey 
KeypadRightParenKey 
KeypadLeftBraceKey 
KeypadRightBraceKey 
KeypadTabKey 
KeypadBackspaceKey 
KeypadAKey 
KeypadBKey 
KeypadCKey 
KeypadDKey 
KeypadEKey 
KeypadFKey 
KeypadXorKey 
KeypadPowerKey 
KeypadPercentKey 
KeypadLessKey 
KeypadGreaterKey 
KeypadAmpersandKey 
KeypadDblAmpersandKey 
KeypadVerticalBarKey 
KeypadDblVerticalBarKey 
KeypadColonKey 
KeypadHashKey 
KeypadSpaceKey 
KeypadAtKey 
KeypadExclamKey 
KeypadMemStoreKey 
KeypadMemRecallKey 
KeypadMemClearKey 
KeypadMemAddKey 
KeypadMemSubtractKey 
KeypadMemMultiplyKey 
KeypadMemDivideKey 
KeypadPlusMinusKey 
KeypadClearKey 
KeypadClearEntryKey 
KeypadBinaryKey 
KeypadOctalKey 
KeypadDecimalKey 
KeypadHexadecimalKey 
LeftCtrlKey 
LeftShiftKey 
LeftAltKey 
LeftGUIKey 
RightCtrlKey 
RightShiftKey 
RightAltKey 
RightGUIKey 
ModeKey 
AudioNextKey 
AudioPrevKey 
AudioStopKey 
AudioPlayKey 
AudioMuteKey 
MediaSelectKey 
WWWKey 
MailKey 
CalculatorKey 
ComputerKey 
ACSearchKey 
ACHomeKey 
ACBackKey 
ACForwardKey 
ACStopKey 
ACRefreshKey 
ACBookmarksKey 
BrightnessDownKey 
BrightnessUpKey 
DisplaySwitchKey 
KeyboardIllumToggleKey 
KeyboardIllumDownKey 
KeyboardIllumUpKey 
EjectKey 
SleepKey 
UnknownKey 

Subscriptions

presses Source

Arguments

:: Engine e 
=> (Key -> a)

The function to map the key pressed to an action.

-> Sub e a

The mapped subscription.

Subscribe to keyboard press events and map to a game action. A key press event is produced whenever a key is either released or continously held down.

downs Source

Arguments

:: Engine e 
=> (Key -> a)

The function to map the key held down to an action.

-> Sub e a

The mapped subscription.

Subscribe to keyboard down events and map to a game action.

ups Source

Arguments

:: Engine e 
=> (Key -> a)

The function to map the key released to an action.

-> Sub e a

The mapped subscription.

Subscribe to keyboard up events and map to a game action.