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
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual abstract MouseEvent | ProcessMouseEvent() =0 Invoked when mouse events must be processed. |
| virtual abstract KeyEvent | ProcessKeyEvent() =0 Invoked when keyboard events must be processed. |
| 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() |
| InputBase | Initialize() Creates a InputSystem or InputManager instance based on which Unity3D input package is used. |
Protected Functions
Section titled “Protected Functions”| Name | |
|---|---|
| InputBase() | |
| Vector2 | SetScrollData(Vector2 scroll) |
| virtual void | MapUnityCodesWithSystemCodes() |
| virtual abstract bool | IsNumPadKey(int keyCode) =0 |
| virtual abstract EventMouseModifiersState | GetMouseModifiers() =0 |
| virtual abstract EventModifiersState | GetKeyboardModifiers() =0 |
Public Properties
Section titled “Public Properties”| 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. |
| GamepadBase | Gamepad An instance of the current gamepad manager. |
Protected Attributes
Section titled “Protected Attributes”| Name | |
|---|---|
| Dictionary< int, int > | s_KeyCodeMapping |
| int [] | s_RightKeysMap |
| int [] | s_LeftKeysMap |
| TouchEventCollection | s_TouchDataCached |
| InputEventWrapper | m_UnityEvent |
Public Functions Documentation
Section titled “Public Functions Documentation”function ProcessMouseEvent
Section titled “function ProcessMouseEvent”virtual abstract MouseEvent ProcessMouseEvent() =0Invoked when mouse events must be processed.
Reimplemented by: cohtml.InputSystem.InputManager.ProcessMouseEvent
function ProcessKeyEvent
Section titled “function ProcessKeyEvent”virtual abstract KeyEvent ProcessKeyEvent() =0Invoked when keyboard events must be processed.
Reimplemented by: cohtml.InputSystem.InputManager.ProcessKeyEvent
function UpdateTouches
Section titled “function UpdateTouches”void UpdateTouches( CohtmlView view, TouchEventData [] touchEventData, uint touchesCount)Updates the GestureManager’s with the states of the touch events that happened this frame.
function GetKeyLocation
Section titled “function GetKeyLocation”virtual KeyEventData.EventLocation GetKeyLocation( int keyCode)Returns the key location of the provided key code.
function UpdateKeyboardModifiers
Section titled “function UpdateKeyboardModifiers”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.
function Dispose
Section titled “function Dispose”virtual void Dispose()function Initialize
Section titled “function Initialize”static InputBase Initialize()Creates a InputSystem or InputManager instance based on which Unity3D input package is used.
Return: An instance of the created object.
Protected Functions Documentation
Section titled “Protected Functions Documentation”function InputBase
Section titled “function InputBase”InputBase()function SetScrollData
Section titled “function SetScrollData”Vector2 SetScrollData( Vector2 scroll)function MapUnityCodesWithSystemCodes
Section titled “function MapUnityCodesWithSystemCodes”virtual void MapUnityCodesWithSystemCodes()Reimplemented by: cohtml.InputSystem.InputManager.MapUnityCodesWithSystemCodes
function IsNumPadKey
Section titled “function IsNumPadKey”virtual abstract bool IsNumPadKey( int keyCode) =0Reimplemented by: cohtml.InputSystem.InputManager.IsNumPadKey
function GetMouseModifiers
Section titled “function GetMouseModifiers”virtual abstract EventMouseModifiersState GetMouseModifiers() =0Reimplemented by: cohtml.InputSystem.InputManager.GetMouseModifiers
function GetKeyboardModifiers
Section titled “function GetKeyboardModifiers”virtual abstract EventModifiersState GetKeyboardModifiers() =0Reimplemented by: cohtml.InputSystem.InputManager.GetKeyboardModifiers
Public Property Documentation
Section titled “Public Property Documentation”property OnMouseEvent
Section titled “property OnMouseEvent”Action< MouseEvent, InputEventWrapper > OnMouseEvent;Invoked when a mouse event occurs.
property OnKeyEvent
Section titled “property OnKeyEvent”Action< KeyEvent, InputEventWrapper > OnKeyEvent;Invoked when a keyboard event occurs.
property OnCharEvent
Section titled “property OnCharEvent”Action< KeyEvent, char > OnCharEvent;Invoked when a character event occurs.
property OnTouchEvent
Section titled “property OnTouchEvent”Action< TouchEventCollection > OnTouchEvent;Invoked when a touch event occurs.
property Gamepad
Section titled “property Gamepad”GamepadBase Gamepad;An instance of the current gamepad manager.
Protected Attributes Documentation
Section titled “Protected Attributes Documentation”variable s_KeyCodeMapping
Section titled “variable s_KeyCodeMapping”static Dictionary< int, int > s_KeyCodeMapping;variable s_RightKeysMap
Section titled “variable s_RightKeysMap”static int [] s_RightKeysMap;variable s_LeftKeysMap
Section titled “variable s_LeftKeysMap”static int [] s_LeftKeysMap;variable s_TouchDataCached
Section titled “variable s_TouchDataCached”static TouchEventCollection s_TouchDataCached;variable m_UnityEvent
Section titled “variable m_UnityEvent”InputEventWrapper m_UnityEvent;© 2026 Coherent Labs. All rights reserved.