/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator
**
**
** GNU Free Documentation License
**
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
**
**
****************************************************************************/

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \contentspage {Qt Creator Manual}
    \previouspage creator-cli.html
    \page creator-keyboard-shortcuts.html
    \nextpage creator-editor-external.html

    \title Keyboard Shortcuts

    \QC provides various keyboard shortcuts to speed up your development
    process.

    To view all keyboard shortcuts defined in \QC, and to change them, select
    \uicontrol {Tools > Options > Environment > Keyboard}. The shortcuts are listed by
    category. To find a keyboard
    shortcut in the list, enter a function name or shortcut in the \uicontrol Filter
    field.

    \image qtcreator-keyboard-shortcuts.png

    The shortcuts that are displayed in red color are associated with several
    functions. \QC executes the function that is available in the current
    context. If several functions are available for the same shortcut at a
    time, there is a conflict and \QC cannot execute any function.

    A keyboard shortcut might also conflict with a shortcut that a Window
    manager uses for its own purposes. In that case, \QC shortcuts do not work.
    Typically, you can configure the shortcuts in the window manager, but if
    that is not allowed, you can change the \QC shortcuts. For example, Unity on
    Ubuntu 11.10 uses \key F10 in its window manager, and therefore the default
    \QC keyboard shortcut \key F10 (Step Over) does not work on that system.

    \section1 Configuring Keyboard Shortcuts

    To customize a keyboard shortcut:

    \list 1

        \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Environment
            > \uicontrol Keyboard.

        \li Select a command from the list.

        \li In \uicontrol{Key Sequence} enter the shortcut key you want to associate
            with the selected command.

        \li To revert to the default shortcut, select \uicontrol Reset.

    \endlist

    \QC allows you to use different keyboard shortcut mapping schemes:

    \list

        \li To import a keyboard shortcut mapping scheme, click \uicontrol Import
            and select the .kms file containing the keyboard shortcut mapping scheme
            you want to import.

        \li To export the current keyboard shortcut mapping scheme, click
            \uicontrol Export and select the location where you want to save the
            exported .kms file.

    \endlist

    \section1 Default Keyboard Shortcuts

    The following tables list the default keyboard shortcuts. They are
    categorized by actions.

    \section2 General Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Open file or project
            \li  Ctrl+O
        \row
            \li  New file or project
            \li  Ctrl+N
        \row
            \li  Open in external editor
            \li  Alt+V, Alt+I
        \row
            \li  Select all
            \li  Ctrl+A
        \row
            \li  Delete
            \li  Del
        \row
            \li  Cut
            \li  Ctrl+X
        \row
            \li  Copy
            \li  Ctrl+C
        \row
            \li  Paste
            \li  Ctrl+V
        \row
            \li  Redo
            \li  Ctrl+Y
        \row
            \li  Print
            \li  Ctrl+P
        \row
            \li  Save
            \li  Ctrl+S
        \row
            \li  Save all
            \li  Ctrl+Shift+S
        \row
            \li  Close window
            \li  Ctrl+W
        \row
            \li  Close all
            \li  Ctrl+Shift+W
        \row
            \li  Close current file
            \li  Ctrl+F4
        \row
            \li  Go back
            \li  Alt+Left
        \row
            \li  Go forward
            \li  Alt+Right
        \row
            \li  Go to line
            \li  Ctrl+L
        \row
            \li  Next open document in history
            \li  Ctrl+Shift+Tab
        \row
            \li  Go to other split
            \li  Ctrl+E, O
        \row
            \li  Previous open document in history
            \li  Ctrl+Tab
        \row
            \li  Activate \uicontrol Locator
            \li  Ctrl+K
        \row
            \li  Switch to \uicontrol Welcome mode
            \li  Ctrl+1
        \row
            \li  Switch to \uicontrol Edit mode
            \li  Ctrl+2
        \row
            \li  Switch to \uicontrol Design mode
            \li  Ctrl+3
        \row
            \li  Switch to \uicontrol Debug mode
            \li  Ctrl+4
        \row
            \li  Switch to \uicontrol Projects mode
            \li  Ctrl+5
        \row
            \li  Switch to \uicontrol Analyze mode
            \li  Ctrl+6
        \row
            \li  Switch to \uicontrol Help mode
            \li  Ctrl+7
        \row
            \li  Toggle \uicontrol{Issues} pane
            \li  Alt+1 (Cmd+1 on OS X)
        \row
            \li  Toggle \uicontrol{Search Results} pane
            \li  Alt+2 (Cmd+2 on OS X)
        \row
            \li  Toggle \uicontrol{Application Output} pane
            \li  Alt+3 (Cmd+3 on OS X)
        \row
            \li  Toggle \uicontrol{Compile Output} pane
            \li  Alt+4 (Cmd+4 on OS X)
        \row
            \li  Toggle other output panes
            \li  Alt+number (Cmd+number on OS X)

            Where the number is the number of the output pane.
        \row
            \li  Activate \uicontrol Bookmarks pane
            \li  Alt+M
        \row
            \li  Activate \uicontrol{File System} pane
            \li  Alt+Y
        \row
            \li  Activate \uicontrol{Open Documents} pane
            \li  Alt+O
        \row
            \li  Maximize output panes
            \li  Alt+9
        \row
            \li  Move to next item in output panes
            \li  F6
        \row
            \li  Move to previous item in output panes
            \li  Shift+F6
        \row
            \li  Activate \uicontrol Projects pane
            \li  Alt+X
        \row
            \li  Full screen
            \li  Ctrl+Shift+F11
        \row
            \li  Toggle the sidebar
            \li  Alt+0 (Cmd+0 on OS X)
        \row
            \li  Undo
            \li  Ctrl+Z
        \row
            \li  Move to \uicontrol Edit mode

               In \uicontrol Edit mode:
               \list
                \li  The first press moves focus to the editor
                \li  The second press closes secondary windows
               \endlist
            \li  Esc
        \row
            \li  Exit \QC
            \li  Ctrl+Q
    \endtable

    \section2 Editing Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Auto-indent selection
            \li  Ctrl+I
        \row
            \li  Collapse
            \li  Ctrl+<
        \row
            \li  Expand
            \li  Ctrl+>
        \row
            \li  Trigger a completion in this scope
            \li  Ctrl+Space
        \row
            \li  Copy line
            \li  Ctrl+Ins
        \row
            \li  Copy line down
            \li  Ctrl+Alt+Down
        \row
            \li  Copy line up
            \li  Ctrl+Alt+Up
        \row
            \li  Paste from the clipboard history
            \li  Ctrl+Shift+V

               Subsequent presses move you back in the history
        \row
            \li  Cut line
            \li  Shift+Del
        \row
            \li  Join lines
            \li  Ctrl+J
        \row
            \li  Insert line above current line
            \li  Ctrl+Shift+Enter
        \row
            \li  Insert line below current line
            \li  Ctrl+Enter
        \row
            \li  Decrease font size
            \li  Ctrl+- (Ctrl+Roll mouse wheel down)
        \row
            \li  Increase font size
            \li  Ctrl++ (Ctrl+Roll mouse wheel up)
        \row
            \li  Reset font size
            \li  Ctrl+0
        \row
            \li  Toggle Vim-style editing
            \li  Alt+V, Alt+V
        \row
            \li  Split
            \li  Ctrl+E, 2
        \row
            \li  Split side by side
            \li  Ctrl+E, 3
        \row
            \li  Remove all splits
            \li  Ctrl+E, 1
        \row
            \li  Remove current split
            \li  Ctrl+E, 0
        \row
            \li  Select all
            \li  Ctrl+A
        \row
            \li  Go to block end
            \li  Ctrl+]
        \row
            \li  Go to block start
            \li  Ctrl+[
        \row
            \li  Go to block end with selection
            \li  Ctrl+}
        \row
            \li  Go to block start with selection
            \li  Ctrl+{
        \row
            \li  Move current line down
            \li  Ctrl+Shift+Down
        \row
            \li  Move current line up
            \li  Ctrl+Shift+Up
        \row
            \li  Trigger a refactoring action in this scope
            \li  Alt+Enter
        \row
            \li  Rewrap paragraph
            \li  Ctrl+E, R
        \row
            \li  Select the current block

               The second press extends the selection to the parent block
            \li  Ctrl+U
        \row
            \li  Enable text wrapping
            \li  Ctrl+E, Ctrl+W
        \row
            \li  Toggle comment for selection
            \li  Ctrl+/
        \row
            \li  Visualize whitespace
            \li  Ctrl+E, Ctrl+V
        \row
            \li  Adjust size
            \li  Ctrl+J
        \row
            \li  Lay out in a grid
            \li  Ctrl+G
        \row
            \li  Lay out horizontally
            \li  Ctrl+H
        \row
            \li  Lay out vertically
            \li  Ctrl+L
        \row
            \li  Preview
            \li  Alt+Shift+R
        \row
            \li  Edit signals and slots
            \li  F4
        \row
            \li  Toggle bookmark
            \li  Ctrl+M
        \row
            \li  Go to next bookmark
            \li  Ctrl+.
        \row
            \li  Go to previous bookmark
            \li  Ctrl+,
        \row
            \li  Fetch snippet
            \li  Alt+C, Alt+F
        \row
            \li  Paste snippet
            \li  Alt+C, Alt+P
        \row
            \li  Find usages
            \li  Ctrl+Shift+U
        \row
            \li  Follow symbol under cursor

               Works with namespaces, classes, functions, variables, include
               statements and macros
            \li  F2
        \row
            \li  Rename symbol under cursor
            \li  Ctrl+Shift+R
        \row
            \li  Switch between function declaration and definition
            \li  Shift+F2
        \row
            \li  Open type hierarchy
            \li  Ctrl+Shift+T
        \row
            \li  Switch between header and source file
            \li  F4
        \row
            \li  Turn selected text into lowercase
            \li  Alt+U
        \row
            \li  Turn selected text into uppercase
            \li  Alt+Shift+U
        \row
            \li  Run static checks on JavaScript code to find common problems
            \li  Ctrl+Shift+C
        \row
            \li  Find and replace
            \li  Ctrl+F
        \row
            \li  Find next
            \li  F3
        \row
            \li  Find previous
            \li  Shift+F3
        \row
            \li  Find next occurrence of selected text
            \li  Ctrl+F3
        \row
            \li  Find previous occurrence of selected text
            \li  Ctrl+Shift+F3
        \row
            \li  Replace next
            \li  Ctrl+=
        \row
            \li  Open advanced find
            \li  Ctrl+Shift+F
        \row
            \li  Record a text-editing macro
            \li  Alt+(
        \row
            \li  Stop recording a macro
            \li  Alt+)
        \row
            \li  Play last macro
            \li  Alt+R
        \row
            \li  Show Qt Quick toolbars
            \li  Ctrl+Alt+Space
        \row
            \li  Execute user actions in FakeVim mode
            \li  Alt+V, n, where n is the number of the user action, from 1 to 9
    \endtable

    \section2 Image Viewer Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Switch to background
            \li  Ctrl+[
        \row
            \li  Switch to outline
            \li  Ctrl+]
        \row
            \li  Zoom in
            \li  Ctrl++
        \row
            \li  Zoom out
            \li  Ctrl+-
        \row
            \li  Fit to screen
            \li  Ctrl+=
        \row
            \li  Original size
            \li  Ctrl+0
    \endtable

    \section2 Qt Quick Designer Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Open the QML file that defines the selected component
            \li  F2
        \row
            \li  Move between code editor and visual editor
            \li  F4
        \row
            \li  Toggle left sidebar
            \li  Ctrl+Alt+0
        \row
            \li  Toggle right sidebar
            \li  Ctrl+Alt+Shift+0
    \endtable

    \section2 Debugging Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Start or continue debugging
            \li  F5
        \row
            \li  Exit debugger
            \li  Shift+F5
        \row
            \li  Step over
            \li  F10
        \row
            \li  Step into
            \li  F11
        \row
            \li  Step out
            \li  Shift+F11
        \row
            \li  Toggle breakpoint
            \li  F9
        \row
            \li  Run to selected function
            \li  Ctrl+F6
        \row
            \li  Run to line
            \li  Ctrl+F10
        \row
            \li  Reverse direction
            \li  F12
    \endtable

    \section2 Project Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Build project
            \li  Ctrl+B
        \row
            \li  Build all
            \li  Ctrl+Shift+B
        \row
            \li  New project
            \li  Ctrl+Shift+N
        \row
            \li  Open project
            \li  Ctrl+Shift+O
        \row
            \li  Select the \l{glossary-buildandrun-kit}{kit} to build and run your project with
            \li  Ctrl+T
        \row
            \li  Run
            \li  Ctrl+R
    \endtable

    \section2 Help Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  View context-sensitive help
            \li  F1
        \row
            \li  Activate contents in \uicontrol Help mode
            \li  Ctrl+T
        \row
            \li  Add bookmark in \uicontrol Help mode
            \li  Ctrl+M
        \row
            \li  Activate index in \uicontrol Help mode
            \li  Ctrl+I
        \row
            \li  Reset font size
            \li  Ctrl+0
        \row
            \li  Activate search in \uicontrol Help mode
            \li  Ctrl+S
    \endtable

    \section2 Version Control Keyboard Shortcuts

    \table
        \header
            \li  {1,2} Action
            \li  {6,1} Version control system
        \header
            \li  Bazaar
            \li  CVS
            \li  Git
            \li  Mercurial
            \li  Perforce
            \li  Subversion
        \row
            \li  Add
            \li
            \li  Alt+C, Alt+A
            \li  Alt+G, Alt+A
            \li
            \li  Alt+P, Alt+A
            \li  Alt+S, Alt+A
        \row
            \li  Commit/Submit
            \li  Alt+Z, Alt+C
            \li  Alt+C, Alt+C
            \li  Alt+G, Alt+C
            \li  Alt+G, Alt+C
            \li  Alt+P, Alt+S
            \li  Alt+S, Alt+C
        \row
            \li  Diff
            \li  Alt+Z, Alt+D
            \li  Alt+C, Alt+D
            \li  Alt+G, Alt+D
            \li  Alt+G, Alt+D
            \li
            \li  Alt+S, Alt+D
        \row
            \li  Diff project
            \li
            \li
            \li  Alt+G, Alt+Shift+D
            \li
            \li  Alt+P, Alt+D
            \li
        \row
            \li  Blame/Annotate
            \li
            \li
            \li  Alt+G, Alt+B
            \li
            \li
            \li
        \row
            \li  Log/Filelog
            \li  Alt+Z, Alt+L
            \li
            \li  Alt+G, Alt+L
            \li  Alt+G, Alt+L
            \li  Alt+P, Alt+F
            \li
        \row
            \li  Log project
            \li
            \li
            \li  Alt+G, Alt+K
            \li
            \li
            \li
        \row
            \li  Status
            \li  Alt+Z, Alt+S
            \li
            \li
            \li  Alt+G, Alt+S
            \li
            \li
        \row
            \li  Undo changes/Revert
            \li
            \li
            \li  Alt+G, Alt+U
            \li
            \li  Alt+P, Alt+R
            \li
        \row
            \li  Edit
            \li
            \li
            \li
            \li
            \li  Alt+P, Alt+E
            \li
        \row
            \li  Opened
            \li
            \li
            \li
            \li
            \li  Alt+P, Alt+O
            \li
    \endtable
*/
