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:

AudioStreamingState:

SystemContext:

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 }