Skip to content
SiteEmail

cohtml.InputSystem.InputBase

Base input class responsible for subscribing to Unity3D input events and relaying them to the CohtmlInputHandler. Works with Unity3D’s Input Manager or Input System.

Inherits from IDisposable

Inherited by cohtml.InputSystem.InputManager

Name
virtual abstract MouseEventProcessMouseEvent() =0
Invoked when mouse events must be processed.
virtual abstract KeyEventProcessKeyEvent() =0
Invoked when keyboard events must be processed.
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.
Name
InputBase()
Vector2SetScrollData(Vector2 scroll)
virtual voidMapUnityCodesWithSystemCodes()
virtual abstract boolIsNumPadKey(int keyCode) =0
virtual abstract EventMouseModifiersStateGetMouseModifiers() =0
virtual abstract EventModifiersStateGetKeyboardModifiers() =0
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.
Name
Dictionary< int, int >s_KeyCodeMapping
int []s_RightKeysMap
int []s_LeftKeysMap
TouchEventCollections_TouchDataCached
InputEventWrapperm_UnityEvent
virtual abstract MouseEvent ProcessMouseEvent() =0

Invoked when mouse events must be processed.

Reimplemented by: cohtml.InputSystem.InputManager.ProcessMouseEvent

virtual abstract KeyEvent ProcessKeyEvent() =0

Invoked when keyboard events must be processed.

Reimplemented by: cohtml.InputSystem.InputManager.ProcessKeyEvent

void UpdateTouches(
CohtmlView view,
TouchEventData [] touchEventData,
uint touchesCount
)

Updates the GestureManager’s with the states of the touch events that happened this frame.

virtual KeyEventData.EventLocation GetKeyLocation(
int keyCode
)

Returns the key location of the provided key code.

virtual EventModifiersState UpdateKeyboardModifiers(
bool isCtrlDown,
bool isAltDown,
bool isShiftDown,
bool isNumLockDown,
bool isCapsLockDown,
bool isMetaDown,
bool isAltGrDown
)

Updates the state of the keyboard key modifiers.

virtual void Dispose()
static InputBase Initialize()

Creates a InputSystem or InputManager instance based on which Unity3D input package is used.

Return: An instance of the created object.

InputBase()
Vector2 SetScrollData(
Vector2 scroll
)
virtual void MapUnityCodesWithSystemCodes()

Reimplemented by: cohtml.InputSystem.InputManager.MapUnityCodesWithSystemCodes

virtual abstract bool IsNumPadKey(
int keyCode
) =0

Reimplemented by: cohtml.InputSystem.InputManager.IsNumPadKey

virtual abstract EventMouseModifiersState GetMouseModifiers() =0

Reimplemented by: cohtml.InputSystem.InputManager.GetMouseModifiers

virtual abstract EventModifiersState GetKeyboardModifiers() =0

Reimplemented by: cohtml.InputSystem.InputManager.GetKeyboardModifiers

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.

GamepadBase Gamepad;

An instance of the current gamepad manager.

static Dictionary< int, int > s_KeyCodeMapping;
static int [] s_RightKeysMap;
static int [] s_LeftKeysMap;
static TouchEventCollection s_TouchDataCached;
InputEventWrapper m_UnityEvent;