|
|
![]() |
|
|
Cool Things in CODE/400: Keyboard Shortcuts by Scott Mildenberger One of the common complaints I hear from developers about switching from SEU to CODE/400 is that they don't like using the mouse. I, too, find that I can be more productive by just using the keyboard. The solution is to learn keyboard shortcuts for the things you do most often. Below are the shortcuts that I find most useful. I've grouped the tips by category to make them easier to reference.
Cursor Movement How to move the cursor around is very important, especially if you're not used to using the mouse and you find that doing so just slows you down. The arrow keys on the keyboard move the cursor one character or one line at a time. Page Up and Page Down move the source one full screen up or down, at a time. The Home key moves the cursor to the beginning of the current source line, while the End key moves to the end of the current source line. The Tab key allows you to jump the cursor between the fields for the particular spec type the cursor is on. For example, use the Tab key to quickly jump between factor 1, the op code, factor 2, and the Result field in a C-spec, for example. Holding down the Alt key while at the same time pressing the T key will move the cursor to the first line on the screen, handy for viewing more of the source and keeping the current line on the screen. Editing The following shortcuts are great time-savers for anyone using a Windows PC: Ctrl-X (cut), Ctrl-C (copy), and Ctrl-V (paste). If you don't know these shortcuts, learn them immediately; they are your friends. The positioning of these keys on the keyboard makes them very easy to reach, and using them will become second nature over time. They work in almost every application where editing occurs. The only application I run across these days that doesn't support these shortcuts by default is IBM's Client Access PC5250 emulator. These editing shortcuts apply to whatever has been highlighted on the screen. I commonly see people highlighting text by using the mouse, and I wonder why, since it is usually so much easier and more accurate to use the keyboard shortcuts. When you press Shift, any cursor movement key--arrow keys, Page Up or Page Down, Home, End--will highlight the text as you move the cursor. A couple of other shortcuts that relate to editing are Ctrl-Z (undo) and Ctrl-Shift-Z (redo). CODE/400's Undo is one of the great improvements over SEU. The editor saves every change you make in CODE/400 in an internal list. Every time you select Undo (Ctrl-Z), the previous change in the list is undone. You can keep undoing changes as far back in the list as you want, even to the point of returning the source to the exact state it was in when you started the edit session. When you undo a change, it remains in the editor's changes list and you can reapply the changes by choosing the Redo (Ctrl-Shift-Z) function. Thus, you can move back and forth, watching your changes appear and disappear by using Undo and Redo. This comes in handy when you have made a bunch of changes and then realize you don't want what you have just done. Compiling and Saving Compiling from CODE/400 using the Ctrl-Shift-C (no prompt) option is a shortcut that I use a lot. If there are members open that haven't already been saved as you edited them, a dialog box will pop up prompting you to save them before the compile is submitted. If you don't want one of the listed members saved, you can deselect it before pressing Enter. Along the same line as the previous tip is CODE/400's Ctrl-Shift-V (verify with no prompt) shortcut. After the compile, if you get errors, pressing Ctrl-E will bring up the Error List window. You can double-click to see the error in the source; after fixing the error, pressing Ctrl-E again will take you back to the Error List window. Additional Shortcuts Other useful shortcuts are Ctrl-F, Ctrl-O, F9, and F3. Ctrl-F brings up the Find dialog box; Ctrl-O brings up the Open File dialog; F9 switches to the Command Shell window, allowing you to execute a command on your PC or the server; and F3 closes the current window. One last keyboard tip is to use the Alt key to choose menu options. Notice that if you press the Alt key, each menu will have a letter underlined; typing that letter will open that menu item. Typing an underlined letter from one of the menu options will choose that option. At any time while navigating the menu, pressing Alt again will return you to editing mode. We Don't Need No Stinking Mouse The entire list of Code/400 shortcut keys can be obtained from the Help menu's "Keys Help" option. I encourage you to explore the entire list and experiment; you very well may find other keyboard shortcuts that are useful to you. Also, notice that the shortcut keys are listed next to the menu options that they correspond to. So if you find yourself frequently using a menu option, look for a shortcut key that can be used instead. Remember, at first you may not remember the shortcuts, but with a little use the ones you use the most often will be burned into your memory. Scott Mildenberger is a senior programmer/analyst with Washington Corporations in Missoula, MT, who has been working with the AS/400 and iSeries since 1993. Scott spends most of his free time traveling to follow his kid's sports, along with a little golf now and then. He can be reached at smildenber@washcorp.com.
|
Editors
Contact the Editors |
|
Last Updated: 7/18/02 Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved. |