Keyboard Shortcuts

For most of us, when we type a document or an email we just think about the words and sentences and automagically our minds / fingers translate that into actual keystrokes. We don’t have to think about each individual keypress. This same type of automatic behavior occurs for most people that have used SEU/ PDM for awhile. They become so used to the environment that their mind thinks “compile” and the fingers automatically enter 14 and hit enter.

If I were to switch from using a QWERTY keyboard layout to the Dvorak layout then I would have to retrain my mind / fingers to know where the keys are. A similar change happens when moving from PDM / SEU to the Remote System Explorer (RSE).

Suddenly all the familiar ways of navigating around are changed and the *gasp* mouse needs to be used (which pretty much removes any automatic behavior). Learning (and mastering) the use of keyboard shortcuts with the workbench can start to bring back some of that automatic behavior and efficiencies.

Below are some of the keyboard shortcuts I find indispensable when using the workbench. I’ve broken them down into 3 areas: Universal, Eclipse and RSE.

Universal keyboard shortcuts are those that are generally accepted in any graphical environment including Eclipse:

F1 – Help: Pressing F1 anywhere in the workbench brings up context sensitive help. Prior to 7.0 this was a pop-up window. In 7.0 a new Help view opens and is updated dyanmically based on what you are doing.

F5 – Refresh: Pressing F5 in the Remote Systems View will refresh the currently selected resource. Pressing F5 in the iSeries Table View refresh the view. In 7.0 you can use Ctrl + Shift + F5 to refresh the outline view for ILE RPG and CL.

Arrow keys: Not so much a keyboard shortcut as an alternative for using the mouse. Instead of using the mouse to drill down through your iSeries connection or table view you can use the keyboard (edit note: this originally said “mouse”, I have edited the post to correct it). If you are on an entry that can be expanded (has a plus sign) then use the right arrow key to expand it or the left arrow key to collapse it. If you want to go up or down in the list use the up and down arrow keys. This becomes very powerful when combined with the next 2 shortcuts. I very rarely use the mouse to navigate any tree view anymore (including Windows Explorer).

Just start typing: Whenever you are in a tree view (Remote Systems view, Windows Explorer) if you just start typing then the tree attempts to find an entry that matches. For example, say you just expanded your library, type QRPG and it will position you to the first match (most likely your QRPGLESRC file). Hit the right arrow key to expand it, then type the first part of the member name and hit enter and it opens in the editor. Look ma, no mouse :) If you are in the iSeries Table View and you start typing a position to dialog appears (similar to the position to information in the top right corner of PDM). In the new iSeries Data Table view in 7.0 if you just start typing a dialog appears where you can enter values for key fields to position the table.

Pressing enter: Pressing enter usually invokes the default action for the selected entry. If the entry is a member then it opens in the editor. If the entry is expandable (i.e. a source file) then enter expands / collapses it.

Ctrl + C: Standard shortcut for copy. You can even use this in the Remote Systems view to copy a member and then use Ctrl + V to paste it somewhere else.

Ctrl + V: Standard shortcut for paste. But like copy, not limited to just the editor.

Ctrl + s: Save the editor. Ctrl + Shift + s is save all editors.

Ctrl + Home: Jump to the top of any view or editor.

Ctrl + End: Jump to the bottom of any view or editor.

Eclipse keyboard shortcuts are specific to the Eclipse workbench, but not specific to any single perspective:

Ctrl + m: Maximize / minimize the current view or editor. Very handy when you are in an editor and want to jump to full screen mode. Note: The LPEX editor overrides the behavior of Ctrl + m for some other action so it won’t work for LPEX out of the box. But all keyboard actions in Eclipse are customizable and you can either assign this shortcut to a different key combination or remove the Ctrl + m that LPEX sets. I’ll cover how to do this in a different blog post.

Ctrl + F6: Toggle between open editors. Pressing Ctrl + F6 and letting go jumps you back to the last editor you were using. Pressing Ctrl while pressing F6 multiple times lets you scroll through a list of open editors. An alternative is to press Ctrl + e which pops up a Window listing all the editors. You can close editors from this list or select an editor and hit enter to jump to it.

Ctrl + F7: Same as Ctrl + F6 except for open views.

Ctrl + F8: Same as Ctrl + F6 except for open perspectives. Very handy for jumping between the RSE and debug perspectives.

F12: Jump to editor. This action gives the editor focus. Handy if you are doing something in say the Remote Systems or outline view and want to go back to editing without having to click on the editor.

Ctrl + F4: In V7.0 this closes the current editor. Prior to 7.0 I believe this action was associated to Ctrl + w.

Ctrl + Shift + w: Closes all open editors.

Ctrl + h: This brings up the workbench search window. This window contains all possible searches in the workbench (iSeries, Java, File, etc…). If you click the Customize button at the bottom you can choose to only show the ones you need.

RSE keyboard shortcuts are only valid in the Remote System Explorer perspective:

Ctrl + Shift + a: Open member in editor. This pops up a dialog where you can directly key in the library, file and member name for the member you want to open. Very handy if you know the name of the member but don’t want to have to search for it in the Remote Systems view. In some previous release of WDSC this used to be associated with Ctrl + Shift + i.

Ctrl + Shift + c: Compile without prompting. This is only valid within the LPEX editor.

Ctrl + Shift + v: Verify without prompting. Also only valid within the LPEX editor.

So what keyboard shortcuts are missing? The iSeries table view has a pull down menu (the upside down triangle) that has direct equivalents to the WRKLIBPDM, WRKOBJPDM and WRKMBRPDM actions but the results are shown in the table view. These actions don’t have keyboard shortcuts yet and I don’t think it’s currently possible to assign ones to them. However it should be trivial to add some code to the RSE to allow keyboard shortcuts to be assigned to them (at least I think it should be trivial, I haven’t actually looked at that part of the code yet). In fact, given the Eclipse extension mechanism, anyone should be able to write a few lines of Java code and XML to do just that.

These are just the ones that I find useful in my day to day work. There are many more (so many more that finding a free key combination is becoming a problem and some combinations have multiple actions associated with them depending on the context they are used in). All of these shortcuts are customizable if you would prefer to associate them with different key combinations using the General > Keys (Workbench > Keys in previous releases) preference page. This preference page is much improved in Eclipse 3.2 (and therefore WDSC 7.0 by association). I had intended to cover this also but will save that for a future posting.

And last but not least, the most important keyboard shortcut of all: Ctrl + Shift + L, the keyboard shortcut that brings up a window showing you all the other keyboard shortcuts that are valid in the current context (this is a new feature in Eclipse 3.2).

I’ve been using Eclipse for about 7 years now and I’ve learned 2 new shortcuts while writing this blog entry! Ctrl + Shift + e brings up a handy dialog for working with the open editors and Ctrl + Shift + space brings up the docs for whatever column, keyword, opcode or BIF the cursor is currently on in the LPEX editor.


9 Comments on “Keyboard Shortcuts”

  1. Wilfried Blankertz says:

    Don thanks for the list of shortcuts!
    Some addition to the Universal keyboard shortcuts
    – Ctrl+Arrow keys lets you move the cursor much by positioning it to the beginning of the next word
    – Shift+Arrow key marks the characters. This is the same as moving the mouse and keeping the left button pressed. However, using the shift-> gives you a much better control on how many characters you ar marking. (Usually followed by Ctrl+C or Ctrl+X) plus there are situations, where marking with the mouse does not work (see below).
    – Ctrl+Shft+Arrow combines the above steps by marking entire words.

    Ctrl + C: Standard shortcut for copy:
    There are some situations where Ctrl+C does NOT work, however, a right mouse click does show a Copy option.
    Mostly this happens in views other than an editor.
    One example is the “Verify Connection” dialog. I use the Copy function to remember the missing PTFs, to order them later.
    Also in this situation: Marking the text wit the mouse does NOT work! However, the method described above using Shift+arrow does.

  2. Don Yantzi says:

    Hi Wilfried,

    Thanks for the additions. I use those ones quite a bit too when editing. The whole area of universal editing shortcuts as well as LPEX shortcuts is a big one which I didn’t tackle in this posting. I’ll leave that to someone more qualified in that area than I am.

    – Don

  3. Ron Schmitz says:

    Don,
    Thanks for your posting. You may want to correct this sentence:

    Instead of using the mouse to drill down through your iSeries connection or table view you can use the mouse.

  4. Don Yantzi says:

    Thanks Ron. I’ve corrected it and added a note saying I’ve edited the sentence.

  5. […] Learning how to use the various views, editors and actions together takes time and experience. I’ve been using Eclipse for around 7 years now and I still learn new ways to do things. Recently I came across the Alt + Shift + Q, O shortcut to show the outline view (press Alt + Shift + Q then let go and press O). This is really handy because you can make the outline view a fast view then use this keyboard combination to display it without using the mouse. Use the keyboard to navigate the outline view and press F12 when you are ready to jump back to the editor. This should work for any WDSC editors (LPEX, Java, etc…) This example seems a bit cumbersome at first, but after a couple weeks it becomes automatic. […]

  6. Thierry Bernard says:

    “Just start typing” Is there a preference for that? On my WDSc7 “lite” install, it only matches the first character, so QRP would match QAUOOPT, then a file that starts with R, then a library that starts with P.
    On my “full” install (same PC) it does work. I have compared the preferences but could not find a difference that would seem to matter. Thanks.

  7. Ron Schmitz says:

    One of the beauties of PDM/SEU was that most everything you could do was evident by looking at the screen or pressing F1 in a command area. In contrast, one of my difficulties with WDSc is that it’s features are like buried treasures. Here’s a suggestion:
    I would find it helpful if shortcut keys were listed after their equivalent menu options e.g. the iSeries Objects context menu includes an Open Member option. Could the shortcut (ctl+shift+a) be listed after the option?

  8. Ron Schmitz says:

    Following up my prior response, I see some shortcuts are listed on menus and some aren’t. Why? Compile is an another example where the shortcut is not listed.

    Sometimes shortcuts are easy to remember because the letter corresponds in some way with the action. When that’s not the case, it would be handy to know why the key combination was chosen, e.g. Why ctl+shift+A to open a member in editor?

  9. Don Yantzi says:

    Hi Ron,

    Yes, the best way to learn keyboard shortcuts is to have them appear beside the action. We need to work on cleaning that up so all of them appear there (not just some of them).

    As for how keyboard shortcuts are chosen, we try to pick a meaningful letter, but often that shortcut is already taken by some other function in Eclipse. So we end up with some “arbitrary” shortcuts.

    Hopefully the new Help > Key Assist action (ctrl + shift + L) action will help a bit with discovery. Although we need a similar type of function for LPEX shortcuts.

    – Don


Leave a comment