Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
SDLOnButtonEvent

SDLOnButtonEvent Class Reference

Section Contents

Overview

Notifies application that user has depressed or released a button to which the application has subscribed.

Further information about button events and button-presses can be found at SDLSubscribeButton.

HMI Status Requirements:

HMILevel:

  • The application will receive SDLOnButtonEvent notifications for all subscribed buttons when HMILevel is FULL.

  • The application will receive SDLOnButtonEvent notifications for subscribed media buttons when HMILevel is LIMITED.

  • Media buttons include SEEKLEFT, SEEKRIGHT, TUNEUP, TUNEDOWN, and PRESET_0-PRESET_9.

  • The application will not receive SDLOnButtonEvent notification when HMILevel is BACKGROUND.

AudioStreamingState:

  • Any

SystemContext:

  • MAIN, VR. In MENU, only PRESET buttons.

  • In VR, pressing any subscribable button will cancel VR.

See

SDLSubscribeButton

@since SDL 1.0

buttonName

The name of the button

Objective-C

@property (nonatomic, strong) SDLButtonName _Nonnull buttonName;

Swift

var buttonName: SDLButtonName { get set }

buttonEventMode

Indicates whether this is an UP or DOWN event

Objective-C

@property (nonatomic, strong) SDLButtonEventMode _Nonnull buttonEventMode;

Swift

var buttonEventMode: SDLButtonEventMode { get set }

customButtonID

If ButtonName is “CUSTOM_BUTTON”, this references the integer ID passed by a custom button. (e.g. softButton ID)

@since SDL 2.0

Optional, Integer, 0 - 65536

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLInt> *customButtonID;

Swift

var customButtonID: (NSNumber & SDLInt)? { get set }
View on GitHub.com
Previous Section Next Section