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
| Keys | Binding | Remarks |
| Ctrl+K+I or Ctrl+Shift+I | Indent selected text | |
| Ctrl+K+U or Ctrl+Shift+U | Unindent selected text | |
| Ctrl+Shift+R | Start/Stop macro recorder | |
| Ctrl+Shift+P | Playback macro | |
| Ctrl+F11 | Open project | |
| Shift+F11 | Add file to project | |
| Alt+F11 | Use unit | |
| Ctrl+S | Save file | |
| Ctrl+Shift+S | Save all | |
| Ctrl+Z | Undo | |
| Ctrl+Shift+Z | Redo | |
| Ctrl+X | Cut | |
| Ctrl+C | Copy | |
| Ctrl+V | Paste | |
| Ctrl+Del | Delete | |
| Ctrl+A | Select all | |
| Ctrl+F | Find | |
| Ctrl+Shift+F | Find in files | |
| Ctrl+R | Replace | |
| F3 | Search again | |
| Ctrl+E | Incremental search | |
| Alt+G | Go to line number | |
| Ctrl+Alt+F11 | View project manager | |
| Ctrl+Alt+P | View tool palette | |
| F11 | View object inspector | |
| Alt+0 | View window list | |
| Shift+Alt+F11 | View structure | |
| Ctrl+Alt+B | View break points | |
| Ctrl+Alt+S | View call stack | |
| Ctrl+Alt+W | View watches | |
| Ctrl+Alt+L | View local variables | |
| Ctrl+Alt+T | View threads | |
| Ctrl+Alt+C | View CPU | |
| Ctrl+Alt+F11 | View FPU | |
| Ctrl+Alt+V | View event log | |
| Ctrl+Alt+M | View modules | |
| Ctrl+F12 | View unit | Works with active project only |
| Shift+F12 | View form | Works with active project only |
| F12 | Toggle form/unit | |
| Ctrl+Shift+E | Refactor: Rename | |
| Ctrl+Shift+V | Refactor: Declare variable | |
| Ctrl+Shift+D | Refactor: Declare field | |
| Ctrl+Shift+M | Refactor: Extract method | |
| Ctrl+Shift+L | Refactor: Extract resource string | |
| Ctrl+Shift+A | Refactor: Find unit | |
| Ctrl+Shift+F11 | Project options | |
| Ctrl+F9 | Compile project | |
| Shift+F9 | Build project | |
| Ctrl+Shift+F9 | Run without debugging | |
| F9 | Run | |
| F8 | Step over | |
| F7 | Trace into | |
| Shift+F7 | Trace to next source line | |
| F4 | Run to cursor | |
| Shift+F8 | Run until return | |
| Ctrl+F2 | Program reset | |
| Ctrl+F7 | Evaluate/modify | |
| Ctrl+F5 | Add watch at cursor | |
| F5 | Toggle breakpoint | |
| F1 | Help | |
| Ctrl+K+n or Ctrl+Shift+n | Create bookmark | where n is some number between 0 and 9 |
| Ctrl+n | Go to bookmark | where n is some number between 0 and 9 |
| Ctrl+K+P | Print selection | |
| Ctrl+N | Insert new line | |
| Ctrl+O+O | Insert compiler options | |
| Ctrl+K+C | Copy|paste selected text | |
| Ctrl+Shift+J | Sync edit mode | |
| Ctrl+K+W | Write selected block to a file | Great for saving code snippets to a text file |
| Ctrl+K+R | Read block from file | Inserts content from a text file |
| Ctrl+K+F | Upper cases sort of | |
| Ctrl+K+N | Upper case selected text | |
| Ctrl+Space | Code Completion | |
| Ctrl+Shift+Space | Code Parameter Insight | |
| Ctrl+Shift+K+O | Toggler gutter size | Seems to turn off code collapse feature |
| Ctrl+[left click] | Navigate to declaration | Click on the token name, i.e., variable, method, etc |
| Alt+[Up arrow] | Navigate to declaration | Same as Ctrl+[left click] |
| Alt+[Left arrow] | Return to the previous location | Used in conjunction with Alt+[Up arrow] |
| Ctrl+[Up/Down arrow] | Scroll page up/down | Does not move the cursor |
| Ctrl+Shift+G | Generate GUID | |
| Ctrl+J | Code template | |
| Shift+Alt+[arrow keys] | Colum select | |
| Ctrl+Shift+C | Complete class declaration | |
| Ctrl+T | Delete word right of cursor | |
| Ctrl+Shift+Y | Delete string right of cursor | |
| Ctrl+Shift+T | Add to do item | |
| Ctrl+Backspace | Delete work left of cursor | |
| Ctrl+F4 | Close the page | |
| Ctrl+Enter | Open file at cursor | |
| Ctrl+/ | Toggle comments | |
| Ctrl+Shift+Enter | Find reference |
Thank you.
I fild this table very useful.
;-)
Add Your Comment
