Jogging axis - like joystick, manually moving

I want to do manual movements with octoprint/klipper like moving with a joystick.
It should be possible to CHANGE SPEED immediatly without delay
When pressing the control buttons it is possible to move 0.1/1/10/100 steps.

Is it possible to keep moving as long as the controll button keeps pressed.
thank you in advance for your help


We are talking about client / server communications over an HTTP connection so anything involving timing (i.e. how long has this button been pressed) is going to be very complex (not to mention dangerous for the printer at high rates. Slamming into end stops (or the bed) isn't healthy for the printer).

The various step sizes are there so you can position either quickly or accurately.

I recently built this, which reasonably does what you're suggesting. You might adapt this to almost any sort of joystick device.

                    # -------------------------------------
                    # Left joystick
                    # -------------------------------------
                    tupleLXY =              # Left stick scaled between -1.0 to 1.0 (X, Y)
                    if abs(tupleLXY[0]) > self.iota or abs(tupleLXY[1]) > self.iota:
                        _X = tupleLXY[0]
                        _Y = tupleLXY[1]
                        _X = (_X * self.midX) + self.midX   if _X > 0   else self.midX + (_X * self.midX)
                        _Y = self.midY + (_Y * self.midY)   if _Y > 0   else (_Y * self.midY) + self.midY
              'Left joystick X: ' + str(tupleLXY[0]) + ' Y: ' + str(tupleLXY[1]) + ' [' + str(_X) + '][' + str(_Y) + ']')
                        self.send('G1 X' + str(_X) + ' Y' + str(_Y))

Hello, thank you for your helpful replies! @ b-morgan: The idea to use step sizes for changing speed is great? How can I use step sizes als parameter? I Think it is a fixed input in de config file.
@OutsourcedGuru: Do you think it is (easily) possible to use the plugin with playstation controller?
Thanks a lot!

With a Playstation controller? No. This one requires the interface to the Xbox controller.

Will this work with a wired xbox controller?