atom-touch-events

Provides Touchscreen event handling gesture capability

russlescai

7,363

14

Bug Reports

0.23.0

MIT

GitHub

atom-touch-events package

This package provides touchscreen event handling and gesture capability.

This package exposes the events listed below as part of Atom Services.

Supported behaviours

Supported gesture events

Plans

How To Consume Atom Touch Events

The Atom Service Provider API is used to provide versioned services of these events.

For more information about consuming these services in your package, read here: https://atom.io/docs/latest/behind-atom-interacting-with-packages-via-services.

To consume these events, add the following to your package.json (or the services you need):

"consumedServices": {
  "touch-events": {
    "versions": {
      "^0.21.0": "consumeTouchEvents"
    }
  }
}

Then in your main package, implement your consumer function to use the service function:

consumeTouchEvents: (touchEvents) ->

  # Subscribe to touch swipe left event
  touchEvents.onDidTouchSwipeLeft (event) ->
    console.log "Swiped left!"