CNCjs keyboard shortcuts

Back a year or so ago, @Julien described an on-host emulation of a keyboard in order to provide pendant control of the CNCjs UI.

I have taken a look at this general topic and wanted something portable, that would work with RPi, MacOS or Windows hosts, and yet still give the same level of functionality - and add a jog dial to the requirements too. Using an Arduino Leonardo derivative (based on Atmel 32u4 chip) I have created a HID USB device that plugs in using USB and appears as a keyboard to the host, but how it works is entirely under my control and thus implementing jog-dial to key-stroke translations is easy.

The whole thing is working exactly as envisaged, click the ‘X’ button on my pendant and whether CNCjs or C3D CM, the jog dial moves the X-axis left or right. Ditto Y and Z axis.

The one missing part of the puzzle is what official keyboard shortcuts are defined/accessible in CNCjs and CM for zeroing X, Y and Z individually, or all 3? Anyone go any ideas on this?

Once finished, I will upload the enclosure design files, Arduino source code, schematic and PCB layout (KiCAD) for anyone wishing to make something similar.


The CNCjs website has a list of keyboard shortcuts. I don’t recall there being zero commands, but its worth a look.

@Lowbrowroyalty Yes, I’ve looked at them which were very helpful, except that set X/Y/Z zero appears not to be available as a keyboard shortcut. I’ve tried creating custom Commands and Macros that perform G92 zeroing, but cannot invoke them from keyboard shortcuts.
Will keep looking. Thank you for the info

1 Like

Unfortunately CNCjs is light on shortcuts, you can check all those implemented in this source code file

You could either modify CNCjs and rebuild it (did it once, not terribly complicated but not easy either), or use the pendant approach and then you can send the Gcode you want to the machine, including zeroing commands, but that bypasses CNCjs so not great to ensure consistency with the GUI state

CM shortcuts are here (they may have changed in recent builds, not sure)


This topic was automatically closed after 30 days. New replies are no longer allowed.