|LMB||Use the left mousebutton to select pins to connect, and to drag boxes. You can also drag out a selection box. Hold Ctrl while selecting to keep the current selection.|
|MMB||Drag the pointer while holding the middle mousebutton to pan the patch editing view.|
|Ctrl+MMB||Drag the pointer while holding a control key and the middle mousebutton to zoom the patch editing view in or out.|
|RMB||Holding the right mousebutton and dragging the pointer creates a freehand drawing which occupies the same space as the boxes, so you can quickly annotate parts of your patch or just doodle.|
|X+LMB||Remove a connection. Hold X and point at a connection wire then click the left mousebutton. The wire you are pointing at is highlighted for you.|
|Ctrl+LMB||Enter pin value editing mode. Enter a value from the keyboard and press enter to set it as a constant for the pin. Only valid for input pins.|
|Ctrl+P||Arrange all boxes in the patch into a grid.|
|Ctrl+U||Randomise the gadgets of all selected boxes. Randomisation means selecting a random position for the gadget within it's range.|
|Ctrl+F||Focus view on the selected boxes. The view will zoom in or out to best fit the region covered by the boxes.|
|Ctrl+C||Copy the selected boxes into BoxTool's internal clipboard.|
|Ctrl+V||Paste the boxes in BoxTool's internal clipboard to the location being pointed at. You can copy and paste between patches.|
|Ctrl+D||Delete the selected boxes.|
|Ctrl+A||Select all boxes in the current patch. If all boxes are already selected, then they will all be deselected.|
|Tab||Switch between patch editing and patch viewing. In patch viewing mode, the BoxTool interface is hidden and no patch-altering actions can be taken. Patch viewing mode lets you fully see the result of your work.|
|Alt+X||Disconnect the selected boxes from any not-selected connected boxes. This allows you to quickly disconnect a group of boxes while keeping the connections you want. You save the time of cutting each connection individually.|
|I||Hold I and point at a box to find extra information about it. You will see the ID of the box displayed, which can help if you are editing the BoxTool workspace file in a text editor while running BoxTool.|
|D||Enter freehand drawing removal mode. A circle will be displayed around the pointer. Pressing D more times gives you a bigger circle until you have been through all the available circle sizes and you then leave freehand drawing removal mode. Pressing LMB while in this mode erases any freehand drawings within the circle.|
|F1-F6||The function keys select different patches. You can only view or edit one at a time, but you can copy and paste boxes between patches. Each patch has it's own undo history.|
|Ctrl+S||Save the current state of the workspace. This includes all patches.|
|Ctrl+R||Reload the workspace. Be careful with this, as you will lose all of your undo and redo levels in all patches.|
|Alt+H||Write the current shader to a file. The file's name is generated from the current workspace file, and the index of the current window. It will be found in BoxTool's directory, alongside the executable.|
|BoxToolWorkspace||The root node of any workspace file. Can contain one Preamble and multiple PatchWindows.||current_window_index is the index of the PatchWindow to show on startup.|
|Preamble||Contains shader source code to be prepended to all shaders. This is where utility functions should go.||None.|
|PatchWindow||One of the windows selectable using the function keys. Can contain one Patch.||
show_interface can be either "1" to show the interface or "0" to hide it.
view_min_x is the x co-ordinate in patchspace of the topleft corner of the viewport.
view_min_y is the y co-ordinate in patchspace of the topleft corner of the viewport.
view_max_x is the x co-ordinate in patchspace of the bottomright corner of the viewport.
view_max_y is the y co-ordinate in patchspace of the bottomright corner of the viewport.
last_action_desc is a description for the last action performed on the patch. It's not required for correct operation, but currently appears in files due to an oversight.
|Patch||Can contain multiple Boxes and multiple Pencils.||
allow_edit can be either "1" to allow editing or "0" to disallow it.
pixel_box_num and pixel_box_num0 together identify the pixel box (the final shader output).
auto_arrange_on_load can be either "1" to auto-arrange all boxes into a regular grid or "0" to not do so.
|Box||Can contain one Body, multiple Pins, and multiple Gadgets.||
num and num0 together identify the box uniquely within a patch. If they are omitted, then BoxTool will generate them for you.
label is a string of text to name the box with. It does not need to be unique. Multi-line labels are currently not supported.
selected can be either "1" to indicate that the box is selected or "0" to not do so.
x and y define a position in patchspace where the box's topleft corner is located.
|Body||Contains shader source code for a Box. Pin names must be prepended with an '@'.||None.|
|Pin||Can contain multiple Connections.||
label is a string of text to name the pin with. This string, prepended with an '@', will be replaced by an expression within the enclosing box's body.
input can be either "1" to indicate that this pin is an input or "0" to indicate that it is an output.
value can be specified for use when the pin is not connected. It is usually a number, but can be any valid shader expression.
|Gadget||Does not contain anything.||
label is a string of text to name the gadget with. This string, prepended with an '@', will be replaced by an expression within the enclosing box's body.
range_start is the value the gadget represents when it is in the top setting.
range_end is the value the gadget represents when it is in the bottom setting.
position is the current setting of the gadget, it must be 0, 1, or a number between 0 and 1. A position of 0 puts the gadget in the top setting, and a position of 1 puts the gadget in the bottom setting.
size_x and size_y define the width and height of the area in which the gadget's button can be set.
button_size_x and button_size_y define the width and height of the gadget's button.
|Connection||Does not contain anything.||
box_num and box_num0 together identify which box the enclosing Pin is connected to.
pin_index identifies which pin in the external box the enclosing Pin is connected to.
|Pencil||Can contain multiple P elements.||None.|
|P||A point in a pencil line. All points in a Pencil are joined up by line segments in the sequence they have in the workspace file.||x and y define a position in patchspace.|