Skip to content

Input on Even G2 reaches your web app as structured events from the temple touchpads, optional Even R1 ring, IMU, and app lifecycle hooks. This guide explains the sources, numeric event codes, and how to reason about gestures when designing interactions.

Input Sources

The Even G2 glasses, optional Even R1 ring, and IMU sensors each provide distinct input:

SourceGestures / DataNotes
Even G2 touchpads (temple)Press, double press, swipe up, swipe downPrimary input on the glasses frame
Even R1 touchpads (ring)Press, double press, swipe up, swipe downSame gesture set as Even G2, but events are distinguishable by source
IMU (accelerometer / gyroscope)Head orientation, motion dataAvailable for motion-aware apps — see IMU API

Even G2 and Even R1 touchpad events share the same event types but can now be distinguished by their input source, allowing apps to assign different behaviors to glasses vs. ring input.

Event Types

EventValueDescription
CLICK_EVENT0Single press (Even G2 or Even R1)
SCROLL_TOP_EVENT1Swipe up / scroll reaches top boundary
SCROLL_BOTTOM_EVENT2Swipe down / scroll reaches bottom boundary
DOUBLE_CLICK_EVENT3Double press (Even G2 or Even R1)
FOREGROUND_ENTER_EVENT4App comes to foreground
FOREGROUND_EXIT_EVENT5App goes to background
ABNORMAL_EXIT_EVENT6Unexpected disconnect

Handling Events

typescript
bridge.onEvenHubEvent(event => {
  const textEvent = event.textEvent
  if (textEvent) {
    const eventType = textEvent.eventType

    switch (eventType) {
      case OsEventTypeList.CLICK_EVENT:
      case undefined: // SDK normalizes 0 to undefined in some cases
        // Handle press
        break
      case OsEventTypeList.DOUBLE_CLICK_EVENT:
        // Handle double press
        break
      case OsEventTypeList.SCROLL_TOP_EVENT:
        // Handle swipe up / scroll up
        break
      case OsEventTypeList.SCROLL_BOTTOM_EVENT:
        // Handle swipe down / scroll down
        break
    }
  }
})

Event Routing

Event delivery depends on which container has isEventCapture: 1:

Capture container typeEvents arrive as
Text containerevent.textEvent
List containerevent.listEvent

Only one container per page can capture events. Design your interaction model around a single active input target.

Lifecycle Events

Your app receives lifecycle events when its visibility changes:

  • FOREGROUND_ENTER_EVENT — the user has opened or returned to your app. Use this to resume updates or refresh data.
  • FOREGROUND_EXIT_EVENT — your app has moved to the background. Pause any timers or ongoing work.
  • ABNORMAL_EXIT_EVENT — the Bluetooth connection was lost unexpectedly.