InputClientDispatchMouseEventAsync Method |
Version 89.0.170
Dispatches a mouse event to the page.
Namespace:
CefSharp.DevTools.Input
Assembly:
CefSharp (in CefSharp.dll) Version: 89.0.170.0 (89.0.170.0)
Syntax public Task<DevToolsMethodResponse> DispatchMouseEventAsync(
string type,
long x,
long y,
Nullable<int> modifiers = null,
Nullable<long> timestamp = null,
Nullable<MouseButton> button = null,
Nullable<int> buttons = null,
Nullable<int> clickCount = null,
Nullable<long> force = null,
Nullable<long> tangentialPressure = null,
Nullable<int> tiltX = null,
Nullable<int> tiltY = null,
Nullable<int> twist = null,
Nullable<long> deltaX = null,
Nullable<long> deltaY = null,
string pointerType = null
)
public:
Task<DevToolsMethodResponse^>^ DispatchMouseEventAsync(
String^ type,
long long x,
long long y,
Nullable<int> modifiers = nullptr,
Nullable<long long> timestamp = nullptr,
Nullable<MouseButton> button = nullptr,
Nullable<int> buttons = nullptr,
Nullable<int> clickCount = nullptr,
Nullable<long long> force = nullptr,
Nullable<long long> tangentialPressure = nullptr,
Nullable<int> tiltX = nullptr,
Nullable<int> tiltY = nullptr,
Nullable<int> twist = nullptr,
Nullable<long long> deltaX = nullptr,
Nullable<long long> deltaY = nullptr,
String^ pointerType = nullptr
)
Parameters
- type
- Type: SystemString
Type of the mouse event. - x
- Type: SystemInt64
X coordinate of the event relative to the main frame's viewport in CSS pixels. - y
- Type: SystemInt64
Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers tothe top of the viewport and Y increases as it proceeds towards the bottom of the viewport. - modifiers (Optional)
- Type: SystemNullableInt32
Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8(default: 0). - timestamp (Optional)
- Type: SystemNullableInt64
Time at which the event occurred. - button (Optional)
- Type: SystemNullableMouseButton
Mouse button (default: "none"). - buttons (Optional)
- Type: SystemNullableInt32
A number indicating which buttons are pressed on the mouse when a mouse event is triggered.Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0. - clickCount (Optional)
- Type: SystemNullableInt32
Number of times the mouse button was clicked (default: 0). - force (Optional)
- Type: SystemNullableInt64
The normalized pressure, which has a range of [0,1] (default: 0). - tangentialPressure (Optional)
- Type: SystemNullableInt64
The normalized tangential pressure, which has a range of [-1,1] (default: 0). - tiltX (Optional)
- Type: SystemNullableInt32
The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0). - tiltY (Optional)
- Type: SystemNullableInt32
The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0). - twist (Optional)
- Type: SystemNullableInt32
The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0). - deltaX (Optional)
- Type: SystemNullableInt64
X delta in CSS pixels for mouse wheel event (default: 0). - deltaY (Optional)
- Type: SystemNullableInt64
Y delta in CSS pixels for mouse wheel event (default: 0). - pointerType (Optional)
- Type: SystemString
Pointer type (default: "mouse").
Return Value
Type:
TaskDevToolsMethodResponsereturns System.Threading.Tasks.Task<DevToolsMethodResponse>
See Also