Skip to main content

Class: SoftKeyHEventMap

Utility class for creating softkey H event mapping functions.

Constructors

constructor

new SoftKeyHEventMap(): SoftKeyHEventMap

Returns

SoftKeyHEventMap

Methods

create

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

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

NameTypeDescription
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

fn

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

▸ (hEvent): undefined | number

Parameters
NameType
hEventstring
Returns

undefined | number

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/SoftKey/SoftKeyHEventMap.ts:18