Keyboard and Mouse Shortcuts in the Class Diagram

You can use the keyboard as well as the mouse to perform navigational actions in Class Designer.

Using the Mouse

The following mouse actions are supported in class diagrams:

Mouse Combination

Context

Description

Double-click

Shape elements

Opens the code editor.

 

Shape edges

Invokes Adjust Width command.

 

Lollipop

Expand/collapse lollipop.

 

Lollipop label

Invokes Show Interface command.

 

Compartment header

Expand/collapse shape

Mouse Wheel

Class diagram

Scroll vertically.

SHIFT + Mouse Wheel

Class diagram

Scroll horizontally.

CTRL + Mouse Wheel

Class diagram

Zoom.

CTRL + Shift + click

Class diagram

Zoom.

Using the Keyboard

The following keyboard actions are supported in class diagrams:

Key

Context

Description

Arrow keys

Inside type shapes

Tree-style navigation on shape contents (wrapping around shape is supported). Left and right keys expand/collapse current item if it is expandable and navigate to parent if not (see tree-view navigation for detailed behavior).

 

Top-level shapes

Moving shapes on the diagram.

SHIFT+arrow keys

Inside type shapes

Building continuous selection consisting of shape elements such as members, nested types, or compartments. These shortcuts do not support wrapping around.

HOME

Inside type shapes

Navigate to the top-level shape title.

 

Top-level shapes

Navigate to first shape on the diagram.

END

Inside type shapes

Navigate to last visible element inside the shape.

 

Top-level shapes

Navigate to the last shape on the diagram.

SHIFT+HOME

Inside type shape

Selects elements within the shape starting with the current item and ending with the top-most item on the same shape.

SHIFT+END

Inside type shape

Same as SHIFT+HOME but in top-down direction.

ENTER

All contexts

Invokes default action on the shape which is also available via double-click. In most cases this is View Code but some elements define it differently (lollipops, compartment headers, lollipop labels).

+/-

All contexts

If currently focused element is expandable, these keys expand/collapse the element.

All contexts

On elements with children, this expands the element if it is collapsed and navigates to first child.

All contexts

Navigates to the parent element.

ALT+SHIFT+L

Inside type shapes + on type shapes.

Navigates to the lollipop of currently selected shape if it is present.

ALT+SHIFT+B

Inside type shapes + on type shapes.

If base type list is shown on the type shape and has more than one item, this toggles expansion state of the list (collapse/expand).

DELETE

On type and comment shapes

Invokes Remove from Diagram command.

 

On everything else.

Invokes Delete from Code command (members, parameters, associations, inheritance, lollipop labels).

CTRL+DELETE

All contexts

Invokes Delete from Code command on selection.

TAB

All contexts

Navigates to next child within the same parent (supports wrapping).

SHIFT+TAB

All contexts

Navigates to previous child within the same parent (supports wrapping).

SPACE

All contexts

Toggles selection on the current element.

See Also

Concepts

Keyboard Shortcuts for the Class Details Window

Other Resources

Creating and Configuring Type Members