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:
| Source | Gestures / Data | Notes |
|---|---|---|
| Even G2 touchpads (temple) | Press, double press, swipe up, swipe down | Primary input on the glasses frame |
| Even R1 touchpads (ring) | Press, double press, swipe up, swipe down | Same gesture set as Even G2, but events are distinguishable by source |
| IMU (accelerometer / gyroscope) | Head orientation, motion data | Available 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
| Event | Value | Description |
|---|---|---|
CLICK_EVENT | 0 | Single press (Even G2 or Even R1) |
SCROLL_TOP_EVENT | 1 | Swipe up / scroll reaches top boundary |
SCROLL_BOTTOM_EVENT | 2 | Swipe down / scroll reaches bottom boundary |
DOUBLE_CLICK_EVENT | 3 | Double press (Even G2 or Even R1) |
FOREGROUND_ENTER_EVENT | 4 | App comes to foreground |
FOREGROUND_EXIT_EVENT | 5 | App goes to background |
ABNORMAL_EXIT_EVENT | 6 | Unexpected 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 type | Events arrive as |
|---|---|
| Text container | event.textEvent |
| List container | event.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.