Mapping key codes to specific jog rates

More
02 Sep 2025 13:17 #334269 by scsmith1451
Mapping key codes to specific jog rates was created by scsmith1451
Reviewing the documentation, I noticed that there are two functions that can be used to set values associated with key codes, set_rapidrate() and set_feedrate(). Is there a corresponding function to set the jog speed such as set_jograte()?

Please Log in or Create an account to join the conversation.

More
03 Sep 2025 11:47 #334336 by andypugh
Replied by andypugh on topic Mapping key codes to specific jog rates
github.com/LinuxCNC/linuxcnc/blob/master...scripts/axis.py#L194

Suggests that ",", ".", "<", ">" should change jog rate.
But I don't see the keybindings in the code to make that work.

(I don't have a LinuxCNC machine handy right now to test with)

Please Log in or Create an account to join the conversation.

More
06 Sep 2025 21:44 #334566 by scsmith1451
Replied by scsmith1451 on topic Mapping key codes to specific jog rates
Andy;

Some time ago I was poking around my LCNC install and ran across a python file that had default key mappings. Within that file I found the "I/i" key mappings which seem to toggle the current jog rate based on the list established in the ini file. I tried to invoke these key in the AXIS interface, but no change was noticed in the jog speed.

I also noticed that there were keys that were mapped to the functions set_feedrate() and set_rapidrate(). What I would like to do is map the '<' key to a very slow rate, say 1mm, and the '>' key to a very rapid rate, say 100mm. To do this I suspect that I would need a function like set_jograte(). I did notice in the documentation, I believe it is the QtVCP section that there was a set_jograte() function, but it appears to specific to QtVCP. Just hoping there is an equivalent function for GladeVCP.

Regards,

With these two keys, I can use my wireless mini keyboard to jog the laser to the program origin of any job quickly rather than from the normal keyboard which makes it hard to watch the laser and jog simultaneously. 

Please Log in or Create an account to join the conversation.

More
08 Sep 2025 12:29 #334616 by scsmith1451
Replied by scsmith1451 on topic Mapping key codes to specific jog rates
Andy,
I found the document written by John B that describes key remapping.  The file that holds the mappings is /usr/bin/axis. From what I can decipher There isn't a function to set the jog rate to a specific value only the ability to change the jog rate to one of the predefined values in the ini file.

I also found functions in the green screen UI and the qtvcp UI that can change jog speed. Would either of these functions work in the axis UI?

Also, in section 13.4.4 Functions of the documentation is found these functions:

set_jograte (float) - LinuxCNC has no internal concept of jog rate -each GUI has its own. This is not always convenient. This function allows one to set a jog rate for all objects connected to the signal jograte-changed. It defaults to 15. GSTAT.set_jog_rate(10) would set the jog rate to 10 machine-units-per-minute and emit the jograte-chasignal.

get_jograte() (Nothing) - x = GSTAT.get_jograte() would return GSTAT’s current internal jograte (float).

set_jograte_angular (float) -

get_jograte_angular (None) -

set_jog_increment_angular (float, string) -

get_jog_increment_angular (None) - LinuxCNC V2.9.4, 25 Jan 2025 1268 / 1297

set_jog_increments (float, string) -

get_jog_increments (None) -

These sound promising, but have no documentation for their use. Has anyone documented these functions?

Kind Regards
 

Please Log in or Create an account to join the conversation.

More
08 Sep 2025 12:59 #334619 by scsmith1451
Replied by scsmith1451 on topic Mapping key codes to specific jog rates
Sorry to keep updating this thread.  After a lot of reading this morning, I think I have a workable solution by adding two buttons to my gvcp, one for min jog rate and one for max jog rate.

Given this solution, is there a way to logically press these buttons via a mapped keyboard key?

Please Log in or Create an account to join the conversation.

More
09 Sep 2025 13:07 #334693 by andypugh
Replied by andypugh on topic Mapping key codes to specific jog rates
There may be some info here: www.forum.linuxcnc.org/48-gladevcp/28429...-hot-keys-on-widgets

But skimming it doesn't look particularly promising.

Please Log in or Create an account to join the conversation.

More
10 Sep 2025 00:35 #334739 by scsmith1451
Replied by scsmith1451 on topic Mapping key codes to specific jog rates
You are correct, not much there.

Please Log in or Create an account to join the conversation.

Time to create page: 0.125 seconds
Powered by Kunena Forum