touch.touch.on
Declaration
lua
touch.on(x, y) | touch.on(fingerId, x, y)
Description
Touch down (start touch event). Returns chainable touch_event object.
Parameters
`x,y` — coordinates
`fingerId` (number, optional) — finger ID for multi-touch
Return Values
`touch_event` — chainable object with :move(), :off(), :press(), :step_len(), :step_delay(), :msleep(), :sleep()
Example
lua
touch.on(100, 100):move(200, 200):off()
touch.on(100, 100):step_len(5):step_delay(10):move(300, 300):off()
Notes
Finger pool ~30 IDs. Must call :off() to release.