Keybinding help

More
10 years 10 months ago #66919 by Shalotek
Keybinding help was created by Shalotek
I have been struggling to find the info for the past week I am tired of reading posts and getting nowhere so i am asking for help

I would like to know how to add a key either in axis and gscreen or gmoccapy
i am making a arduino leonardo pendant to send keystrokes it works fine but i would like added functionality ie
in axis i would like to be able to bind keys to for feed override not jog feed
in gscreen or gmoccapy feed override and select jogmode

I really need simple examples because i am still struggling with linux i can reverse engineer pretty good if i have something to work with but i have not been able to find anything that explains what i want to know

here is a sample from pico USC so maybe i am making sense (ignore that i am asking about a limit switch i would just like to know how to link to a keystroke)


# connect limit/home switch outputs to motion controller
newsig Xminlim bit
newsig Xmaxlim bit
newsig Xhome bit
linksp Xminlim <= ppmc.0.din.01.in (its an example but how would i link a signal like this to a KEYSTROKE)
linksp Xminlim => axis.0.neg-lim-sw-in
linksp Xmaxlim <= ppmc.0.din.02.in
linksp Xmaxlim => axis.0.pos-lim-sw-in
linksp Xhome <= ppmc.0.din.00.in
linksp Xhome => axis.0.home-sw-in


Matthew

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

More
10 years 10 months ago #66932 by BigJohnT

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

More
10 years 10 months ago #66942 by Shalotek
Replied by Shalotek on topic Keybinding help
Ty John
i have read this and finally figured out a bit of it but it is still very confusing

lets say i want ti remove the key-binds for all axis and just use the - and= for jogging that's easy
but if i want to bind feed override to [ and ] well i cant find the list of commands so i know what to add
everything i have tried i get a Tcl error when i start linuxcnc

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

More
10 years 10 months ago #66951 by BigJohnT
Replied by BigJohnT on topic Keybinding help
Hopefully the author of that will chime in, I just knew where it was.

JT

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

More
10 years 10 months ago - 10 years 10 months ago #66956 by Shalotek
Replied by Shalotek on topic Keybinding help
well i got everything working except for one thing now, that is the feed override in axis there are keybinds for Jog speed and angular jog speed in usr/bin/axis under help1 ( , .) jog (<>)ang jog however i cannot find anyway to change these I thought if i could then i could add the code needed to bind the feed override the same as they are
for a little more clarification when i am not using my pendant for jogging i want to turn the wheel to control the feed override
I want the pendant to work as a keyboard not as a hal component that is hard wired
any suggestions?
note(1) I also checked the file usr/share/axis/axis.tcl and didnt find the jog slider keybinds
Last edit: 10 years 10 months ago by Shalotek.

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

More
10 years 10 months ago #66961 by andypugh
Replied by andypugh on topic Keybinding help

mgenton wrote: i am making a arduino leonardo pendant to send keystrokes it works fine but i would like added functionality ie
in axis i would like to be able to bind keys to for feed override not jog feed


Doing this via a key-binding is unlikely to be the best way.
Key-bindings run the risk of sending the key-press event to the wrong window of the LinuxCNC GUI, or to the wrong application altogether.
(For example, you can't keyboard-jog if the mouse pointer is over a GladeVCP tab).
Also, there is no guarantee of a timely response to a GUI keystroke.
Worst case, you send a keydown command, start a jog, move the mouse, release the key and the KeyUp event goes to a different application and the jog doesn't stop.

The things that it sounds like you want to do are better done with HAL pins.
linuxcnc.org/docs/2.7/html/man/man1/halui.1.html

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

Time to create page: 0.085 seconds
Powered by Kunena Forum