creator-keyboard-shortcuts.qdoc 17 KB
Newer Older
1
2
3
4
/****************************************************************************
**
** This file is part of Qt Creator
**
5
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
6
**
Eike Ziller's avatar
Eike Ziller committed
7
** Contact: http://www.qt-project.org/
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
**
**
** 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 index.html
    \previouspage creator-cli.html
    \page creator-keyboard-shortcuts.html
30
    \nextpage creator-editor-external.html
31
32
33
34
35
36

    \title Keyboard Shortcuts

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

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

    \image qtcreator-keyboard-shortcuts.png

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

57
58
59
60
61
62
63
64
    \section1 Configuring Keyboard Shortcuts

    To customize a keyboard shortcut:

    \list 1

        \o  Select \gui Tools > \gui Options > \gui Environment > \gui Keyboard.

65
        \o  Select a command from the list.
66
67

        \o  In \gui{Key Sequence} enter the shortcut key you want to associate
68
69
70
            with the selected command.

        \o  To revert to the default shortcut, select \gui Reset.
71
72
73
74
75
76
77
78

    \endlist

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

    \list

        \o  To import a keyboard shortcut mapping scheme, click \gui Import
79
            and select the .kms file containing the keyboard shortcut mapping scheme
80
81
82
83
            you want to import.

        \o  To export the current keyboard shortcut mapping scheme, click
            \gui Export and select the location where you want to save the
84
            exported .kms file.
85
86
87
88
89
90
91
92
93
94
95
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
            \o Action
            \o Keyboard shortcut
        \row
            \o Open file or project
            \o Ctrl+O
        \row
            \o New file or project
            \o Ctrl+N
        \row
            \o Open in external editor
            \o Alt+V, Alt+I
108
109
110
111
112
113
        \row
            \o Select all
            \o Ctrl+A
        \row
            \o Delete
            \o Del
114
115
116
117
118
119
120
121
122
123
124
125
        \row
            \o Cut
            \o Ctrl+X
        \row
            \o Copy
            \o Ctrl+C
        \row
            \o Paste
            \o Ctrl+V
        \row
            \o Redo
            \o Ctrl+Y
126
127
128
        \row
            \o Print
            \o Ctrl+P
129
130
131
132
133
        \row
            \o Save
            \o Ctrl+S
        \row
            \o Save all
134
            \o Ctrl+Shift+S
135
136
137
138
139
140
        \row
            \o Close window
            \o Ctrl+W
        \row
            \o Close all
            \o Ctrl+Shift+W
141
142
143
        \row
            \o Close current file
            \o Ctrl+F4
144
145
146
147
148
149
150
151
152
153
154
155
156
        \row
            \o Go back
            \o Alt+Left
        \row
            \o Go forward
            \o Alt+Right
        \row
            \o Go to line
            \o Ctrl+L
        \row
            \o Next open document in history
            \o Ctrl+Shift+Tab
        \row
157
            \o Go to other split
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
            \o Ctrl+E, O
        \row
            \o Previous open document in history
            \o Ctrl+Tab
        \row
            \o Activate \gui Locator
            \o Ctrl+K
        \row
            \o Switch to \gui Welcome mode
            \o Ctrl+1
        \row
            \o Switch to \gui Edit mode
            \o Ctrl+2
        \row
            \o Switch to \gui Design mode
            \o Ctrl+3
        \row
            \o Switch to \gui Debug mode
            \o Ctrl+4
        \row
            \o Switch to \gui Projects mode
            \o Ctrl+5
        \row
Leena Miettinen's avatar
Leena Miettinen committed
181
            \o Switch to \gui Analyze mode
182
            \o Ctrl+6
Leena Miettinen's avatar
Leena Miettinen committed
183
184
185
        \row
            \o Switch to \gui Help mode
            \o Ctrl+7
186
        \row
Leena Miettinen's avatar
Leena Miettinen committed
187
            \o Toggle \gui{Issues} pane
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
            \o Alt+1 (Cmd+1 on Mac OS X)
        \row
            \o Toggle \gui{Search Results} pane
            \o Alt+2 (Cmd+2 on Mac OS X)
        \row
            \o Toggle \gui{Application Output} pane
            \o Alt+3 (Cmd+3 on Mac OS X)
        \row
            \o Toggle \gui{Compile Output} pane
            \o Alt+4 (Cmd+4 on Mac OS X)
        \row
            \o Activate \gui Bookmarks pane
            \o Alt+M
        \row
            \o Activate \gui{File System} pane
            \o Alt+Y
        \row
            \o Activate \gui{Open Documents} pane
            \o Alt+O
207
208
209
210
211
212
213
214
215
        \row
            \o Maximize output panes
            \o Alt+9
        \row
            \o Move to next item in output panes
            \o F6
        \row
            \o Move to previous item in output panes
            \o Shift+F6
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
        \row
            \o Activate \gui Projects pane
            \o Alt+X
        \row
            \o Full screen
            \o Ctrl+Shift+F11
        \row
            \o Toggle the sidebar
            \o Alt+0 (Cmd+0 on Mac OS X)
        \row
            \o Undo
            \o Ctrl+Z
        \row
            \o Move to \gui Edit mode

               In \gui Edit mode:
               \list
                \o The first press moves focus to the editor
                \o The second press closes secondary windows
               \endlist
            \o Esc
237
238
239
        \row
            \o Exit \QC
            \o Ctrl+Q
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
    \endtable

    \section2 Editing Keyboard Shortcuts

    \table
        \header
            \o Action
            \o Keyboard shortcut
        \row
            \o Auto-indent selection
            \o Ctrl+I
        \row
            \o Collapse
            \o Ctrl+<
        \row
            \o Expand
            \o Ctrl+>
        \row
            \o Trigger a completion in this scope
            \o Ctrl+Space
260
261
262
        \row
            \o Copy line
            \o Ctrl+Ins
263
264
265
266
267
268
        \row
            \o Copy line down
            \o Ctrl+Alt+Down
        \row
            \o Copy line up
            \o Ctrl+Alt+Up
269
270
271
272
273
        \row
            \o Paste from the clipboard history
            \o Ctrl+Shift+V

               Subsequent presses move you back in the history
274
275
276
277
278
279
        \row
            \o Cut line
            \o Shift+Del
        \row
            \o Join lines
            \o Ctrl+J
280
281
        \row
            \o Insert line above current line
282
            \o Ctrl+Shift+Enter
283
284
        \row
            \o Insert line below current line
285
            \o Ctrl+Enter
286
287
288
289
290
291
        \row
            \o Decrease font size
            \o Ctrl+- (Ctrl+Roll mouse wheel down)
        \row
            \o Increase font size
            \o Ctrl++ (Ctrl+Roll mouse wheel up)
292
293
294
        \row
            \o Reset font size
            \o Ctrl+0
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
        \row
            \o Toggle Vim-style editing
            \o Alt+V, Alt+V
        \row
            \o Split
            \o Ctrl+E, 2
        \row
            \o Split side by side
            \o Ctrl+E, 3
        \row
            \o Remove all splits
            \o Ctrl+E, 1
        \row
            \o Remove current split
            \o Ctrl+E, 0
        \row
            \o Select all
            \o Ctrl+A
        \row
            \o Go to block end
            \o Ctrl+]
        \row
            \o Go to block start
            \o Ctrl+[
        \row
            \o Go to block end with selection
            \o Ctrl+}
        \row
            \o Go to block start with selection
            \o Ctrl+{
        \row
            \o Move current line down
            \o Ctrl+Shift+Down
        \row
            \o Move current line up
            \o Ctrl+Shift+Up
        \row
332
            \o Trigger a refactoring action in this scope
333
            \o Alt+Enter
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
        \row
            \o Rewrap paragraph
            \o Ctrl+E, R
        \row
            \o Select the current block

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

               Works with namespaces, classes, methods, variables, include
               statements and macros
            \o F2
        \row
            \o Rename symbol under cursor
            \o Ctrl+Shift+R
        \row
            \o Switch between method declaration and definition
            \o Shift+F2
        \row
            \o Open type hierarchy
            \o Ctrl+Shift+T
        \row
            \o Switch between header and source file
            \o F4
        \row
            \o Turn selected text into lowercase
            \o Alt+U
        \row
            \o Turn selected text into uppercase
            \o Alt+Shift+U
411
412
413
        \row
            \o Run static checks on JavaScript code to find common problems
            \o Ctrl+Shift+C
414
415
416
417
418
419
420
421
422
        \row
            \o Find and replace
            \o Ctrl+F
        \row
            \o Find next
            \o F3
        \row
            \o Find previous
            \o Shift+F3
423
424
425
426
427
428
        \row
            \o Find next occurence of selected text
            \o Ctrl+F3
        \row
            \o Find previous occurence of selected text
            \o Ctrl+Shift+F3
429
430
431
        \row
            \o Replace next
            \o Ctrl+=
Leena Miettinen's avatar
Leena Miettinen committed
432
433
434
        \row
            \o Open advanced find
            \o Ctrl+Shift+F
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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
        \row
            \o Record a text-editing macro
            \o Alt+(
        \row
            \o Stop recording a macro
            \o Alt+)
        \row
            \o Play last macro
            \o Alt+R
        \row
            \o Show Qt Quick toolbars
            \o Ctrl+Alt+Space
        \row
            \o Execute user actions in FakeVim mode
            \o Alt+V, n, where n is the number of the user action, from 1 to 9
    \endtable

    \section2 Image Viewer Shortcuts

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

    \section2 Qt Quick Designer Keyboard Shortcuts

    \table
        \header
            \o Action
            \o Keyboard shortcut
Leena Miettinen's avatar
Leena Miettinen committed
484
485
486
487
488
489
        \row
            \o Open the QML file that defines the selected component
            \o F2
        \row
            \o Move between code editor and visual editor
            \o F4
490
491
492
493
494
495
        \row
            \o Toggle left sidebar
            \o Ctrl+Alt+0
        \row
            \o Toggle right sidebar
            \o Ctrl+Alt+Shift+0
496
497
498
499
500
501
502
503
504
    \endtable

    \section2 Debugging Keyboard Shortcuts

    \table
        \header
            \o Action
            \o Keyboard shortcut
        \row
505
            \o Start or continue debugging
506
507
            \o F5
        \row
508
            \o Exit debugger
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
            \o Shift+F5
        \row
            \o Step over
            \o F10
        \row
            \o Step into
            \o F11
        \row
            \o Step out
            \o Shift+F11
        \row
            \o Toggle breakpoint
            \o F9
        \row
            \o Run to selected function
            \o Ctrl+F6
525
526
527
        \row
            \o Run to line
            \o Ctrl+F10
528
529
530
        \row
            \o Reverse direction
            \o F12
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
    \endtable

    \section2 Project Keyboard Shortcuts

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

    \section2 Help Keyboard Shortcuts

    \table
        \header
            \o Action
            \o Keyboard shortcut
        \row
            \o View context-sensitive help
            \o F1
        \row
            \o Activate contents in \gui Help mode
            \o Ctrl+T
        \row
            \o Add bookmark in \gui Help mode
            \o Ctrl+M
        \row
            \o Activate index in \gui Help mode
            \o Ctrl+I
        \row
578
            \o Reset font size
579
580
581
582
583
584
585
586
587
588
589
            \o Ctrl+0
        \row
            \o Activate search in \gui Help mode
            \o Ctrl+S
    \endtable

    \section2 Version Control Keyboard Shortcuts

    \table
        \header
            \o {1,2} Action
590
            \o {6,1} Version control system
591
        \header
592
            \o Bazaar
593
594
            \o CVS
            \o Git
595
            \o Mercurial
596
597
598
599
            \o Perforce
            \o Subversion
        \row
            \o Add
600
            \o
601
602
603
            \o Alt+C, Alt+A
            \o Alt+G, Alt+A
            \o
604
            \o Alt+P, Alt+A
605
606
            \o Alt+S, Alt+A
        \row
607
608
            \o Commit/Submit
            \o Alt+Z, Alt+C
609
610
611
            \o Alt+C, Alt+C
            \o Alt+G, Alt+C
            \o Alt+H, Alt+C
612
613
            \o Alt+P, Alt+S
            \o Alt+S, Alt+C
614
615
        \row
            \o Diff
616
            \o Alt+Z, Alt+D
617
618
            \o Alt+C, Alt+D
            \o Alt+G, Alt+D
619
            \o Alt+H, Alt+D
620
621
622
623
624
            \o
            \o Alt+S, Alt+D
        \row
            \o Diff project
            \o
625
            \o
626
627
            \o Alt+G, Alt+Shift+D
            \o
628
            \o Alt+P, Alt+D
629
630
            \o
        \row
631
632
            \o Blame/Annotate
            \o
633
634
635
636
637
638
            \o
            \o Alt+G, Alt+B
            \o
            \o
            \o
        \row
639
640
            \o Log/Filelog
            \o Alt+Z, Alt+L
641
642
            \o
            \o Alt+G, Alt+L
643
            \o Alt+H, Alt+L
644
645
646
647
648
            \o Alt+P, Alt+F
            \o
        \row
            \o Log project
            \o
649
            \o
650
651
652
653
654
655
            \o Alt+G, Alt+K
            \o
            \o
            \o
        \row
            \o Status
656
            \o Alt+Z, Alt+S
657
658
659
660
661
662
            \o
            \o
            \o Alt+H, Alt+S
            \o
            \o
        \row
663
            \o Undo changes/Revert
664
665
            \o
            \o
666
667
668
            \o Alt+G, Alt+U
            \o
            \o Alt+P, Alt+R
669
670
671
672
673
674
675
            \o
        \row
            \o Edit
            \o
            \o
            \o
            \o
676
            \o Alt+P, Alt+E
677
678
            \o
        \row
679
            \o Opened
680
681
682
683
            \o
            \o
            \o
            \o
684
            \o Alt+P, Alt+O
685
686
687
            \o
    \endtable
*/