Glassly Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.Developing on Mentra Live? We recommend using the Glassly Bluetooth SDK.The developer tools are available in the Glassly App under Settings → Miniapp Developer Settings.Share feedback with an in-app bug report, on Discord, or by email at help@glassly.ai.
session.input delivers the physical controls on the glasses: button presses and touchpad gestures. The starter scaffold wires a button press to the display, so a short press shows a text wall.
src/background/index.ts
Button events only reach glasses that have a button. Declare a BUTTON hardware requirement in your manifest to gate the miniapp to those glasses.

Button presses

onButtonPress fires on every press of a physical button:
Each ButtonPressData has:

Touch gestures

onTouch subscribes to touchpad gestures. Pass a handler for every gesture, a single gesture name to filter, or an array of names for one subscription across several gestures.
Each TouchData has: The gesture values the runtime reports: Glasses can send other kind strings, so kind is typed as string. Match the values you handle and ignore the rest.

Cleaning up

onButtonPress and every onTouch form return an unsubscribe function:
Calling onTouch with an array returns one unsubscribe function that drops all of the gestures it registered.