GladeVCP hot-keys on widgets

More
07 Oct 2014 18:36 #51841 by Nick
There are Accelerators (aka hot-keys) in Common tab of most widgets. And they work but only in stand alone window.
If we pack GladeVCP panel into axis hot-keys do not work at all.

How to make them work?

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

More
07 Oct 2014 22:54 #51856 by ArcEye
Replied by ArcEye on topic GladeVCP hot-keys on widgets
Hi

I suspect this will be connected with the whole key focus problem when you embed anything into the kludge that is Axis.
I seem to remember it is something to do with Tk/Tcl not conforming to X Window standards for key forwarding.

The gladevcp panels rely upon a handler to pump keystrokes back into Axis when it has focus, or important keys like Escape don't get through.

I likewise wrote Qt vcp panels that functioned perfectly as stand alone entities, but when embedded in Axis, all sorts of issues arose that would have required
a low level key handler module to resolve, simply because Axis child windows do not get key events as they should.
I just gave up embedding in Axis.

So the answer is probably, with great difficulty or not at all.

regards

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

More
07 Oct 2014 23:32 #51859 by Nick
Replied by Nick on topic GladeVCP hot-keys on widgets
bad news...

Don't you know is the situation the with other user interfaces like gmoccapy?

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

More
07 Oct 2014 23:46 - 07 Oct 2014 23:47 #51860 by ArcEye
Replied by ArcEye on topic GladeVCP hot-keys on widgets
I think that gmoccapy is glade based, there is certainly a big glade ui file in the /share folder of the sources and no tcl files.

It should be a better candidate

You will need to ask Norbert or Chris Morley on that one, I don't know much about it

regards
Last edit: 07 Oct 2014 23:47 by ArcEye.

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

More
08 Oct 2014 04:45 #51866 by newbynobi
Hallo Nick,

Gmoccapy does support allready some key events, they are implemented in gmoccapy.py in def on_key_event
You can add here more keys.

Gscreen does even support user configurable key events, if i remember correct.

I am planing to incorporate a separate ini file for user key events, but please do mot ask for a deadline.

I do not know if that can be made working also with embedded glade panels, as the main gui does not know the widgets and only the main window does accept key evenfs, at least as long as they do have the focus.. I will have a look on that in the very far feature....

Norbert

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

More
08 Oct 2014 14:08 #51877 by Nick
Replied by Nick on topic GladeVCP hot-keys on widgets
hmmm one more thing...

Hotkeys do not work even if current widget have focus on it.

For example, panel with button. If we put focus in it we can activate it either by pressing space bar or enter, but it's hotkey still does not work...

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

More
08 Oct 2014 17:18 #51883 by newbynobi
@Nick,

how did you add the hotkey?
Sample code?

Does it work stand allone?

Norbert

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

More
08 Oct 2014 18:43 #51891 by andypugh

There are Accelerators (aka hot-keys) in Common tab of most widgets. And they work but only in stand alone window.
If we pack GladeVCP panel into axis hot-keys do not work at all.
How to make them work?


I have found the opposite problem. When the mouse pointer is in my embedded Glade panel, the Axis keys don't work. I need to move the pointer out of the embedded Glade tab to be able to jog with the keyboard.

I am just living with this at the moment.

There is probably something to be done by changing keyboard_forward() here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...0dde4bf3edaf67c5ce71

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

More
08 Oct 2014 21:06 #51897 by Nick
Replied by Nick on topic GladeVCP hot-keys on widgets

@Nick,

how did you add the hotkey?
Sample code?


Just add "Accelerator" in glade in widget's parameters (Common parameters tab).

Yes it works in a standalone.

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

More
08 Oct 2014 21:09 #51898 by ArcEye
Replied by ArcEye on topic GladeVCP hot-keys on widgets
AndyPugh wrote:

There is probably something to be done by changing keyboard_forward() here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...0dde4bf3edaf67c5ce71


That was the keyboard handler I mentioned earlier, had to be introduced with gladevcp to get embedded panels working safely or nothing got back to Axis

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

Moderators: HansU
Time to create page: 0.095 seconds
Powered by Kunena Forum