Skip to content

Mouse Down

Press mouse button at specified coordinate position (without releasing).

Interface Description

Interface Type

mouseDown

Parameters

ParameterTypeRequiredDefaultDescription
deviceIdstring-Device ID
xnumber-Press X coordinate (pixels)
ynumber-Press Y coordinate (pixels)
keystring'LEFT'Mouse button type
autoReleasebooleanfalseAuto release button

key Parameter Values

ValueDescription
LEFTLeft button (default)
RIGHTRight button
MIDDLEMiddle button
EXTRA1Extra button 1
EXTRA2Extra button 2
EXTRA3Extra button 3
EXTRA4Extra button 4
EXTRA5Extra button 5

Return Value

javascript
true  // Returns true on successful operation

Basic Usage

javascript
// Press left button at coordinate (200, 300)
await apiInvoke('mouseDown', {
    deviceId: 'P72578581E07',
    x: 200,
    y: 300
    // key defaults to 'LEFT'
});

Auto Release Button

javascript
// Press left button and auto release
await apiInvoke('mouseDown', {
    deviceId: 'P72578581E07',
    x: 200,
    y: 300,
    autoRelease: true  // Auto release button
});

Cooperation: try.catch@foxmail.com