Class EventWrapper
Syntax
public sealed class EventWrapper
Constructors
EventWrapper()
Declaration
EventWrapper(Int32)
Declaration
public EventWrapper(int controlHint)
Parameters
Type |
Name |
Description |
Int32 |
controlHint |
|
EventWrapper(Object)
Declaration
public EventWrapper(object controlHint)
Parameters
Type |
Name |
Description |
Object |
controlHint |
|
Properties
alt
Declaration
Property Value
clickCount
Declaration
public int clickCount { get; }
Property Value
cmd
Declaration
Property Value
commandName
Declaration
public string commandName { get; }
Property Value
control
Declaration
public int control { get; }
Property Value
controlHint
Declaration
public int controlHint { get; }
Property Value
controlsKeyboard
Declaration
public bool controlsKeyboard { get; }
Property Value
controlsMouse
Declaration
public bool controlsMouse { get; }
Property Value
controlType
Declaration
public EventType controlType { get; }
Property Value
couldControlKeyboard
Declaration
public static bool couldControlKeyboard { get; }
Property Value
couldControlMouse
Declaration
public static bool couldControlMouse { get; }
Property Value
ctrl
Declaration
public bool ctrl { get; }
Property Value
ctrlOrCmd
Declaration
public bool ctrlOrCmd { get; }
Property Value
freeType
Declaration
public EventType freeType { get; }
Property Value
IsAnyKeyboard
Declaration
public bool IsAnyKeyboard { get; }
Property Value
IsAnyKeyDown
Declaration
public bool IsAnyKeyDown { get; }
Property Value
IsAnyKeyUp
Declaration
public bool IsAnyKeyUp { get; }
Property Value
IsAnyMouse
Declaration
public bool IsAnyMouse { get; }
Property Value
IsAnyMouseDown
Declaration
public bool IsAnyMouseDown { get; }
Property Value
IsAnyMouseDrag
Declaration
public bool IsAnyMouseDrag { get; }
Property Value
IsAnyMouseUp
Declaration
public bool IsAnyMouseUp { get; }
Property Value
IsContextClick
Declaration
public bool IsContextClick { get; }
Property Value
IsLayout
Declaration
public bool IsLayout { get; }
Property Value
IsMouseMove
Declaration
public bool IsMouseMove { get; }
Property Value
IsRepaint
Declaration
public bool IsRepaint { get; }
Property Value
IsUsed
Declaration
public bool IsUsed { get; }
Property Value
keyboardType
Declaration
public EventType keyboardType { get; }
Property Value
keyCode
Declaration
public KeyCode keyCode { get; }
Property Value
modifiers
Declaration
public EventModifiers modifiers { get; }
Property Value
Declaration
public MouseButton mouseButton { get; }
Property Value
mouseDelta
Declaration
public Vector2 mouseDelta { get; }
Property Value
mousePosition
Declaration
public Vector2 mousePosition { get; }
Property Value
mouseType
Declaration
public EventType mouseType { get; }
Property Value
rawType
Declaration
public EventType rawType { get; }
Property Value
shift
Declaration
public bool shift { get; }
Property Value
supportsKeyboard
Declaration
public bool supportsKeyboard { get; }
Property Value
Methods
CaptureKeyboard()
Declaration
public void CaptureKeyboard()
CaptureMouse()
Declaration
public void CaptureMouse()
HandleCapture(Boolean, Boolean)
Declaration
public void HandleCapture(bool canCaptureMouse, bool canCaptureKeyboard)
Parameters
Type |
Name |
Description |
Boolean |
canCaptureMouse |
|
Boolean |
canCaptureKeyboard |
|
HandleRelease()
Declaration
public void HandleRelease()
IsExecuteCommand(String)
Declaration
public bool IsExecuteCommand(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
IsFree(EventType)
Declaration
public bool IsFree(EventType type)
Parameters
Returns
IsKeyDown(KeyCode)
Declaration
public bool IsKeyDown(KeyCode key)
Parameters
Returns
IsKeyDown(KeyCode, EventModifiers)
Declaration
public bool IsKeyDown(KeyCode key, EventModifiers modifiers)
Parameters
Returns
IsKeyUp(KeyCode)
Declaration
public bool IsKeyUp(KeyCode key)
Parameters
Returns
IsKeyUp(KeyCode, EventModifiers)
Declaration
public bool IsKeyUp(KeyCode key, EventModifiers modifiers)
Parameters
Returns
Declaration
public bool IsMouseDown(MouseButton button)
Parameters
Returns
Declaration
public bool IsMouseDown(MouseButton button, EventModifiers modifiers)
Parameters
Returns
Declaration
public bool IsMouseDrag(MouseButton button)
Parameters
Returns
Declaration
public bool IsMouseDrag(MouseButton button, EventModifiers modifiers)
Parameters
Returns
Declaration
public bool IsMouseUp(MouseButton button)
Parameters
Returns
Declaration
public bool IsMouseUp(MouseButton button, EventModifiers modifiers)
Parameters
Returns
IsRaw(EventType)
Declaration
public bool IsRaw(EventType type)
Parameters
Returns
IsValidateCommand(String)
Declaration
public bool IsValidateCommand(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
RegisterControl(FocusType)
Declaration
public void RegisterControl(FocusType focusType)
Parameters
ReleaseKeyboard()
Declaration
public void ReleaseKeyboard()
ReleaseMouse()
Declaration
public void ReleaseMouse()
TryUse()
Declaration
Use()
Declaration
ValidateCommand()
Declaration
public void ValidateCommand()
Events
keyboardCaptured
Declaration
public event Action keyboardCaptured
Event Type
keyboardReleased
Declaration
public event Action keyboardReleased
Event Type
mouseCaptured
Declaration
public event Action mouseCaptured
Event Type
mouseReleased
Declaration
public event Action mouseReleased
Event Type
Extension Methods
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.