InputClientDispatchMouseEventAsync Method |
Version 87.1.132
Dispatches a mouse event to the page.
Namespace:
CefSharp.DevTools.Input
Assembly:
CefSharp (in CefSharp.dll) Version: 87.1.132.0 (87.1.132.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> 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> 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). - 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