Skip to content
SiteEmail

cohtml.InputSystem.InputManager

This class wraps around Unity3D’s Input Manager and subscribes to its input events.

Inherits from cohtml.InputSystem.InputBase, IDisposable

Name
InputManager()
Initializes Unity3D event data that will be used for event processing.
voidProcessEvent(Event inputEvent)
Processes the current UnityGUI event.
virtual override MouseEventProcessMouseEvent()
Processes the current Unity3D mouse event.
virtual override KeyEventProcessKeyEvent()
Processes the current keyboard event.
voidProcessTouchEvent()
Processes the current touch event.
Name
virtual override EventMouseModifiersStateGetMouseModifiers()
virtual override EventModifiersStateGetKeyboardModifiers()
virtual override boolIsNumPadKey(int keyCode)
virtual override voidMapUnityCodesWithSystemCodes()
Name
const floatKeyRepeatDelay
const floatKeyRepeatRate

Public Functions inherited from cohtml.InputSystem.InputBase

Name
voidUpdateTouches(CohtmlView view, TouchEventData [] touchEventData, uint touchesCount)
Updates the GestureManager’s with the states of the touch events that happened this frame.
virtual KeyEventData.EventLocationGetKeyLocation(int keyCode)
Returns the key location of the provided key code.
virtual EventModifiersStateUpdateKeyboardModifiers(bool isCtrlDown, bool isAltDown, bool isShiftDown, bool isNumLockDown, bool isCapsLockDown, bool isMetaDown, bool isAltGrDown)
Updates the state of the keyboard key modifiers.
virtual voidDispose()
InputBaseInitialize()
Creates a InputSystem or InputManager instance based on which Unity3D input package is used.

Protected Functions inherited from cohtml.InputSystem.InputBase

Name
InputBase()
Vector2SetScrollData(Vector2 scroll)

Public Properties inherited from cohtml.InputSystem.InputBase

Name
Action< MouseEvent, InputEventWrapper >OnMouseEvent
Invoked when a mouse event occurs.
Action< KeyEvent, InputEventWrapper >OnKeyEvent
Invoked when a keyboard event occurs.
Action< KeyEvent, char >OnCharEvent
Invoked when a character event occurs.
Action< TouchEventCollection >OnTouchEvent
Invoked when a touch event occurs.
GamepadBaseGamepad
An instance of the current gamepad manager.

Protected Attributes inherited from cohtml.InputSystem.InputBase

Name
Dictionary< int, int >s_KeyCodeMapping
int []s_RightKeysMap
int []s_LeftKeysMap
TouchEventCollections_TouchDataCached
InputEventWrapperm_UnityEvent
InputManager()

Initializes Unity3D event data that will be used for event processing.

void ProcessEvent(
Event inputEvent
)

Processes the current UnityGUI event.

virtual override MouseEvent ProcessMouseEvent()

Processes the current Unity3D mouse event.

Reimplements: cohtml.InputSystem.InputBase.ProcessMouseEvent

virtual override KeyEvent ProcessKeyEvent()

Processes the current keyboard event.

Reimplements: cohtml.InputSystem.InputBase.ProcessKeyEvent

void ProcessTouchEvent()

Processes the current touch event.

virtual override EventMouseModifiersState GetMouseModifiers()

Reimplements: cohtml.InputSystem.InputBase.GetMouseModifiers

virtual override EventModifiersState GetKeyboardModifiers()

Reimplements: cohtml.InputSystem.InputBase.GetKeyboardModifiers

virtual override bool IsNumPadKey(
int keyCode
)

Reimplements: cohtml.InputSystem.InputBase.IsNumPadKey

virtual override void MapUnityCodesWithSystemCodes()

Reimplements: cohtml.InputSystem.InputBase.MapUnityCodesWithSystemCodes

const float KeyRepeatDelay = 0.5f;
const float KeyRepeatRate = 0.033f;