How to use the @theia/terminal/lib/browser/terminal-keybinding-contexts.TerminalKeybindingContexts.terminalActive function in @theia/terminal

To help you get started, we’ve selected a few @theia/terminal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / terminal-search / src / browser / terminal-search-contribution.ts View on Github external
registerKeybindings(keybindings: KeybindingRegistry): void {
        // unregister Ctrl + F pseudo command for terminal widget.
        keybindings.unregisterKeybinding({
                command: KeybindingRegistry.PASSTHROUGH_PSEUDO_COMMAND,
                keybinding: KeyCode.createKeyCode({ key: Key.KEY_F, ctrl: true }).toString(),
                context: TerminalKeybindingContexts.terminalActive
        });
        keybindings.registerKeybinding({
            command: TerminalSearchCommands.TERMINAL_FIND_TEXT.id,
            keybinding: 'ctrlcmd+f',
            context: TerminalKeybindingContexts.terminalActive
        });

        keybindings.registerKeybinding({
            command: TerminalSearchCommands.TERMINAL_FIND_TEXT_CANCEL.id,
            keybinding: 'esc',
            context: TerminalSearchKeybindingContext.disableSearch
        });
    }
}
github eclipse-theia / theia / packages / terminal-search / src / browser / terminal-search-contribution.ts View on Github external
registerKeybindings(keybindings: KeybindingRegistry): void {
        // unregister Ctrl + F pseudo command for terminal widget.
        keybindings.unregisterKeybinding({
                command: KeybindingRegistry.PASSTHROUGH_PSEUDO_COMMAND,
                keybinding: KeyCode.createKeyCode({ key: Key.KEY_F, ctrl: true }).toString(),
                context: TerminalKeybindingContexts.terminalActive
        });
        keybindings.registerKeybinding({
            command: TerminalSearchCommands.TERMINAL_FIND_TEXT.id,
            keybinding: 'ctrlcmd+f',
            context: TerminalKeybindingContexts.terminalActive
        });

        keybindings.registerKeybinding({
            command: TerminalSearchCommands.TERMINAL_FIND_TEXT_CANCEL.id,
            keybinding: 'esc',
            context: TerminalSearchKeybindingContext.disableSearch
        });
    }
}