X-keys input node, sends changes from the joystick control. Generates a msg.payload with X,Y,Z and delta Z info when the handle is moved. This node is only for the X,Y,Z data from the joystick.
By default this node will send analog events for any joystick on any X-keys connected by the USB. By setting these properties the node will only send events matching the desired criteria.
msg.payload An object that contains the compete information from the input event
msg.payload.device is an abbreviated name of the source device e.g. XK12JOYSTICK which represents the XK-12 Joystick device
msg.payload.pid is the Product ID of the source device e.g. 1065 for the XK-12 Joystick
msg.payload.uid is the Unit ID of the source device, typically 0 from the factory but assignable 0-255 using the xk Set Unit ID node
msg.payload.index is the Controller # which caused the event, default is 0 for devices with only 1 joystick.
msg.payload.x is the X motion, 0 to 127 from center to full right, 0 to -127 from center to full left.
msg.payload.y is the Y motion, 0 to 127 from center to full up, 0 to -127 from center to full down.
msg.payload.z is the Z Position, twist of stick, absolute 0 to 255, rolls over.
msg.payload.delta_z is the integer value of the change of the Z position since last read. Positive =CW, Negtive =CCW
This node is used to get analog changes events from a Joystick on a connected X-keys. The xk button node would be used to get the button events.
The X and Y axis are typical for a joystick. The Z (rotation of stick) is an absolute position; it is static and does not return to zero by a spring as a typical joystick. The delta_z payload compares the current value to the last value and accounts for the zero crossing of the position value.
Several filters can be set in the node’s properties to make the node respond to specific X-keys and/or specific actions. Alternatively, the payload may be passed on to a switch node to branch the flow for each type of action or device.
This node requires the X-keys Server to be installed. X-keys server requires an MQTT broker, which also must be installed.