Skip to main content

Class: SoftKeyUtils

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/SoftKey/SoftKeyUtils.ts:10

A utility class for working with softkey menus.

Constructors

Constructor

new SoftKeyUtils(): SoftKeyUtils

Returns

SoftKeyUtils

Methods

createPfdInteractionEventMap()

static createPfdInteractionEventMap(side, isInSplitMode): (event) => undefined | number

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/SoftKey/SoftKeyUtils.ts:37

Creates a function that maps interaction events to softkey indexes for a PFD instrument. The function will return the index of the softkey that was pressed for softkey press interaction events, and undefined for all other events.

Parameters

ParameterTypeDescription
side"left" | "right"The side on which the softkey menu is placed on the PFD in split mode.
isInSplitModeSubscribable<boolean>Whether the softkey menu's parent PFD is in split mode.

Returns

A function that maps interaction events to softkey indexes for a PFD instrument. If the interaction event cannot be mapped, then the function will return undefined.

(event): undefined | number

Parameters
ParameterType
eventstring
Returns

undefined | number