GladeVCP hot-keys on widgets
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.
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.
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.
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
Please Log in or Create an account to join the conversation.
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.
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.
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.
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.
@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.
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.