- Posts: 19306
- Thank you received: 0
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 to join the conversation.
[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 to join the conversation.
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 to join the conversation.
Andy is right keyboard jogging is stealing the cursor keys.
in Gscreen look for
Remove the 'True' after the 'return' (all of them) and test.
Do you use any of the keyboard controls?
Chris M
Please Log in to join the conversation.
We don't really use the keyboard for anything other than program editing and changing tool "wear" offsets, lots and lots of tool "wear" offset changes.
But, now that I'm in this deep with it, and have seen these internals, if I change the labeling around for those arrow keys in relation to which axis they jog, in the keybindings.py file will it change which axis jogs? Reason I ask is, I have told the operators of the lathes that the keyboard jog doesn't correlate like it should with the z axis using pg up and pg dwn.
Its always something with me,
Thanks
Rick
Please Log in to join the conversation.
No, as Python is interpreted not compiled.LAIR82 wrote: Since I use a RIP config, do I need to re-compile after I make those changes?
However, you have to make sure that you edited the correct file, you probably have an installed file in /usr/ and a rip file in ~/linuxcnc-dev/
Please Log in to join the conversation.
I will try again and see if maybe I goofed up somewhere,
Do I need to open the file thru the terminal window using sudo?
Rick
Please Log in to join the conversation.
Yes changing those entries around will change the key binding.
Please let me know how they want it for a lathe and I'll fix it properly layer.
Please Log in to join the conversation.
I have it set now as follows to correlate with a back tool slant bed lathe.
arrow left: Z negative
arrow right: Z positive
arrow up: X positive
arrow down: X negative
Thank You guys again for all of the help
Rick
Please Log in to join the conversation.
By editing the preference file on can change the the bindings of the default key calls to any other key.
jogging, increments, power and estop are defined.
Not as handy as on screen selection but I'm pressed for time right now.
Lair82: If you update linuxcnc again this is the way to reset your keybindings. The last hack i had you use won't work after that.
You'll recognize the names and they are under the heading [KEYCODES]
They are case sensitive - type them exactly.
Chris M
Please Log in to join the conversation.
