Terminal Native Terminals

This section is about the native terminals functionality.

What is a native terminal?

A native terminal is a terminal that does not allow plugins to intercept cryptic entries when they are going to be sent.

isTerminalNative

Returns a true or false depending if the terminal specified is native.

Copy
isTerminalNative(state: Object, { terminalId: String }): Boolean;
  • state Object

    Required. The global state of the application.

  • terminalId String

    Required. The ID of the terminal to be checked.

Returns

Boolean

True if the terminal is native. False if the terminal is not native.

Example
Copy
const state = storeHelper.getState();
const isTerminalNative = selectorsHelper.make('isTerminalNative');
const isNative = isTerminalNative(state, { terminalId: 'terminal-1' });

replaceIsTerminalNative

Changes from a non-native terminal to a native one or vice versa.

Note: Dispatches an action with the type @orion/terminals-helper/REPLACE_IS_TERMINALS_NATIVE which can be handled.
  • terminalId String

    Required. The ID of the terminal to be checked.

  • isNative Boolean

    Required. A boolean to determine whether or not the terminal should be native.

Example
Copy
dispatchersHelper.dispatch('replaceIsTerminalNative', { terminalId: 'terminal-1', isNative: true });