DS Server

Javascript: StatusBarViewGenerator.getShowKeyStates Method

Method|Introduced in 34.0

Description

Specifies whether the status bar shows the key state of the current insertion mode, insert or overwrite.

Syntax

<void> StatusBarViewGenerator.getShowKeyStates(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the property value.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates StatusBarViewGenerator.getShowKeyStates in a practical document-editing workflow. It specifies whether the status bar shows the key state of the current insertion mode, insert or overwrite.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.statusBar.getShowKeyStates(
    function(result) {
        if (result) {
            console.log("get show key states is available.");
        } else {
            console.warn("get show key states is not available in the current document state.");
        }
    },
    onTxError
);