documentationfor yFiles for HTML 3.0.0.1

Resource Keys

Customizing String Resources

Common string resources such as command names, keyboard shortcuts, undo unit names, and UI labels can be customized. The key and value pairs are stored globally in the yfiles.resources variable.

The resources are subdivided into UI cultures. For example, resources for American English should be stored in yfiles.resources["en-US"]. By default, all resources are stored in yfiles.resources["invariant"]. This is also the fallback for all cultures if a specific key is not found.

To customize resources, create a variable with the name of the key and the desired value in the respective resource object. If the resource object is not yet initialized, create it first. The initialization of the yFiles for HTML resources is non-destructive. Custom values stored in yfiles.resources before initializing the yfiles library are not overwritten by defaults. For example, you can customize the key gesture for node grouping by changing the value of the resource key "GroupSelectionKey".

Customizing a Resource
yfiles.resources["invariant"]["GroupSelectionKey"] = "Shift+G";

The customization of a resource has to be done before the commands are initialized, e.g. before the GraphComponent is instantiated.

Resources Defaults

The following table lists the resource defaults stored in yfiles.resources["invariant"] alphabetically.

Resource Defaults
Key Value
AddBend.RedoNameAdd Bend
AddBend.UndoNameRemove Bend
AddLabel.RedoNameAdd Label
AddLabel.UndoNameRemove Label
AddLabelAdd Label
AddLabelKeyShift+F2
AddPort.RedoNameAdd Port
AddPort.UndoNameRemove Port
AdjustGroupNodeSizeAdjust Group Node Size
AdjustGroupNodeSize.RedoNameAdjust Group Node Size
AdjustGroupNodeSize.UndoNameAdjust Group Node Size
AdjustGroupNodeSizeKeyControl+Shift+G
AdjustToSizeConstraints.RedoNameAdjust Node Size
AdjustToSizeConstraints.UndoNameAdjust Node Size
BeginEdgeCreationCreate Edge
CollapseGroupCollapse Group
CollapseGroupKeyAlt+ArrowLeft
CollapseNode.RedoNameCollapse Node
CollapseNode.UndoNameExpand Node
CopyCopy
CopyKeyAction+C;Control+Insert
CreateEdge.RedoNameAdd Edge
CreateEdge.UndoNameRemove Edge
CreateNode.RedoNameAdd Node
CreateNode.UndoNameRemove Node
CreateStripe.RedoNameAdd Stripe
CreateStripe.UndoNameRemove Stripe
CutCut
Cut.RedoNameRedo Cut
Cut.UndoNameUndo Cut
CutKeyAction+X;Shift+Delete
DecreaseZoomZoom Out
DecreaseZoomKeyAction+Subtract
DeleteDelete
DeleteKeyDelete;Backspace
DeleteSelection.RedoNameRedo Delete
DeleteSelection.UndoNameUndo Delete
DeselectAllDeselect All
DeselectAllKeyAction+Shift+A
DeselectItemDeselect Item
DuplicateDuplicate
Duplicate.RedoNameRedo Duplicate
Duplicate.UndoNameUndo Duplicate
DuplicateKeyAction+D
EditLabelEdit Label
EditLabelKeyF2;Enter
EnterGroupEnter Group
EnterGroupKeyAlt+ArrowDown
ExitGroupExit Group
ExitGroupKeyAlt+ArrowUp
ExpandGroupExpand Group
ExpandGroup.RedoNameExpand Group
ExpandGroup.UndoNameCollapse Group
ExpandGroupKeyAlt+ArrowRight
ExtendSelectionDownExtend Selection Down
ExtendSelectionDownKeyShift+ArrowDown
ExtendSelectionHierarchyDownExtend Selection to Child
ExtendSelectionHierarchyDownKeyShift+Ctrl+PageDown
ExtendSelectionHierarchyUpExtend Selection to Parent
ExtendSelectionHierarchyUpKeyShift+Ctrl+PageUp
ExtendSelectionLeftExtend Selection Left
ExtendSelectionLeftKeyShift+ArrowLeft
ExtendSelectionRightExtend Selection Right
ExtendSelectionRightKeyShift+ArrowRight
ExtendSelectionUpExtend Selection Up
ExtendSelectionUpKeyShift+ArrowUp
FitContentFit Content
FitGraphBoundsFit Graph Bounds
FitGraphBoundsKeyAlt+1
GroupSelectionGroup Selection
GroupSelectionKeyAction+G
IncreaseZoomZoom In
IncreaseZoomKeyAction+Add
LowerLower
Lower.RedoNameLower
Lower.UndoNameLower
Move.RedoNameMove Items
Move.UndoNameMove Items
MoveDownMove Down
MoveDownKeyArrowDown
MoveFocusDownMove Focus Down
MoveFocusDownKeyAction+ArrowDown
MoveFocusHierarchyDownMove Focus to Child
MoveFocusHierarchyDownKeyCtrl+PageDown
MoveFocusHierarchyUpMove Focus to Parent
MoveFocusHierarchyUpKeyCtrl+PageUp
MoveFocusLeftMove Focus Left
MoveFocusLeftKeyAction+ArrowLeft
MoveFocusRightMove Focus Right
MoveFocusRightKeyAction+ArrowRight
MoveFocusUpMove Focus Up
MoveFocusUpKeyAction+ArrowUp
MoveHandle.RedoNameMove Handle
MoveHandle.UndoNameMove Handle
MoveHierarchyDownMove to child
MoveHierarchyDownKeyAlt+PageDown
MoveHierarchyUpMove to Parent
MoveHierarchyUpKeyAlt+PageUp
MoveLeftMove Left
MoveLeftKeyArrowLeft
MoveRightMove Right
MoveRightKeyArrowRight
MoveUpMove Up
MoveUpKeyArrowUp
NewNew
NewKeyAction+N
NodeDropInputMode.NodeDropped.RedoNameAdd Node
NodeDropInputMode.NodeDropped.UndoNameRemove Node
PastePaste
Paste.RedoNameRedo Paste
Paste.UndoNameUndo Paste
PasteKeyAction+V;Shift+Insert
RaiseRaise
Raise.RedoNameRaise
Raise.UndoNameRaise
RedoRedo
RedoKeyAction+Y;Action+Shift+Z
RemoveBend.RedoNameRemove Bend
RemoveBend.UndoNameAdd Bend
RemoveEdge.RedoNameRemove Edge
RemoveEdge.UndoNameAdd Edge
RemoveLabel.RedoNameRemove Label
RemoveLabel.UndoNameAdd Label
RemoveNode.RedoNameRemove Node
RemoveNode.UndoNameAdd Node
RemovePort.RedoNameRemove Port
RemovePort.UndoNameAdd Port
RemoveStripe.RedoNameRemove Stripe
RemoveStripe.UndoNameAdd Stripe
ReparentStripe.RedoNameReparent Stripe
ReparentStripe.UndoNameReparent Stripe
ResizeNode.RedoNameResize Node
ResizeNode.UndoNameResize Node
ReverseEdgeReverse Edge
ReverseEdge.RedoNameReverse Edge
ReverseEdge.UndoNameReverse Edge
ReverseEdgeKeyAction+R
ScrollPageDownScroll Page Down
ScrollPageDownKeyPageDown
ScrollPageLeftScroll Page Left
ScrollPageLeftKeyShift+PageUp
ScrollPageRightScroll Page Right
ScrollPageRightKeyShift+PageDown
ScrollPageUpScroll Page Up
ScrollPageUpKeyPageUp
SelectAllSelect All
SelectAllKeyAction+A
SelectItemSelect Item
SetCurrentItemSet Current Item
SetEdgePorts.RedoNameReconnect Edge
SetEdgePorts.UndoNameReconnect Edge
SetEdgeStyle.RedoNameChange Edge Style
SetEdgeStyle.UndoNameChange Edge Style
SetIsGroupNode.RedoNameConvert Back to Normal Node
SetIsGroupNode.UndoNameConvert to Group Node
SetIsNoGroupNode.RedoNameConvert Back to Group Node
SetIsNoGroupNode.UndoNameConvert to Normal Node
SetLabelModelParameter.RedoNameChange Label Position
SetLabelModelParameter.UndoNameChange Label Position
SetLabelStyle.RedoNameChange Label Style
SetLabelStyle.UndoNameChange Label Style
SetLabelText.RedoNameChange Label Text
SetLabelText.UndoNameChange Label Text
SetLocationModelParameter.RedoNameChange Port Location
SetLocationModelParameter.UndoNameChange Port Location
SetNodeStyle.RedoNameChange Node Style
SetNodeStyle.UndoNameChange Node Style
SetParent.RedoNameChange Parent
SetParent.UndoNameChange Parent
SetPortLocationParameter.RedoNameChange Port Location
SetPortLocationParameter.UndoNameChange Port Location
SetPorts.RedoNameReconnect Edge
SetPorts.UndoNameReconnect Edge
SetPortStyle.RedoNameChange Port Style
SetPortStyle.UndoNameChange Port Style
SetPreferredLabelSize.RedoNameChange Preferred Label Size
SetPreferredLabelSize.UndoNameChange Preferred Label Size
SetStripeMinimumSize.RedoNameChange Minimum Stripe Size
SetStripeMinimumSize.UndoNameChange Minimum Stripe Size
SetStripePadding.RedoNameChange Stripe Insets
SetStripePadding.UndoNameChange Stripe Insets
SetStripeSize.RedoNameChange Stripe Size
SetStripeSize.UndoNameChange Stripe Size
SetStripeStyle.RedoNameChange Stripe Style
SetStripeStyle.UndoNameChange Stripe Style
TagChange.RedoNameChange Tag
TagChange.UndoNameChange Tag
ToBackTo Back
ToBack.RedoNameTo Back
ToBack.UndoNameTo Back
ToFrontTo Front
ToFront.RedoNameTo Front
ToFront.UndoNameTo Front
ToggleExpansionStateToggle Expansion State
ToggleExpansionStateKeyAlt+Shift+ArrowLeft;Alt+Shift+ArrowRight
ToggleItemSelectionToggle Selection
ToggleItemSelectionKeyControl+Space
UnavailableUnavailable
UnavailableUnavailable
UndoUndo
UndoKeyAction+Z
UngroupSelectionUngroup Selection
UngroupSelectionKeyAction+U
UpdateContentBoundsUpdate Content Bounds
Zoom 100%Zoom
ZoomKeyAction+0;Alt+0
ZoomToCurrentItemZoom To Current Item
ZoomToCurrentItemKeyAlt+3
ZoomToSelectionZoom To Selected Items
ZoomToSelectionKeyAlt+2

Note that, in the table above, Action+Key defines a hotkey that uses <kbd>Ctrl</kbd> on non-Mac systems and ⌘ on macOS. For more details on keyboard shortcuts, refer to List of Keyboard Shortcuts.

Resources that describe keyboard shortcuts support key values as outlined in KeyboardEvent.key. These values are treated as case-insensitive since modifiers are handled separately.