I start writing a Delphi application this morning to post entries to my blog. While writing the code, I needed to comment a block of code. VS.NET has a key binding for this, Ctrl+K+C to comment and Ctrl+K+U to uncomment, but I wasn't using VS.NET. I was using Delphi, so I searched the help file for a list of key bindings.

Unfortunately I did not find anything in the help file so I googled for the key bindings. And to my surprise I didn't find much there either. A key stroke here and a key stroke there was all I found.

I decided to search the IDE itself for key bindings by looking at menus and using trial and error. I did evenually find the key binding for commenting/uncommenting blocks of code (Ctrl+/) but not before typing up a list of other bindings, many of which are very useful. Here's the list. Hopefully others will find it useful.

Delphi 2005 Key Binding

KeysBindingRemarks
Ctrl+K+I or Ctrl+Shift+IIndent selected text 
Ctrl+K+U or Ctrl+Shift+UUnindent selected text 
Ctrl+Shift+RStart/Stop macro recorder 
Ctrl+Shift+PPlayback macro 
Ctrl+F11Open project 
Shift+F11Add file to project 
Alt+F11Use unit 
Ctrl+SSave file 
Ctrl+Shift+SSave all 
Ctrl+ZUndo 
Ctrl+Shift+ZRedo 
Ctrl+XCut 
Ctrl+CCopy 
Ctrl+VPaste 
Ctrl+DelDelete 
Ctrl+ASelect all 
Ctrl+FFind 
Ctrl+Shift+FFind in files 
Ctrl+RReplace 
F3Search again 
Ctrl+EIncremental search 
Alt+GGo to line number 
Ctrl+Alt+F11View project manager 
Ctrl+Alt+PView tool palette 
F11View object inspector 
Alt+0View window list 
Shift+Alt+F11View structure 
Ctrl+Alt+BView break points 
Ctrl+Alt+SView call stack 
Ctrl+Alt+WView watches 
Ctrl+Alt+LView local variables 
Ctrl+Alt+TView threads 
Ctrl+Alt+CView CPU 
Ctrl+Alt+F11View FPU 
Ctrl+Alt+VView event log 
Ctrl+Alt+MView modules 
Ctrl+F12View unitWorks with active project only
Shift+F12View formWorks with active project only
F12Toggle form/unit 
Ctrl+Shift+ERefactor: Rename 
Ctrl+Shift+VRefactor: Declare variable 
Ctrl+Shift+DRefactor: Declare field 
Ctrl+Shift+MRefactor: Extract method 
Ctrl+Shift+LRefactor: Extract resource string 
Ctrl+Shift+ARefactor: Find unit 
Ctrl+Shift+F11Project options 
Ctrl+F9Compile project 
Shift+F9Build project 
Ctrl+Shift+F9Run without debugging 
F9Run 
F8Step over 
F7Trace into 
Shift+F7Trace to next source line 
F4Run to cursor 
Shift+F8Run until return 
Ctrl+F2Program reset 
Ctrl+F7Evaluate/modify 
Ctrl+F5Add watch at cursor 
F5Toggle breakpoint 
F1Help 
Ctrl+K+n or Ctrl+Shift+nCreate bookmarkwhere n is some number between 0 and 9
Ctrl+nGo to bookmarkwhere n is some number between 0 and 9
Ctrl+K+PPrint selection 
Ctrl+NInsert new line 
Ctrl+O+OInsert compiler options 
Ctrl+K+CCopy|paste selected text 
Ctrl+Shift+JSync edit mode 
Ctrl+K+WWrite selected block to a fileGreat for saving code snippets to a text file
Ctrl+K+RRead block from fileInserts content from a text file
Ctrl+K+FUpper cases sort of 
Ctrl+K+NUpper case selected text 
Ctrl+SpaceCode Completion 
Ctrl+Shift+SpaceCode Parameter Insight 
Ctrl+Shift+K+OToggler gutter sizeSeems to turn off code collapse feature
Ctrl+[left click]Navigate to declarationClick on the token name, i.e., variable, method, etc
Alt+[Up arrow]Navigate to declarationSame as Ctrl+[left click]
Alt+[Left arrow]Return to the previous locationUsed in conjunction with Alt+[Up arrow]
Ctrl+[Up/Down arrow]Scroll page up/downDoes not move the cursor
Ctrl+Shift+GGenerate GUID 
Ctrl+JCode template 
Shift+Alt+[arrow keys]Colum select 
Ctrl+Shift+CComplete class declaration 
Ctrl+TDelete word right of cursor 
Ctrl+Shift+YDelete string right of cursor 
Ctrl+Shift+TAdd to do item 
Ctrl+BackspaceDelete work left of cursor 
Ctrl+F4Close the page 
Ctrl+EnterOpen file at cursor 
Ctrl+/Toggle comments 
Ctrl+Shift+EnterFind reference 

posted by Kirby Turner | 24-Apr-2005 1:09 PM | comments (1)


Thank you.
I fild this table very useful.
;-)

posted by Paolo Gibellini | October 10 04:24 AM

Add Your Comment

Comment:
(No HTML)

Name:
E-mail/Web site:
Your e-mail/web site will not be published on this site. It is optional and will only be used by me should I need to contact you directly.
 
By checking this option, this site will remember your name and e-mail/web site on future visits. Uncheck this option to have the site not remember who you are on future visits.
 
Enter the code shown above:
Copyright © 1999-2008 Kirby Turner.
Site software written by White Peak Software Inc, a provider of custom software and software development coaching.