double_tap
Tap twice at specified screen coordinates to zoom in/out or select text on Android devices.
Instructions
Double tap at specific coordinates on the Android screen. Useful for zooming or selecting text.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X coordinate | |
| y | Yes | Y coordinate | |
| device_id | No | Device serial number |
Implementation Reference
- src/adb/input-controller.ts:112-128 (handler)The implementation of the doubleTap function which executes two rapid tap commands via ADB shell.
export async function doubleTap(x: number, y: number, deviceId?: string): Promise<{ x: number; y: number }> { const resolved = await deviceManager.resolveDeviceId(deviceId); deviceManager.checkRateLimit(resolved); const coords = await normalizeCoordinates(x, y, resolved); validateCoordinate(coords.x, 'x'); validateCoordinate(coords.y, 'y'); // Two rapid taps await adbShell(['input', 'tap', String(coords.x), String(coords.y)], resolved); await new Promise(resolve => setTimeout(resolve, 50)); await adbShell(['input', 'tap', String(coords.x), String(coords.y)], resolved); deviceManager.touchSession(resolved); log.info('Double tap performed', { x: coords.x, y: coords.y, deviceId: resolved }); return coords; }