Class: $.InputDelegate

Inherits:
WatchUi.BehaviorDelegate show all

Overview

Handles the behavior / input events

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _buttonsExpected as System.ButtonInputs or Null

var _buttonsPressed as Lang.Number or Null

var _lastBehavior as $.Behavior or Null

var _lastKey as WatchUi.Key or Null

var _parentView as $.InputView

Instance Method Details

getButton(key as WatchUi.Key) as $.Button

Find the button that corresponds to the given key and return whether there are buttons that haven't been pressed

Parameters:

  • key —

    The key that was pressed

Returns:

  • Button enum telling whether all buttons have been pressed

getButtonBit(key as WatchUi.Key) as System.ButtonInputs or Null

Get the button input that corresponds to the given key enum

Parameters:

  • key —

    The key enum

Returns:

  • Button input of the key, or null if button not found

getKeyAction(key as WatchUi.Key) as $.Action or Null

Get the action enum corresponding to the given key enum

Parameters:

  • key —

    The key enum

Returns:

  • Action enum of key, or null if key not found

initialize(view as $.InputView)

Constructor

Parameters:

  • view —

    The InputView to operate on

onBack() as Lang.Boolean

Handle the back event

Returns:

  • true if handled, false otherwise

onHold(evt as WatchUi.ClickEvent) as Lang.Boolean

Handle the touch screen hold event

Parameters:

  • evt —

    The click event that occurred

Returns:

  • true if handled, false otherwise

onKey(evt as WatchUi.KeyEvent) as Lang.Boolean

Handle a physical button being pressed and released

Parameters:

  • evt —

    The key event that occurred

Returns:

  • true if handled, false otherwise

onKeyPressed(evt as WatchUi.KeyEvent) as Lang.Boolean

Handle a physical button being pressed

Parameters:

  • evt —

    The key event that occurred

Returns:

  • true if handled, false otherwise

onKeyReleased(evt as WatchUi.KeyEvent) as Lang.Boolean

Handle a physical button being released

Parameters:

  • evt —

    The key event that occurred

Returns:

  • true if handled, false otherwise

onMenu() as Lang.Boolean

Handle the menu event

Returns:

  • true if handled, false otherwise

onNextMode() as Lang.Boolean

Handle the next event

Returns:

  • true if handled, false otherwise

onNextPage() as Lang.Boolean

Handle going to the next view

Returns:

  • true if handled, false otherwise

onPreviousMode() as Lang.Boolean

Handle the previous event

Returns:

  • true if handled, false otherwise

onPreviousPage() as Lang.Boolean

Handle going to the previous view

Returns:

  • true if handled, false otherwise

onRelease(evt as WatchUi.ClickEvent) as Lang.Boolean

Handle the touch screen release event

Parameters:

  • evt —

    The click event that occurred

Returns:

  • true if handled, false otherwise

onSelect() as Lang.Boolean

Handle the select button

Returns:

  • true if handled, false otherwise

onSwipe(evt as WatchUi.SwipeEvent) as Lang.Boolean

Handle the touch screen swipe event

Parameters:

  • evt —

    The swipe event that occurred

Returns:

  • true if handled, false otherwise

onTap(evt as WatchUi.ClickEvent) as Lang.Boolean

Handle a screen tap event

Parameters:

  • evt —

    The click event that occurred

Returns:

  • true if handled, false otherwise


Generated Oct 20, 2026, 8:20:40 AM