Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Ken & Mike on the MATLAB Desktop

August 4th, 2008

The Keys to Moving and Resizing Docked Windows

Have you ever been stuck using a computer without a working mouse or equivalent pointing device? It can be an interesting experience. It’s surprising how much you can do with just the keyboard. For example, on Windows, pressing Alt-Space invokes a menu in the upper left corner of the selected application. Among the choices on this menu are move and resize. If you select one of these you can then use the arrow keys to reposition or resize the application window.

Clearly when a mouse is available most will find dragging to be a preferable way to move or resize a window. Still it’s nice that this feature is available to accommodate those who have inherent difficulty using the mouse.

MATLAB offers a similar keyboard driven mechanism for moving and resizing docked windows. Under the Desktop menu you’ll find Move and Resize options that operate on the currently selected window (if your goal is to avoid using the mouse see Keeping your fingers on the keyboard for information on how to move the selection among docked windows using the keyboard then use the menu mnemonics Alt-d, v and Alt-d, z to initiate move or resize, respectively).

While the primary motivation for including the move and resize options is to accommodate those who have difficulty using the mouse, that doesn’t mean others can’t take advantage this feature. Moving a docked window by dragging can be challenging because there is a hidden, though hopefully intuitive, mapping between the mouse position and the finite set of alternative locations.

When you select the move option the selected window’s location is placed under control of the arrow keys. Each arrow key stroke moves an outline representing the window to a new potential resting location. For example the following screen shots show the outlining of potential locations of the Current Directory window resulting from successive presses of the right arrow key. The sequence of locations is:

  1. Tabbed with the Workspace
  2. To the right of the Workspace
  3. To the left of the Command Window
  4. Tabbed with the Command Window
  5. To the right of the Command Window
  6. To the right of everything
  7. Minimized along the right border
Current Directory Location 1 Current Directory Location 2 Current Directory Location 3
Current Directory Location 4 Current Directory Location 5 Current Directory Location 6
Current Directory Location 7

When the window reaches the location you want, press the Enter key to commit the move. If you decide not to move the window after all, just press the Escape key instead. This can be a very convenient way to explore possible locations without risk of getting your desktop layout into an undesired state.

While key controlled window movement offers some advantages over dragging, there aren’t any obvious advantages to key controlled resize. Still, if you really want to avoid the mouse, feel free.

I don’t recommend moving the mouse around after initiating a move or resize, as the window will follow the mouse as if you were dragging. This shouldn’t cause any problems but it can be a bit disconcerting because the mouse button isn’t down. If you want to move or resize a window using the mouse you might as well forgo the menu options and simply press the mouse button while over its title or border, respectively, and drag.

Leave a Reply


Ken & Mike work on the MATLAB Desktop team.
  • Peter Brady: Hi Ken, Thanks for the heads up on this one but I hope there is a resolution soon. The editor is now...
  • Ken: Hi Ian, Can you be more specific about where you see performance differences? We are aware of some bottlenecks...
  • Ian: More importantly, what are you going to do about the abysmal performance of Matlab on Leopard. Many of my...
  • din: hello…may i know about matlab command(absolute command)….i aready has the prog…but they use...
  • Ken: Hi Rich, We have a bug report on the first issue you mention. As for the Command Window time-stamp format,...
  • Rich Messeder: I have a few comments that I’m trying to find the right place for. One is that when I press the...
  • Steve Eddins: Stephen—You can extend your R2008b Prerelease license by choosing the Help -> Licensing ->...
  • Mike: Stephen, We cannot give an exact date as to when the next version of MATLAB will be released.
  • Stephen Colona: Do you think the new release will come out before the PreRelease expires? Thanks.
  • Mike: Nasir, Thank you for your feedback, it helps us refine the desktop and ultimately make it easier to use....

These postings are the author's and don't necessarily represent the opinions of The MathWorks.

Related Topics