Terminal Focus
This section is about the focus functionality of the Terminal.
getFocusedTerminalId
Returns the ID of the focused terminal.
getFocusedTerminalId(state: Object): String;
-
state Object
Required. The global state of the application.
Returns
-
String
The ID of the focused terminal.
Example
const state = storeHelper.getState();
const getFocusedTerminalId = selectorsHelper.make('getFocusedTerminalId');
const focusedTerminalId = getFocusedTerminalId(state);
isTerminalFocused
Returns a true or false depending if the terminal specified is focused.
isTerminalFocused(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 focused. False if the terminal is not focused.
Example
const state = storeHelper.getState();
const isTerminalFocused = selectorsHelper.make('isTerminalFocused');
const isFocused = isTerminalFocused(state, { terminalId: 'terminal-1' });
focusTerminal
Focus the specified terminal.
Usage
dispatchersHelper.dispatch('focusTerminal', { terminalId: String });
-
terminalId String
-
Required. The ID of the terminal to focus.
Example
dispatchersHelper.dispatch('focusTerminal', { terminalId: 'terminal-1' });
blurTerminal
Blur the specified terminal.
Usage
dispatchersHelper.dispatch('blurTerminal', { terminalId: String });
-
terminalId String
Required. The id of the terminal to blur.
Example
dispatchersHelper.dispatch('blurTerminal', { terminalId: 'terminal-1' });