If a button has any arguments available, they are document below.
Button arguments are always an array of strings, like:
{
"arguments": ["argument 1", "argument 2", "argument 3"]
}
There are several different actions used for navigating between scenes. The difference between these is what happens
when navigating back with backScene.
navigateChange to the selected scene. backScene will return to the previous scene where the
navigation was triggered.
| Argument | Description |
|---|---|
| scene id | The scene to change to |
example
{
"actions": [
{
"action": "navigate",
"event": "up",
"arguments": ["home"]
}
]
}
setSceneChange to the selected scene, clearing all back button history. This can be used to return “home” without allowing a
backScene action afterward
| Argument | Description |
|---|---|
| scene id | The scene to change to |
swapSceneReplace the current scene with the selected scene. backScene will return to the scene before the scene where the
action was triggered. This can be used to apparently change several button states at once invisibly.
| Argument | Description |
|---|---|
| scene id | The scene to change to |
backSceneReturns to the previous scene.
jogJog in the given direction, based on jogDistance
| Argument | Description |
|---|---|
| sign | The direction of motion. One of - or + |
| axis | The axis to move, one of x, y, z, a, b, c |
startSmoothJogStart smooth jogging in the given direction
Based on jogSpeed and the machine.axisSpeeds config. Multiple jog
directions may be active at the same time.
| Argument | Description |
|---|---|
| sign | The direction of motion. One of - or + |
| axis | The axis to move, one of x, y, z, a, b, c |
example
{
"actions": [
{
"action": "startSmoothJog",
"arguments": ["+", "x"]
},
{
"action": "stopSmoothJog",
"arguments": ["+", "x"],
"event": "up"
}
]
}
stopSmoothJogStop smooth jogging in the given direction.
| Argument | Description |
|---|---|
| sign | The direction of motion. One of - or + |
| axis | The axis to move, one of x, y, z, a, b, c |
jogDistanceChange the current jog distance, which affects future jog distances.
| Argument | Description |
|---|---|
| sign | Whether to increase or decrease the current jog distance. One of - or + |
jogSpeedChange the current smooth jog speed, which affects future smoothjog speeds.
| Argument | Description |
|---|---|
| sign | Whether to increase or decrease the current smooth jog speed. One of - or + |
brightnessChange the current screen brightness. Stream Deck only
fullscreenToggle fullscreen web only
increaseFeedrateIncrease the feedrate override based on feedrate interval
decreaseFeedrateDecrease the feedrate override based on feedrate interval
toggleFeedrateIntervalToggle how much the feedrate is changed by the feedrate action, either 1% or 10%.
resetFeedrateReset the feedrate override to 100%
increaseSpindleIncrease the spindle speed override based on the spindle interval
decreaseSpindleIncrease the spindle speed override based on the spindle interval
toggleSpindleIntervalToggle how much the spindle speed is changed by the spindle action, either 1% or 10%.
resetSpindleReset the spindle speed override to 100%
setRapidsChange the rapid speed override
| Argument | Description |
|---|---|
| speed | The new rapid speed. One of [25, 50, 100] |
enterSpindleSpeedOpens the special numpad scene for the selected axis. When a number has been entered and confirmed with the
completeInput action, the spindle rotation will be set to the selected value and configured
direction using M3 or M4 gcode.
| Argument | Description |
|---|---|
| direction | The direction of motion for the selected spindle speed, one of CW, CCW |
User flags are arbitrary, temporary variables that can be displayed as dynamic text in buttons, or used as conditions for changing a button’s visibility or enabled/disabled status. They can be set, removed, or toggled.
These variables are not persisted, and will be reset when the page is reloaded, or when the Stream Deck process is restarted.
setUserFlagAssociate an arbitrary name with a string value
| Argument | Description |
|---|---|
| key | A name to associate with a string value |
| value | The value to save in the above key |
clearUserFlagRemove an existing user flag
| Argument | Description |
|---|---|
| key | The user flag name to remove |
toggleUserFlagToggle a user flag.
The user flag does not need to exist before toggling. It will be set to true on the first toggle
| Argument | Description |
|---|---|
| key | The user flag name to remove |
inputAdds one or more characters to the end of the current numeric input
| Argument | Description |
|---|---|
| value | The string to append to the current input value |
inputCommandInput commands modify the current input value.
| Argument | Description |
|---|---|
| command | The operation to take on the current value. One of: [backspace, toggleSign] |
Commands:
toggleSign: Flip the current input value from positive to negative, or negative to positivebackspace: Remove the last character from the end of the current input valuecompleteInputSave the current value and return to the previous scene
absoluteMachinePositionMove to a specific position, relative to the machine zero position.
Accepts a single string which will be used as arguments to a G53 G0 move.
| Argument | Description |
|---|---|
| position | New position |
example
{
"actions": [
{
"action": "absoluteMachinePosition",
"arguments": ["X-100 Y-20"]
}
]
}
absoluteWorkPositionMove to a specific position, relative to the current work zero position.
Accepts a single string which will be used as arguments to a G0 move.
| Argument | Description |
|---|---|
| position | New position |
example
{
"actions": [
{
"action": "absoluteWorkPosition",
"arguments": ["X10 Y20 A5"]
}
]
}
gotoMove to a specific absolute machine position on one or more axes.
When an argument is given as a percentage (ex: "25%"), the position will be calculated based on machine dimensions.
Previously, goto also supported non-percentage movement. However, this has been deprecated in favor of
absoluteMachinePosition and
absoluteWorkPosition, and the previous functionality will be removed in a later
version.
| Argument | Description |
|---|---|
| X position | X axis position to move to |
| Y position | Y axis position to move to |
| Z position | Z axis position to move to |
| A position | A axis position to move to |
| B position | B axis position to move to |
| C position | C axis position to move to |
example
In the below example, the machine will be moved to 10% of the maximum Y range, 30 Z, and 50% of the maximum C axis range.
{
"actions": [
{
"action": "goto",
"arguments": [null, "10%", 30, null, null, "50%"]
}
]
}
homingHome all axes
enterPositionOpens the special numpad scene for the selected axis. When a number has been entered and confirmed with the
completeInput action, the machine will be moved to selected position on the axis.
| Argument | Description |
|---|---|
| axis | The axis to move, one of x, y, z, a, b, c |
enterWcsOpens the special numpad scene for the selected axis. When a number has been entered and confirmed with the
completeInput action, the selected axis’s work coordinate offset will be changed to the
selected value
| Argument | Description |
|---|---|
| axis | The axis to move, one of x, y, z, a, b, c |
refreshWatchFolderRefresh the cncjs watch folder and open the file list
sortDetailsChange the sort order of the file list
| Argument | Description |
|---|---|
| sort order | The new sorting order. One of alpha_asc, alpha_desc, created_desc, modified_desc |
clearGcodeClears cncjs’s loaded gcode, if a gcode file has been loaded
gcodeRun arbitrary gcode
| Argument | Description |
|---|---|
| gcode | Gcode to run |
macroRun a cncjs macro. Macros run from this pendant do not currently have access to some cncjs variables,
like [ymin] and [xmax]. Macros which require these should not be used.
Macros can either be identified by their UUID using the first argument, or (less efficiently) by their exact name, using the second argument.
If the first argument (the UUID) is not provided, the second one (the name) must be instead, and vice-versa.
| Argument | Description |
|---|---|
| macro id | The UUID of the macro to run. |
| macro name | The name of the macro to run. |
example
{
"actions": [
{
"action": "macro",
"arguments": [null, "My Macro"]
}
]
}
outlineParses the currently loaded gcode and jogs around its perimeter.
Limitations: gcode parsing and perimeter building is not 100% accurate. Some types of arcs (like those on 3 planes), may not be processed, resulting in straight line paths between their outermost points. All other arcs will be split into small straight line movements which can be misleading for small curves.
loadDetailFileUsed on the file details scene to load the gcode file being inspected. Not usable outside of this scenario.
commandRun a cncjs custom command. Commands are defined in the cncjs interface in Settings > Commands.
Commands can either be identified by their UUID using the first argument, or (less efficiently) by their exact title,
using the second argument. The UUID can be found in your .cncrc config file.
If the first argument (the UUID) is not provided, the second one (the title) must be instead, and vice-versa.
| Argument | Description |
|---|---|
| command id | The UUID of the command to run |
| command title | The title of the command to run |
example
{
"actions": [
{
"action": "command",
"arguments": [null, "My Restart Command"]
}
]
}
These actions relate to the current feed and run state
connectIf disconnected, connect will attempt to open the serial port using the cncjs`
serial configuration.
runStart running the loaded gcode
stopStop running the current gcode job
pausePause the currently running gcode job
holdFeed hold. Decelerate axes and pause the current job
unholdCycle start. Resume cutting after a feed hold
resetSoft reset the controller, maintaining machine position.
unlockIssue an Alarm Unlock command
stopFeedStop cncjs’s feeder queue
startFeedStart cncjs’s feeder queue if stopped