Class: Toybox.WatchUi.InputDelegate
- Inherits:
-
Toybox.Lang.Object
Overview
InputDelegate handles basic input events.
Note that on wearable products, input events are not supported for data fields.
There are four types of basic inputs InputDelegate can handle:
-
Key, represented by KeyEvent
-
Touch, represented by ClickEvent
-
Swipe, represented by SwipeEvent
-
Selectable, represented by SelectableEvent
This class is the base class for BehaviorDelegate, which goes beyond simple key and screen-based input.
See Also:
Direct Known Subclasses
Instance Method Summary collapse
-
onDrag(dragEvent as WatchUi.DragEvent) as Lang.Boolean
A touch screen drag event has occurred.
-
onFlick(flickEvent as WatchUi.FlickEvent) as Lang.Boolean
A touch screen flick event has occurred.
-
onHold(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A touch screen hold event has occurred.
-
onKey(keyEvent as WatchUi.KeyEvent) as Lang.Boolean
A physical button has been pressed and released.
-
onKeyPressed(keyEvent as WatchUi.KeyEvent) as Lang.Boolean
A physical button has been pressed down.
-
onKeyReleased(keyEvent as WatchUi.KeyEvent) as Lang.Boolean
A physical button has been released.
-
onRelease(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A touch screen release event has occurred.
-
onSelectable(selectableEvent as WatchUi.SelectableEvent) as Lang.Boolean
The state of a Selectable has changed.
-
onSwipe(swipeEvent as WatchUi.SwipeEvent) as Lang.Boolean
A touch screen swipe event has occurred.
-
onTap(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A screen tap event has occurred.
Instance Method Details
onDrag(dragEvent as WatchUi.DragEvent) as Lang.Boolean
A touch screen drag event has occurred.
This is sent when the touch screen is dragged.
onFlick(flickEvent as WatchUi.FlickEvent) as Lang.Boolean
A touch screen flick event has occurred.
This is sent when the touch screen is flicked.
onHold(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A touch screen hold event has occurred.
This is sent when the touch screen is touched and not released.
onKey(keyEvent as WatchUi.KeyEvent) as Lang.Boolean
A physical button has been pressed and released.
To find out which key was pressed, use KeyEvent.getKey() to get the button's WatchUi.KEY_* enum value.
onKeyPressed(keyEvent as WatchUi.KeyEvent) as Lang.Boolean
A physical button has been pressed down.
To find out which key was pressed, use KeyEvent.getKey() to get the button's WatchUi.KEY_* enum value.
onKeyReleased(keyEvent as WatchUi.KeyEvent) as Lang.Boolean
A physical button has been released.
To find out which key was pressed, use KeyEvent.getKey() to get the button's WatchUi.KEY_* enum value.
onRelease(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A touch screen release event has occurred.
This is only sent after an onHold() event, once the hold on the touch screen is released.
onSelectable(selectableEvent as WatchUi.SelectableEvent) as Lang.Boolean
The state of a Selectable has changed.
onSwipe(swipeEvent as WatchUi.SwipeEvent) as Lang.Boolean
A touch screen swipe event has occurred.
This is sent when the touch screen is swiped.
onTap(clickEvent as WatchUi.ClickEvent) as Lang.Boolean
A screen tap event has occurred.
This is sent when the touch screen is tapped (a quick touch and release).