@meeloo You don't need to use my whole project, you could just look how I implemented the continuous mode in a G code way: via macros and especially the usage of the daemon.g.
If you want to try that (without Arduino etc.), you can prepare the macros like described here:
https://github.com/hurzhurz/Duet-USB-CNC-Pendant/blob/master/doc/ContinuousMode.md#preparation
Then, to command a continuous movement, you have to send this command every 500ms (or more often):
M98 P"pendant-continuous-run.g" A"X" F1000 D1
# for moving the X axis in the positive direction with a feedrate of 1000
If the regularly sending of this command stops, the movement will automatically stop after a short time.
To immediately stop, you can send:
M98 P"pendant-continuous-stop.g"
Again, this not a perfect solution and you will notice a little delay, but I think it is working well enough.