Skip to content

1681-engine / index / detectTouch

Function: detectTouch() ​

ts
function detectTouch(env): boolean;

Defined in: src/input/touchDetect.ts:18

Touch controls only where a finger is the main way in: the native app always, a browser whose primary pointer is coarse and that reports touch points (a phone or tablet), never a desktop — a laptop with a touch screen still has a fine primary pointer and keeps its mouse and keyboard.

Parameters ​

ParameterType
envTouchEnv

Returns ​

boolean

Released under the MIT License.