Keyboard Continuous Jogging not working

I’m new to gSender, so I’m not entirely sure if this is a bug or expected behavior - but from what I can tell in the docs and in the code - continuous jogging should work by holding down the keyboard shortcut (e.g, shift + right_arrow), however I only get step jogging. When using the mouse and clicking and holding the jog buttons on the UI, continuous jogging works fine. I’ve tried a couple different keyboards wondering if it was something with my particular keyboard, but see the same behavior.

I am running gSender 1.4.9 on Debian Linux 12 with XFCE.

Am I missing something on how to get this to work?

Thanks!

I’ve had some idea that this (continuing) problem has something to do with local keyboard key repeat settings. I just haven’t had time to narrow it down.

I was curious about that, so I did try to disable key repeat altogether in the XFCE settings - but unfortunately it didn’t fix anything.

Are there any instructions on how to successfully build the app from GitHub? I was looking at trying to make some tweaks to the keyboard control binding code to help debug this, but couldn’t figure out readily how to build and run it.

I posted the same on a Github issue, but wanted to share here for visibility as well:

I did some more digging here, and while I’m pretty unfamiliar with the code overall I was able to get some additional logging added and found what may be the culprit.

I found that by the time the jog command gets into the GrblController.js “jog:start” handler, the axis character received when using the keyboard shortcuts is lowercase ‘x’, where the axis character when jogging from the UI button is uppercase ‘X’. Looking further below in this handler, all of the math appears to only look for the uppercase versions of the axis characters. By adding a bit of code here to convert ‘x’ to ‘X’, ‘y’ to ‘Y’, and ‘z’ to ‘Z’, the keyboard shortcuts appear to be working as I would expect.

There is almost certainly a better place and way to address this so I’m not submitting a proper PR at this time. I’d be happy to help more where I can to get this into a proper fix release, but will need some guidance.

@@ -1886,6 +1887,22 @@ class GrblController {
                 let unitModal = (units === METRIC_UNITS) ? 'G21' : 'G20';
                 let { $20, $130, $131, $132, $23, $13 } = this.settings.settings;
 
+                //SL
+                log.debug('axes=' + JSON.stringify(axes) + ' $20=' + $20);
+                if (axes.x) {
+                    axes.X = axes.x;
+                    delete axes.x;
+                }
+                if (axes.y) {
+                    axes.Y = axes.y;
+                    delete axes.y;
+                }
+                if (axes.z) {
+                    axes.Z = axes.z;
+                    delete axes.z;
+                }
+
+

Outstanding! :smiley: Perhaps you’ve located the missing part of the problem! :+1:

1 Like