Glade Panel in Axis blocks arrow keys

More
8 years 9 months ago #105263 by cmorley
looks likethis should do it for master:
Code:
CMD.jog(self.emc.JOG_STOP, 0,0) CMD.jog(self.emc.JOG_STOP, 0,1) CMD.jog(self.emc.JOG_STOP, 0,2)

Chris M

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

More
8 years 8 months ago - 8 years 8 months ago #105342 by +Jan+
Hey Chris,

At this point I am just glade we have made a positive step...


Me too...


I upgraded again to Master, and did some tests, until now I was not able to fix the problem in Master. I had to change again "self.emc" to "linuxcnc". Now I do not get any error message on the Terminal (the print messages are displayed).
Here is my actual xembed code (the interesting parts) I use for Master 2.8.
Code:
#!/usr/bin/env python # vim: sts=4 sw=4 et """ XEmbed helper functions to allow correct embeding inside Axis """ import gtk import linuxcnc CMD = linuxcnc.command() ... def forward_press(w, e, fw): if e.keyval in ignore: return g = fw.get_geometry() fe = gtk2xlib(e, fw, g) if not fe: return fw.send_event(fe) def forward_release(w, e, fw): if e.keyval in ignore: CMD.jog(linuxcnc.JOG_STOP, 0,0) print 'stop0' CMD.jog(linuxcnc.JOG_STOP, 0,1) print 'stop1' CMD.jog(linuxcnc.JOG_STOP, 0,2) print 'stop2' g = fw.get_geometry() fe = gtk2xlib(e, fw, g) if not fe: return g = fw.get_geometry() fe = gtk2xlib(e, fw, g) if not fe: return fw.send_event(fe) window.connect_after("key-press-event", forward_press, fw) window.connect("key-release-event", forward_release, fw) window.add_events(gtk.gdk.KEY_PRESS_MASK) window.add_events(gtk.gdk.KEY_RELEASE_MASK)
Last edit: 8 years 8 months ago by +Jan+.

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

More
8 years 8 months ago #105344 by cmorley
Sorry I did it again...You are right self.emc is wrong.
I'm copying and pasting code from another program.

You are a linuxcnc coder now!

Chris M

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

More
8 years 8 months ago #105355 by +Jan+

You are a linuxcnc coder now!


Haha don`t think so...

ow I do not get any error message on the Terminal (the print messages are displayed).

in my last post means, that I do not get any error on the shell, but the behaviour remains in master 2.8.:dry:

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

More
8 years 8 months ago #105363 by cmorley
try:

CMD.jog(linuxcnc.JOG_STOP, 1,0)
CMD.jog(linuxcnc.JOG_STOP, 1,1)
CMD.jog(linuxcnc.JOG_STOP, 1,2)

Chris M

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

More
8 years 8 months ago #105410 by +Jan+
Thanks, that did the job.
I attach both xembed files, for 2.7 and 2.8, maybe it is helpful for someone.
Best wishes.

Jan

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

Time to create page: 0.070 seconds
Powered by Kunena Forum