creator-keyboard-shortcuts.qdoc 18.3 KB
Newer Older
1
2
/****************************************************************************
**
Eike Ziller's avatar
Eike Ziller committed
3
4
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
**
**
** 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.
// **********************************************************************

/*!
26
    \contentspage {Qt Creator Manual}
27
28
    \previouspage creator-cli.html
    \page creator-keyboard-shortcuts.html
29
    \nextpage creator-editor-external.html
30
31
32
33
34
35

    \title Keyboard Shortcuts

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

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

    \image qtcreator-keyboard-shortcuts.png

44
45
46
47
48
49
50
51
52
53
54
55
    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.

56
57
58
59
60
61
    \section1 Configuring Keyboard Shortcuts

    To customize a keyboard shortcut:

    \list 1

62
63
        \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Environment
            > \uicontrol Keyboard.
64

65
        \li Select a command from the list.
66

67
68
69
70
71
72
73
74
75
76
77
78
79
        \li In the \uicontrol{Key Sequence} field, you have the following
            options:

            \list

                \li Enter the shortcut key you want to associate with the
                    selected command.

                \li Select \uicontrol Record, press the keys to use as the
                    keyboard shortcut, and select \uicontrol {Stop Recording}
                    when you are done.

            \endlist
80

81
        \li To revert to the default shortcut, select \uicontrol Reset.
82
83
84
85
86
87
88

    \endlist

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

    \list

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

93
        \li To export the current keyboard shortcut mapping scheme, click
94
            \uicontrol Export and select the location where you want to save the
95
            exported .kms file.
96
97
98
99
100
101
102
103
104
105
106
107

    \endlist

    \section1 Default Keyboard Shortcuts

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

    \section2 General Keyboard Shortcuts

    \table
        \header
108
109
            \li  Action
            \li  Keyboard shortcut
110
        \row
111
112
            \li  Open file or project
            \li  Ctrl+O
113
        \row
114
115
            \li  New file or project
            \li  Ctrl+N
116
        \row
117
118
            \li  Open in external editor
            \li  Alt+V, Alt+I
119
        \row
120
121
            \li  Select all
            \li  Ctrl+A
122
        \row
123
124
            \li  Delete
            \li  Del
125
        \row
126
127
            \li  Cut
            \li  Ctrl+X
128
        \row
129
130
            \li  Copy
            \li  Ctrl+C
131
        \row
132
133
            \li  Paste
            \li  Ctrl+V
134
        \row
135
136
            \li  Redo
            \li  Ctrl+Y
137
        \row
138
139
            \li  Print
            \li  Ctrl+P
140
        \row
141
142
            \li  Save
            \li  Ctrl+S
143
        \row
144
145
            \li  Save all
            \li  Ctrl+Shift+S
146
        \row
147
148
            \li  Close window
            \li  Ctrl+W
149
        \row
150
151
            \li  Close all
            \li  Ctrl+Shift+W
152
        \row
153
154
            \li  Close current file
            \li  Ctrl+F4
155
        \row
156
157
            \li  Go back
            \li  Alt+Left
158
        \row
159
160
            \li  Go forward
            \li  Alt+Right
161
        \row
162
163
            \li  Go to line
            \li  Ctrl+L
164
        \row
165
166
            \li  Next open document in history
            \li  Ctrl+Shift+Tab
167
        \row
168
169
            \li  Go to other split
            \li  Ctrl+E, O
170
        \row
171
172
            \li  Previous open document in history
            \li  Ctrl+Tab
173
        \row
174
            \li  Activate \uicontrol Locator
175
            \li  Ctrl+K
176
        \row
177
            \li  Switch to \uicontrol Welcome mode
178
            \li  Ctrl+1
179
        \row
180
            \li  Switch to \uicontrol Edit mode
181
            \li  Ctrl+2
182
        \row
183
            \li  Switch to \uicontrol Design mode
184
            \li  Ctrl+3
185
        \row
186
            \li  Switch to \uicontrol Debug mode
187
            \li  Ctrl+4
188
        \row
189
            \li  Switch to \uicontrol Projects mode
190
            \li  Ctrl+5
191
        \row
192
            \li  Switch to \uicontrol Analyze mode
193
            \li  Ctrl+6
Leena Miettinen's avatar
Leena Miettinen committed
194
        \row
195
            \li  Switch to \uicontrol Help mode
196
            \li  Ctrl+7
197
        \row
198
            \li  Toggle \uicontrol{Issues} pane
199
            \li  Alt+1 (Cmd+1 on OS X)
200
        \row
201
            \li  Toggle \uicontrol{Search Results} pane
202
            \li  Alt+2 (Cmd+2 on OS X)
203
        \row
204
            \li  Toggle \uicontrol{Application Output} pane
205
            \li  Alt+3 (Cmd+3 on OS X)
206
        \row
207
            \li  Toggle \uicontrol{Compile Output} pane
208
            \li  Alt+4 (Cmd+4 on OS X)
209
        \row
210
            \li  Toggle other output panes
211
            \li  Alt+number (Cmd+number on OS X)
212
213

            Where the number is the number of the output pane.
214
        \row
215
            \li  Activate \uicontrol Bookmarks pane
216
            \li  Alt+M
217
        \row
218
            \li  Activate \uicontrol{File System} pane
219
            \li  Alt+Y
220
        \row
221
            \li  Activate \uicontrol{Open Documents} pane
222
            \li  Alt+O
223
        \row
224
225
            \li  Maximize output panes
            \li  Alt+9
226
        \row
227
228
            \li  Move to next item in output panes
            \li  F6
229
        \row
230
231
            \li  Move to previous item in output panes
            \li  Shift+F6
232
        \row
233
            \li  Activate \uicontrol Projects pane
234
            \li  Alt+X
235
        \row
236
237
            \li  Full screen
            \li  Ctrl+Shift+F11
238
        \row
239
            \li  Toggle the sidebar
240
            \li  Alt+0 (Cmd+0 on OS X)
241
        \row
242
243
            \li  Undo
            \li  Ctrl+Z
244
        \row
245
            \li  Move to \uicontrol Edit mode
246

247
               In \uicontrol Edit mode:
248
               \list
249
250
                \li  The first press moves focus to the editor
                \li  The second press closes secondary windows
251
               \endlist
252
            \li  Esc
253
        \row
254
255
            \li  Exit \QC
            \li  Ctrl+Q
256
257
258
259
260
261
    \endtable

    \section2 Editing Keyboard Shortcuts

    \table
        \header
262
263
            \li  Action
            \li  Keyboard shortcut
264
        \row
265
266
            \li  Auto-indent selection
            \li  Ctrl+I
267
        \row
268
269
            \li  Collapse
            \li  Ctrl+<
270
        \row
271
272
            \li  Expand
            \li  Ctrl+>
273
        \row
274
275
            \li  Trigger a completion in this scope
            \li  Ctrl+Space
276
        \row
277
278
            \li  Copy line
            \li  Ctrl+Ins
279
        \row
280
281
            \li  Copy line down
            \li  Ctrl+Alt+Down
282
        \row
283
284
            \li  Copy line up
            \li  Ctrl+Alt+Up
285
        \row
286
287
            \li  Paste from the clipboard history
            \li  Ctrl+Shift+V
288
289

               Subsequent presses move you back in the history
290
        \row
291
292
            \li  Cut line
            \li  Shift+Del
293
        \row
294
295
            \li  Join lines
            \li  Ctrl+J
296
        \row
297
298
            \li  Insert line above current line
            \li  Ctrl+Shift+Enter
299
        \row
300
301
            \li  Insert line below current line
            \li  Ctrl+Enter
302
        \row
303
304
            \li  Decrease font size
            \li  Ctrl+- (Ctrl+Roll mouse wheel down)
305
        \row
306
307
            \li  Increase font size
            \li  Ctrl++ (Ctrl+Roll mouse wheel up)
308
        \row
309
310
            \li  Reset font size
            \li  Ctrl+0
311
        \row
312
313
            \li  Toggle Vim-style editing
            \li  Alt+V, Alt+V
314
        \row
315
316
            \li  Split
            \li  Ctrl+E, 2
317
        \row
318
319
            \li  Split side by side
            \li  Ctrl+E, 3
320
        \row
321
322
            \li  Remove all splits
            \li  Ctrl+E, 1
323
        \row
324
325
            \li  Remove current split
            \li  Ctrl+E, 0
326
        \row
327
328
            \li  Select all
            \li  Ctrl+A
329
        \row
330
331
            \li  Go to block end
            \li  Ctrl+]
332
        \row
333
334
            \li  Go to block start
            \li  Ctrl+[
335
        \row
336
337
            \li  Go to block end with selection
            \li  Ctrl+}
338
        \row
339
340
            \li  Go to block start with selection
            \li  Ctrl+{
341
        \row
342
343
            \li  Move current line down
            \li  Ctrl+Shift+Down
344
        \row
345
346
            \li  Move current line up
            \li  Ctrl+Shift+Up
347
        \row
348
349
            \li  Trigger a refactoring action in this scope
            \li  Alt+Enter
350
        \row
351
352
            \li  Rewrap paragraph
            \li  Ctrl+E, R
353
        \row
354
            \li  Select the current block
355
356

               The second press extends the selection to the parent block
357
            \li  Ctrl+U
358
        \row
359
360
            \li  Enable text wrapping
            \li  Ctrl+E, Ctrl+W
361
        \row
362
363
            \li  Toggle comment for selection
            \li  Ctrl+/
364
        \row
365
366
            \li  Visualize whitespace
            \li  Ctrl+E, Ctrl+V
367
        \row
368
369
            \li  Adjust size
            \li  Ctrl+J
370
        \row
371
372
            \li  Lay out in a grid
            \li  Ctrl+G
373
        \row
374
375
            \li  Lay out horizontally
            \li  Ctrl+H
376
        \row
377
378
            \li  Lay out vertically
            \li  Ctrl+L
379
        \row
380
381
            \li  Preview
            \li  Alt+Shift+R
382
        \row
383
384
            \li  Edit signals and slots
            \li  F4
385
        \row
386
387
            \li  Toggle bookmark
            \li  Ctrl+M
388
        \row
389
390
            \li  Go to next bookmark
            \li  Ctrl+.
391
        \row
392
393
            \li  Go to previous bookmark
            \li  Ctrl+,
394
        \row
395
396
            \li  Fetch snippet
            \li  Alt+C, Alt+F
397
        \row
398
399
            \li  Paste snippet
            \li  Alt+C, Alt+P
400
        \row
401
402
            \li  Find usages
            \li  Ctrl+Shift+U
403
        \row
404
            \li  Follow symbol under cursor
405

406
               Works with namespaces, classes, functions, variables, include
407
               statements and macros
408
            \li  F2
409
        \row
410
411
            \li  Rename symbol under cursor
            \li  Ctrl+Shift+R
412
        \row
413
            \li  Switch between function declaration and definition
414
            \li  Shift+F2
415
        \row
416
417
            \li  Open type hierarchy
            \li  Ctrl+Shift+T
418
        \row
419
420
            \li  Switch between header and source file
            \li  F4
421
        \row
422
423
            \li  Turn selected text into lowercase
            \li  Alt+U
424
        \row
425
426
            \li  Turn selected text into uppercase
            \li  Alt+Shift+U
427
        \row
428
429
            \li  Run static checks on JavaScript code to find common problems
            \li  Ctrl+Shift+C
430
        \row
431
432
            \li  Find and replace
            \li  Ctrl+F
433
        \row
434
435
            \li  Find next
            \li  F3
436
        \row
437
438
            \li  Find previous
            \li  Shift+F3
439
        \row
440
441
            \li  Find next occurrence of selected text
            \li  Ctrl+F3
442
        \row
443
444
            \li  Find previous occurrence of selected text
            \li  Ctrl+Shift+F3
445
        \row
446
447
            \li  Replace next
            \li  Ctrl+=
Leena Miettinen's avatar
Leena Miettinen committed
448
        \row
449
450
            \li  Open advanced find
            \li  Ctrl+Shift+F
451
        \row
452
453
            \li  Record a text-editing macro
            \li  Alt+(
454
        \row
455
456
            \li  Stop recording a macro
            \li  Alt+)
457
        \row
458
459
            \li  Play last macro
            \li  Alt+R
460
        \row
461
462
            \li  Show Qt Quick toolbars
            \li  Ctrl+Alt+Space
463
        \row
464
465
            \li  Execute user actions in FakeVim mode
            \li  Alt+V, n, where n is the number of the user action, from 1 to 9
466
467
468
469
470
471
    \endtable

    \section2 Image Viewer Shortcuts

    \table
        \header
472
473
            \li  Action
            \li  Keyboard shortcut
474
        \row
475
476
            \li  Switch to background
            \li  Ctrl+[
477
        \row
478
479
            \li  Switch to outline
            \li  Ctrl+]
480
        \row
481
482
            \li  Zoom in
            \li  Ctrl++
483
        \row
484
485
            \li  Zoom out
            \li  Ctrl+-
486
        \row
487
488
            \li  Fit to screen
            \li  Ctrl+=
489
        \row
490
491
            \li  Original size
            \li  Ctrl+0
492
493
494
495
496
497
    \endtable

    \section2 Qt Quick Designer Keyboard Shortcuts

    \table
        \header
498
499
            \li  Action
            \li  Keyboard shortcut
Leena Miettinen's avatar
Leena Miettinen committed
500
        \row
501
502
            \li  Open the QML file that defines the selected component
            \li  F2
Leena Miettinen's avatar
Leena Miettinen committed
503
        \row
504
505
            \li  Move between code editor and visual editor
            \li  F4
506
        \row
507
508
            \li  Toggle left sidebar
            \li  Ctrl+Alt+0
509
        \row
510
511
            \li  Toggle right sidebar
            \li  Ctrl+Alt+Shift+0
512
513
514
515
516
517
    \endtable

    \section2 Debugging Keyboard Shortcuts

    \table
        \header
518
519
            \li  Action
            \li  Keyboard shortcut
520
        \row
521
522
            \li  Start or continue debugging
            \li  F5
523
        \row
524
525
            \li  Exit debugger
            \li  Shift+F5
526
        \row
527
528
            \li  Step over
            \li  F10
529
        \row
530
531
            \li  Step into
            \li  F11
532
        \row
533
534
            \li  Step out
            \li  Shift+F11
535
        \row
536
537
            \li  Toggle breakpoint
            \li  F9
538
        \row
539
540
            \li  Run to selected function
            \li  Ctrl+F6
541
        \row
542
543
            \li  Run to line
            \li  Ctrl+F10
544
        \row
545
546
            \li  Reverse direction
            \li  F12
547
548
549
550
551
552
    \endtable

    \section2 Project Keyboard Shortcuts

    \table
        \header
553
554
            \li  Action
            \li  Keyboard shortcut
555
        \row
556
557
            \li  Build project
            \li  Ctrl+B
558
        \row
559
560
            \li  Build all
            \li  Ctrl+Shift+B
561
        \row
562
563
            \li  New project
            \li  Ctrl+Shift+N
564
        \row
565
566
            \li  Open project
            \li  Ctrl+Shift+O
567
        \row
568
569
            \li  Select the \l{glossary-buildandrun-kit}{kit} to build and run your project with
            \li  Ctrl+T
570
        \row
571
572
            \li  Run
            \li  Ctrl+R
573
574
575
576
577
578
    \endtable

    \section2 Help Keyboard Shortcuts

    \table
        \header
579
580
            \li  Action
            \li  Keyboard shortcut
581
        \row
582
583
            \li  View context-sensitive help
            \li  F1
584
        \row
585
            \li  Activate contents in \uicontrol Help mode
586
            \li  Ctrl+T
587
        \row
588
            \li  Add bookmark in \uicontrol Help mode
589
            \li  Ctrl+M
590
        \row
591
            \li  Activate index in \uicontrol Help mode
592
            \li  Ctrl+I
593
        \row
594
595
            \li  Reset font size
            \li  Ctrl+0
596
        \row
597
            \li  Activate search in \uicontrol Help mode
598
            \li  Ctrl+S
599
600
601
602
603
604
    \endtable

    \section2 Version Control Keyboard Shortcuts

    \table
        \header
605
606
            \li  {1,2} Action
            \li  {6,1} Version control system
607
        \header
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
            \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
627
            \li  Alt+G, Alt+C
628
629
630
631
632
633
634
            \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
635
            \li  Alt+G, Alt+D
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
            \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
659
            \li  Alt+G, Alt+L
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
            \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
675
            \li  Alt+G, Alt+S
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
            \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
702
703
    \endtable
*/