aboutsummaryrefslogtreecommitdiffstats
path: root/doc/qtdesignstudio/src/reference/qtdesignstudio-keyboard-shortcuts.qdoc
blob: ac6354ca90b3ee181e13bcf39763aa51a5cf6ce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page studio-keyboard-shortcuts.html
    \previouspage creator-project-managing-sessions.html
    \nextpage studio-projects.html

    \title Keyboard Shortcuts

    \brief Default keyboard shortcuts.

    \QDS has various keyboard shortcuts that speed up your development process.
    To view all \QDS functions in and their keyboard shortcuts, select
    \preferences > \uicontrol Environment > \uicontrol Keyboard.

    \image qtcreator-keyboard-shortcuts.png

    The shortcuts that are displayed in red color are associated with several
    functions. \QDS 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 \QDS 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, \QDS shortcuts do not work.
    Typically, you can configure the shortcuts in the window manager, but if
    that is not allowed, you can change the \QDS shortcuts.


    To override the platform default value that determines whether
    keyboard shortcuts are shown in the labels of context menu items,
    select \preferences > \uicontrol Environment >
    \uicontrol Interface. The label of the \uicontrol {Show keyboard shortcuts
    in context menus} check box indicates whether the platform default value
    is \c on or \c off.

    \image qtcreator-preferences-environment-interface.webp {Interface tab in Environment preferences}

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

    \section1 General Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Open file or project
            \li  \key{Ctrl+O}
        \row
            \li  New project
            \li  \key{Ctrl+Shift+N}
        \row
            \li  New file
            \li  \key{Ctrl+N}
        \row
            \li  Select all
            \li  \key{Ctrl+A}
        \row
            \li  Delete
            \li  \key{Del}
        \row
            \li  Cut
            \li  \key{Ctrl+X}
        \row
            \li  Copy
            \li  \key{Ctrl+C}
        \row
            \li  Paste
            \li  \key{Ctrl+V}
        \row
            \li  Undo
            \li  \key{Ctrl+Z}
        \row
            \li  Redo
            \li  \key{Ctrl+Y}
        \row
            \li  Print
            \li  \key{Ctrl+P}
        \row
            \li  Save
            \li  \key{Ctrl+S}
        \row
            \li  Save all
            \li  \key{Ctrl+Shift+S}
        \row
            \li  Close window
            \li  \key{Ctrl+W}
        \row
            \li  Close all
            \li  \key{Ctrl+Shift+W}
        \row
            \li  Close current file
            \li  \key{Ctrl+F4}
        \row
            \li  Go back
            \li  \key{Alt+Left}
        \row
            \li  Go forward
            \li  \key{Alt+Right}
        \row
            \li  Go to line
            \li  \key{Ctrl+L}
        \row
            \li Locate files and other content within the project
            \li \key{Ctrl+K}
        \row
            \li  Next open document in history
            \li  \key{Ctrl+Shift+Tab}
        \row
            \li  Previous open document in history
            \li  \key{Ctrl+Tab}
        \row
            \li  Switch to \uicontrol Welcome mode
            \li  \key{Ctrl+1}
        \row
            \li  Switch to \uicontrol Edit mode
            \li  \key{Ctrl+2}
        \row
            \li  Switch to \uicontrol Design mode
            \li  \key{Ctrl+3}
        \row
            \li  Switch to \uicontrol Debug mode
            \li  \key{Ctrl+4}
        \row
            \li  Switch to \uicontrol Projects mode
            \li  \key{Ctrl+5}
        \row
            \li  Switch to \uicontrol Help mode
            \li  \key{Ctrl+6}
        \row
            \li  Toggle \uicontrol{Issues}
            \li  \key{Alt+1} (\key{Cmd+1} on \macos)
        \row
            \li  Toggle \uicontrol{Search Results}
            \li  \key{Alt+2} (\key{Cmd+2} on \macos)
        \row
            \li  Toggle \uicontrol{Application Output}
            \li  \key{Alt+3} (\key{Cmd+3} on \macos)
        \row
            \li  Toggle \uicontrol{Compile Output}
            \li  \key{Alt+4} (\key{Cmd+4} on \macos)
        \row
            \li  Toggle \uicontrol{Terminal}
            \li  \key{Alt+5} (\key{Cmd+5} on \macos)
        \row
            \li  Toggle \uicontrol{Version Control}
            \li  \key{Alt+6} (\key{Cmd+6} on \macos)
        \row
            \li  Toggle \uicontrol{QML Debugger Console}
            \li  \key{Alt+7} (\key{Cmd+7} on \macos)
        \row
            \li  Toggle \uicontrol{General Messages}
            \li  \key{Alt+8} (\key{Cmd+8} on \macos)
        \row
            \li  Maximize output views
            \li  \key{Alt+Shift+9}
        \row
            \li  Move to next item in output
            \li  \key{F6}
        \row
            \li  Move to previous item in output
            \li  \key{Shift+F6}
        \row
            \li  Activate \uicontrol Projects view
            \li  \key{Alt+X}
        \row
            \li  Activate \uicontrol{Open Documents} view
            \li  \key{Alt+O}
        \row
            \li  Activate \uicontrol{File System} view
            \li  \key{Alt+Y}, \key{Alt+F}
        \row
            \li  Toggle left sidebar
            \li  \key{Alt+0} (\key{Cmd+0} on \macos)
        \row
            \li  Toggle right sidebar
            \li  \key{Alt+Shift+0}
        \row
            \li  Full screen
            \li  \key{Ctrl+Shift+F11}
        \row
            \li  Exit \QDS

                 By default, \QDS exits without asking for confirmation, unless
                 there are unsaved changes in open files. To always be asked,
                 select the \uicontrol {Ask for confirmation before exiting}
                 check box in \preferences > \uicontrol Environment >
                 \uicontrol System.
            \li  \key{Ctrl+Q}
    \endtable

    \section1 Design Mode Keyboard Shortcuts

    You can use the following keyboard shortcuts when editing QML files in the
    \uicontrol Design mode.

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Open the QML file that defines the selected component
            \li  \key{F2}
        \row
            \li  Jump to the \uicontrol {Code} view.
            \li  \key{F4}
    \endtable

    \section1 Editing Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  Auto-indent selection
            \li  \key{Ctrl+I}
        \row
            \li  Collapse
            \li  \key{Ctrl+<}
        \row
            \li  Expand
            \li  \key{Ctrl+>}
        \row
            \li  Trigger a completion in this scope
            \li  \key{Ctrl+Space}
        \row
            \li  Display tooltips for function signatures regardless of the
                 cursor position in the function call
            \li  \key{Ctrl+Shift+D}
        \row
            \li  Copy line
            \li  \key{Ctrl+Ins}
        \row
            \li  Copy line down
            \li  \key{Ctrl+Alt+Down}
        \row
            \li  Copy line up
            \li  \key{Ctrl+Alt+Up}
        \row
            \li  Paste from the clipboard history
            \li  \key{Ctrl+Shift+V}
        \row
            \li  Cut line
            \li  \key{Shift+Del}
        \row
            \li  Join lines
            \li  \key{Ctrl+J}
        \row
            \li  Insert line above current line
            \li  \key{Ctrl+Shift+Enter}
        \row
            \li  Insert line below current line
            \li  \key{Ctrl+Enter}
        \row
            \li  Decrease font size
            \li  \key{Ctrl+-} (\key{Ctrl+Roll mouse wheel down})
        \row
            \li  Increase font size
            \li  \key{Ctrl++} (\key{Ctrl+Roll mouse wheel up})
        \row
            \li  Reset font size
            \li  \key{Ctrl+0}
        \row
            \li  Split
            \li  \key{Ctrl+E}, \key{2}
        \row
            \li  Split side by side
            \li  \key{Ctrl+E}, \key{3}
        \row
            \li  Remove all splits
            \li  \key{Ctrl+E}, \key{1}
        \row
            \li  Remove current split
            \li  \key{Ctrl+E}, \key{0}
        \row
            \li  Go to next split
            \li  \key{Ctrl+E, O}
        \row
            \li  Select all
            \li  \key{Ctrl+A}
        \row
            \li  Go to block end
            \li  \key{Ctrl+]}
        \row
            \li  Go to block start
            \li  \key{Ctrl+[}
        \row
            \li  Go to block end and select the lines between the current cursor
                 position and the end of the block
            \li  \key{Ctrl+Shift+]}
        \row
            \li  Go to block start and select the lines between the current
                 cursor position and the beginning of the block
            \li  \key{Ctrl+Shift+[}
        \row
            \li  Select the current block

                 The second press extends the selection to the parent block. To
                 enable this behavior, select \preferences >
                 \uicontrol {Text Editor} > \uicontrol Behavior >
                 \uicontrol {Enable smart selection changing}.
            \li  \key{Ctrl+U}
        \row
            \li  Undo the latest smart block selection
            \li  \key{Ctrl+Alt+Shift+U}
        \row
            \li  Move current line down
            \li  \key{Ctrl+Shift+Down}
        \row
            \li  Move current line up
            \li  \key{Ctrl+Shift+Up}
        \row
            \li  Trigger a refactoring action in this scope
            \li  \key{Alt+Enter}
        \row
            \li  Rewrap paragraph
            \li  \key{Ctrl+E}, \key{R}
        \row
            \li  Enable text wrapping
            \li  \key{Ctrl+E}, \key{Ctrl+W}
        \row
            \li  Toggle comment for selection
            \li  \key{Ctrl+/}
        \row
            \li  Visualize whitespace
            \li  \key{Ctrl+E}, \key{Ctrl+V}
        \row
            \li  Find references to symbol under cursor
            \li  \key{Ctrl+Shift+U}
        \row
            \li  Follow symbol under cursor

               Works with namespaces, classes, functions, variables, include
               statements, and macros, as well as CMake functions, macros,
               targets, and packages. Also, opens URLs in the default browser.
            \li  \key{F2}
        \row
            \li  Rename symbol under cursor
            \li  \key{Ctrl+Shift+R}
        \row
            \li  Switch between function declaration and definition
            \li  \key{Shift+F2}
        \row
            \li  Open type hierarchy
            \li  \key{Ctrl+Shift+T}
        \row
            \li Add a cursor at the next occurrence of selected text for
                multi-cursor editing
            \li  \key{Ctrl+D}
        \row
            \li  Turn selected text into lowercase
            \li  \key{Alt+U}
        \row
            \li  Turn selected text into uppercase
            \li  \key{Alt+Shift+U}
        \row
            \li  Sort selected lines alphabetically
            \li  \key{Alt+Shift+S}
        \row
            \li  Run static checks on JavaScript code to find common problems
            \li  \key{Ctrl+Shift+C}
        \row
            \li  Find and replace
            \li  \key{Ctrl+F}
        \row
            \li  Find next
            \li  \key{F3}
        \row
            \li  Find previous
            \li  \key{Shift+F3}
        \row
            \li  Find next occurrence of selected text
            \li  \key{Ctrl+F3}
        \row
            \li  Find previous occurrence of selected text
            \li  \key{Ctrl+Shift+F3}
        \row
            \li  Replace next
            \li  \key{Ctrl+=}
        \row
            \li  Open advanced find
            \li  \key{Ctrl+Shift+F}
    \endtable

    \section1 Project Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  New project
            \li  \key{Ctrl+Shift+N}
        \row
            \li  Load project
            \li  \key{Ctrl+Shift+O}
        \row
            \li  Run
            \li  \key{Ctrl+R}
    \endtable

    \section1 Help Keyboard Shortcuts

    \table
        \header
            \li  Action
            \li  Keyboard shortcut
        \row
            \li  View context-sensitive help
            \li  \key{F1}
        \row
            \li  Add bookmark in \uicontrol Help mode
            \li  \key{Ctrl+M}
        \row
            \li  Activate index in \uicontrol Help mode
            \li  \key{Ctrl+Shift+I}
        \row
            \li  Activate search in \uicontrol Help mode
            \li  \key{Ctrl+Shift+/}
        \row
            \li  Activate bookmarks in \uicontrol Help mode
            \li \key{ Ctrl+Shift+B}
        \row
            \li  Activate contents in \uicontrol Help mode
            \li  \key{Ctrl+Shift+C}
    \endtable

    \section1 Version Control Keyboard Shortcuts

    \table
        \header
            \li Action
            \li Keyboard shortcut
        \row
            \li Stage file for commit
            \li \key{Alt+G}, \key{Alt+A}
        \row
            \li Commit
            \li \key{Alt+G}, \key{Alt+C}
        \row
            \li Diff current file
            \li \key{Alt+G}, \key{Alt+D}
        \row
            \li Diff project
            \li \key{Alt+G}, \key{Alt+Shift+D}
        \row
            \li Blame
            \li \key{Alt+G}, \key{Alt+B}
        \row
            \li Log current file
            \li \key{Alt+G}, \key{Alt+L}
        \row
            \li Log project
            \li \key{Alt+G}, \key{Alt+K}
        \row
            \li Reset
            \li \key{Alt+G}, \key{Alt+U}
    \endtable

    \sa {Assign keyboard shortcuts}, {Find keyboard shortcuts},
    {Import and export keyboard shortcuts}
*/