- Posts: 63
- Thank you received: 17
Glade Panel in Axis blocks arrow keys
- +Jan+
- Topic Author
- Offline
- Senior Member
-
i made a glade side Panel for axis which works fine:
Here is my problem:
If you move the mouse into the side panel while moving the machine with the cursor keys, the machine continues moving even if you let go of the key. This can only be stopped by moving the mouse out of the panel and pressing the cursor keys again. Is there a way to avoid this dangerous behaviour?
I attached the whole config (a lot of copy and paste in it :blush: )
Please Log in or Create an account to join the conversation.
- +Jan+
- Topic Author
- Offline
- Senior Member
-
- Posts: 63
- Thank you received: 17
Best Wishes
Jan
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
- Posts: 6803
- Thank you received: 2181
From the manual:
linuxcnc.org/docs/2.7/html/gui/gladevcp....key_handling_in_axis
I can't say if this behavior is new bug or not - I would bet that it is untested by linuxcnc builtin tests..
Are you using version 2.7 or master?
It would be helpful if someone could test 2.6 ,2.7 and master to see if the behavior changed.
Chris M
Please Log in or Create an account to join the conversation.
- +Jan+
- Topic Author
- Offline
- Senior Member
-
- Posts: 63
- Thank you received: 17
I`ve did some further tests:
- Testing the behaviour with standard sample glade configs: Same Problem
- Embedding the glade panel as tab: Same Problem
- Updateding from 2.7.11 to 2.7.12 and then to 2.8 Master: Same Problem
The ESC key works in all configurations.
I`ve found an old topic with about a very similar problem (no solution): forum.linuxcnc.org/48-gladevcp/28429-gla...widgets?limitstart=0
I'm grateful for every idea how this problem could be solved.
Best wishes
Jan
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
- Posts: 6803
- Thank you received: 2181
looks like the keys you want are purposely ignored:
You could try changing this to see what happens.
Probably just want to not ignore the key release...
Chris M
Please Log in or Create an account to join the conversation.
- +Jan+
- Topic Author
- Offline
- Senior Member
-
- Posts: 63
- Thank you received: 17
thanks a lot for this comment.
I found the file (on my machine the path is /usr/lib/pymodules/python2.7/gladevcp) and did some modifications.
I tried to remove the whole ignore section:
This leads to the following behaviour:
- Pushing the arrow key for x+ or x- , moving the mouse into the glade panel and then releasing the arrow key ==> release not detected
- Moving than with the mouse out of the glade panel and hitting the arrow key once again ==> release detected and machine stops
- Pushing x+ or x- arrow key, moving the mouse into the glade panel and then releasing the arrow key ==> RELEASE DETECTED!
- Then pushing the arrow key y+ or y-, moving the mouse into the glade panel and releasing the arrow key ==> release not detected
- Moving than with the mouse out of the glade panel and hitting the arrow key once again ==> release detected and machine stops
- Pushing y+ or y- arrow key, moving the mouse into the glade panel and then releasing the arrow key ==> RELEASE DETECTED!
- But then the release of x+ and x- is not detected anymore... and so on...
- For Z the behaviour is different: If I move the mouse into the glade panel the axis does not stop if I release the page up/down key, but the direction can be inverted while while the mouse is inside the panel (which is not possibile on the other axes).
For easier understanding I recorded the screen and logged the keys:
I do not need to move the axes while the mouse is inside the glade panel, but then the machine has to stop when I move into the glade panel. Any idea to reach this goal?
Best wishes
Jan
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
- Posts: 6803
- Thank you received: 2181
If that is true then you could probably fix this problem by forwarding releases explicitly when linuxcnc is actively jogging.
One could use the python linuxcnc library for this.
But adding the print statements and doing your tests again would be the first step.
Chris M
Please Log in or Create an account to join the conversation.
- +Jan+
- Topic Author
- Offline
- Senior Member
-
- Posts: 63
- Thank you received: 17
here is the result:
The detection seems to work.
If that is true then you could probably fix this problem by forwarding releases explicitly when linuxcnc is actively jogging.
One could use the python linuxcnc library for this.
I`m only good in copy and paste, so I would need some help for this
Thanks in advance
Jan
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
- Posts: 2419
- Thank you received: 2349
I read your problem also.
Is there a way to avoid this dangerous behaviour?
I think you can fix this in glade, in your side panel behavior you can do that i think. In glade look at common / events for example.
I don't know all the item's, but i think it is possible in glade.
In the time of the Axis program design, the programmer's where thinking other way's.
So i think that's why this can happen.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
- Posts: 6803
- Thank you received: 2181
I'll see if I can piece something together for you to try.
Chris M
Please Log in or Create an account to join the conversation.