Gscreen - a GTK / Glade / Python based screen

More
12 years 9 months ago #43111 by newbynobi
Replied by newbynobi on topic Gscreen - a GTK / Glade / Python based screen
Halo Chris, halo Jim,

item 1.
could that help?
walk through cells with tab
may be in connection with:
glib connect bevore

item 2 and 3:
This seems to be gmoccapy issues, let me check on that

item 4:
I don't see the need for that at the moment. I have the idea to include in gmoccapy an toll edit dialog, what will also include small icons for the tool, information about cut length and no. of flutes and so on, as some of the information will be needed by shopfloorpro. When I really do that, I may include lathe tool diagrams.

item 5:
Jim: I do not understand what is wrong? All the information is visible and the columns are named accordingly?

item 6 and 7:
I would like that one too, no check boxes, only unique selection and a click on each cell will highlight the row.

Norbert

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

More
12 years 8 months ago #43537 by LAIR82
Hello Guys,

Our third Turning center is up and running now for about 3 weeks, all three using gscreen industrial,

The shop supervisor noticed something on this build that the up, down arrow keys do not work while in edit mode, making it a little interesting trying to make multiple edits to a long program.

Any Ideas? Maybe something on my end?


Thanks Rick

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

More
12 years 8 months ago #43539 by andypugh
Replied by andypugh on topic Gscreen - a GTK / Glade / Python based screen

LAIR82 wrote: The shop supervisor noticed something on this build that the up, down arrow keys do not work while in edit mode, making it a little interesting trying to make multiple edits to a long program.
Any Ideas?


It sounds like the arrows are being captured as jog commands by the GUI rather than being passed on to the system.

At a guess it is something in git.linuxcnc.org/gitweb?p=linuxcnc.git;a...33d76c802143;hb=HEAD
but possibly the generic GladeVCP key-forwarder: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...f9fb95c95731;hb=HEAD

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

More
12 years 8 months ago #43829 by LAIR82
So if I went into this file,

[linuxcnc.git] / src / emc / usr_intf / gscreen / keybindings.py

and modified

45 self.Up = 'YPOS'
46 self.Down = 'YNEG'
47 self.Left = 'XPOS'
48 self.Right = 'XNEG'

to something along the lines of

45 self.Up = 'cursor up'

Would that change the outcome and make the cursor move up, down, left, and right?

Or am I out in left field? ( left field in a different ball diamond probably)

Rick

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

More
12 years 8 months ago #43842 by cmorley
Replied by cmorley on topic Gscreen - a GTK / Glade / Python based screen

LAIR82 wrote: So if I went into this file,

[linuxcnc.git] / src / emc / usr_intf / gscreen / keybindings.py

and modified

45 self.Up = 'YPOS'
46 self.Down = 'YNEG'
47 self.Left = 'XPOS'
48 self.Right = 'XNEG'

to something along the lines of

45 self.Up = 'cursor up'

Would that change the outcome and make the cursor move up, down, left, and right?

Or am I out in left field? ( left field in a different ball diamond probably)

Rick


No.
The self.Up = "YPOS" sets 'Up' (that's the key - the cursor up key) to a binding called YPOS and YPOS calls 'on_keycall_YPOS'
which is a function to move the Y axis in the positive direction.

It's not clear to me what you are trying to do. You want to move a cursor with the cursor keys ? Do you mean the mouse pointer?

Chris M

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

More
12 years 8 months ago - 12 years 8 months ago #43844 by cmorley
Replied by cmorley on topic Gscreen - a GTK / Glade / Python based screen
Sorry I missed the posts above your question.

Andy is right keyboard jogging is stealing the cursor keys.

in Gscreen look for
Code:
def on_key_event(self,widget, event,state): CNTRL = SHIFT = ALT = 0 keyname = gtk.gdk.keyval_name(event.keyval) print("Key %s (%d) was pressed state: %d last: %s" % (keyname, event.keyval,state, self.data.key_event_last)) if event.state & gtk.gdk.CONTROL_MASK: CNTRL = 1 self.verbosely_print("Control was being held down") if event.state & gtk.gdk.MOD1_MASK: ALT = 1 self.verbosely_print("Alt was being held down") if event.state & gtk.gdk.SHIFT_MASK: SHIFT = 1 self.verbosely_print("Shift was being held down") if keyname in( "Shift_L","Shift_R"): return True # ignore shift key press if self.data.key_event_last[0] == keyname and self.data.key_event_last[1] == state : return True self.data.key_event_last = keyname,state try: method = self.keylookup.convert(keyname) if method: try: self.handler_instance[method](state,SHIFT,CNTRL,ALT) return True except: self[method](state,SHIFT,CNTRL,ALT) return True except: self.show_try_errors()

Remove the 'True' after the 'return' (all of them) and test.
Do you use any of the keyboard controls?

Chris M
Last edit: 12 years 8 months ago by cmorley.

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

Time to create page: 0.278 seconds
Powered by Kunena Forum