Download NetBeans!

20060825 Friday August 25, 2006

NetBeans Keyboard Shortcut of the Week (3)

This week's "Keyboard Shortcut of the Week" gets 10 out of 10 in the categories "Obscurity", "Wackiness", and "Hmmm. Not wild about it, but pretty cool anyway."

So, you're in the source view of something that also has a design view. Which, basically, means you're in the source view of the Matisse GUI Builder. Or, possibly, you're in the source view of the web.xml Visual Editor. (Or, I guess, you could even be in the source view of your own MultiView API implementation.) Or you could be in some other source/design combination. And then...

...you press Alt-Shift-Left. (Alternatively, instead of Left, use Right.) And now... you magically find yourself in the design view. Press the same unlikely combination of keys again, and you're back in the source view.

Now, before you say: "That's about as useful as polka dots to a polar bear," step back a second and consider this—the whole point of keyboard shortcuts is to not need to take your hands off the keyboard. Now, how often do you find yourself in the source view of something that also has a design view? Answer: A lot, if you're some kind of GUI programmer, a module programmer, a rich-client application programmer, a J2ME programmer... i.e., anyone using the IDE's visual designers must at some point want to go to the source view. Isn't it a useful thing to be able to switch from the one view to the other view, without needing to move the mouse to toggle the Source/Design buttons?

If, like me, you find the combination Alt-Shift-Left just about as easy as eating a bowl of cornflakes in a hurricane, go to the "Go To" section in the Keymap (in the Options window) and change the "Previous Inner View" mapping to something else. (One reason why this keyboard shortcut is so obscure is probably because it has the obscure name "Previous Inner View".) For one whole week, this keyboard shortcut will have pride of place in the left navigation bar of this blog. Use it—it'll make your life even better than it already is.

Aug 25 2006, 09:01:39 AM PDT Permalink