// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-reference-terminal-view.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-use

    \title Open a terminal

    When you select \uicontrol {Run in Terminal} and run an
    application or the \uicontrol {Open Terminal} button to open a terminal,
    it opens as an output view.

    \image {qtcreator-output-terminal.webp} {Terminal pane}

    \section1 View output in the terminal

    \list
        \li To select a word in a terminal, double-click it.

        \li To select the whole line, triple-click it.

        \li To select all text, select \uicontrol {Select All}
            in the context menu or select \key {Ctrl+A}.

        \li To open links in a browser, files in the editor, or folders in the
            \l Projects view, hover over them, and select \key Ctrl.

        \li To \l{Search in current file}{search} through the output, select
            \key {Ctrl+F}.
    \endlist

    \section1 Run \QC commands from the terminal

    To use the \c qtc command-line options in the terminal, enter:

    \badcode
    qtc [option] [filename[:line_number[:column_number]]]
    \endcode

    To view the options, enter:

    \badcode
    qtc -help
    \endcode

    \section1 Insert \QC variables

    To insert expanded values of \QC variables into the terminal, select them
    in the \uicontrol {Insert Macro Variable} list.

    \section1 Set keyboard shortcut preferences

    Most of the \QC keyboard shortcuts are disabled in the terminal, except the
    ones for opening terminal preferences or the locator and quitting \QC. To
    keep \QC keyboard shortcuts from interfering in the terminal, select
    \inlineimage {icons/keyboardlock.png} {Qt Creator shortcuts take precedence.}.

    To send the escape key to the terminal instead of closing the terminal,
    select \uicontrol {Shift+Esc}. To set this as default behavior, go to
    \preferences > \uicontrol Terminal > \uicontrol {Block shortcuts in terminal}.

    \image {qtcreator-preferences-terminal.webp} {Terminal preferences}

    \section1 Run terminal in a separate window

    To open the terminal in a separate window, go to \preferences >
    \uicontrol Terminal, and clear \uicontrol {Use internal terminal}.

    \section1 Use system terminal on Linux and \macos

    On Linux and \macos, you can set the terminal to open by selecting
    \preferences > \uicontrol Environment > \uicontrol System.

    \sa {Use \QC variables}, {View output}, {Command-line options},
    {Keyboard shortcuts}
*/
