Skip to main content

Class: SoftKeyHEventMap

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/SoftKey/SoftKeyHEventMap.ts:7

Utility class for creating softkey H event mapping functions.

Constructors​

Constructor​

new SoftKeyHEventMap(): SoftKeyHEventMap

Returns​

SoftKeyHEventMap

Methods​

create()​

static create(prefix, side, isInSplitMode): (hEvent) => undefined | number

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/SoftKey/SoftKeyHEventMap.ts:18

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

Parameters​

ParameterTypeDescription
prefixstringThe prefix of softkey press H events for the softkey bar's parent PFD instrument.
side"left" | "right"The side on which the softkey bar is placed on the PFD in split mode.
isInSplitModeSubscribable<boolean>Whether the softkey bar's parent PFD is in split mode.

Returns​

A function which maps H events to softkey indexes for a PFD instrument.

(hEvent): undefined | number

Parameters​
ParameterType
hEventstring
Returns​

undefined | number