Pebble.Button

Button subscriptions for Pebble watches.

Native Pebble C API

  • Clicks on developer.repebble.com

Types

Button

type Button
    = Back
    | Up
    | Select
    | Down

Physical buttons available on a Pebble watch.

Event

type Event
    = Pressed
    | Released
    | LongPressed

Button event edge to subscribe to.

Subscriptions

on

on : Button -> Event -> msg -> Sub msg

Subscribe to a specific button event.

onPress

onPress : Button -> msg -> Sub msg

Subscribe to a button press.

onRelease

onRelease : Button -> msg -> Sub msg

Subscribe to a button release.

onLongPress

onLongPress : Button -> msg -> Sub msg

Subscribe to a long button press.