TrEd can be controlled both using keyboard and mouse. Most keyboard short-cuts relate to the active node, which plays a similar role to that of a cursor in a text editor. Almost all of the basic tree editing operations (such as navigation the active node along the tree, cut-paste operations on the tree, editing node content, etc.) can be achieved both using keyboard and mouse bindings. Custom bindings and commands may be added using macros (see Section 14, “User Macros”). Here is a brief overview of the basic editing operations:
Clicking left or right mouse button on a node activates it.
Double clicking left mouse button on a node invokes
-> command.Double clicking left mouse button on the text of a node's attribute opens a prompt for editing the value of this attribute.
Dragging a node with left mouse button and dropping it on another node cuts the dragged node and its subtree and pastes it on the target node.
Dragging and dropping a node with right mouse button has the same effect as above, but this time, if the tree is too large to fit the window, the window scrolls forward the direction of dragging so that when the dragged node reaches an edge of the window it meets the edge of the tree in that direction at the same time.
Pressing the middle button and moving the mouse pointer while the button is pressed has the same “scrolling effect” described above, but without actually dragging any node.
Cursor keys may be used to activate another node in the structure. Use left/right to activate the nearest left/right brother-node of the active node and up/down to activate the active node's ancestor (parent)/its leftmost son.
Use Shift+left/Shift+right to activate the nearest node on the left/right of the active node within the active node's level.
Tab and Shift+Tab keys activate the next/previous node on the way along the tree structure.
Enter runs the -> command.
To edit the tree structure with keyboard only, use the shortcuts bound to the User-defined menu commands. Most important of those are:
Cuts the whole subtree of the active node and stores it in an iternal clipboard. It may be then pasted as a subtree of any of the remaining nodes with the
command.Pastes the tree saved in an internal clipboard during the last call of the
command as a subtree of the active node.Promts user to enter an ordinal number of a tree and displays the tree.
Displayes the previous tree in the current file. Note that this shorcuts operates on the focused view only, even if button is pressed and all views are tied.
Displayes the next tree in the current file. Note that this shorcuts operates on the focused view only, even if button is pressed and all views are tied.