---
title: "TouchService"
canonical_url: https://developer.repebble.com/docs/c/Foundation/Event_Service/TouchService/
last_updated: 2026-10-22
sdk_version: 4.33.1
---
# TouchService

Source: https://developer.repebble.com/docs/c/Foundation/Event_Service/TouchService/

The APIs on this page will only work with SDK 4.9+.

## Function Documentation

void touch\_service\_subscribe([TouchServiceHandler](https://developer.repebble.com/docs/c/Foundation/Event_Service/TouchService.md#TouchServiceHandler) handler, void \* context)

Subscribe to touch events. The touch sensor is enabled while subscribed.

#### Parameters
 handler

Callback invoked for each touch event

 context

User context passed to the callback

void touch\_service\_unsubscribe(void)

Unsubscribe from touch events. The touch sensor is disabled if no other subscribers remain.

bool touch\_service\_is\_enabled(void)

#### Returns

true if touch input is currently being delivered to apps. Returns false on platforms without a touchscreen, or when touch has been disabled system-wide (future feature). Apps can poll this (for example on window appear) to avoid looking broken when touch is unavailable.

void app\_touch\_navigation\_enable(bool enable)

Opt this app into (or out of) touch navigation: the system gesture bridge that maps swipes/taps on a MenuLayer/ScrollLayer to button presses. Third-party apps are opt-out by default and receive no touch navigation even when the user has enabled it system-wide; call this with _enable_ true to participate. Takes effect immediately when touch navigation is enabled system-wide, otherwise once the user enables it.

#### Parameters
 enable

true to participate in touch navigation, false to stop participating.

## Data Structure Documentation

struct TouchEvent

Touch event data, carried directly in PebbleTouchEvent.

#### Data Fields
[TouchEventType](https://developer.repebble.com/docs/c/Foundation/Event_Service/TouchService.md#TouchEventType) typebool non\_navigational

true when the touch must not drive navigation: the interaction session was inactive at Touchdown (unarmed contact on the idle watchface). Latched on Touchdown and carried across the whole gesture.

int16\_t xint16\_t y

## Enum Documentation

enum TouchEventType

Touch event type.

#### Enumerators
TouchEvent\_TouchdownTouchEvent\_LiftoffTouchEvent\_PositionUpdate

## Typedef Documentation

 typedef void(\* TouchServiceHandler)(const TouchEvent \*event, void \*context) 

Callback for touch events.

#### Parameters
 event

The touch event data

 context

User-provided context
