Key binding

More
4 years 7 months ago #238084 by daiman444
Key binding was created by daiman444
hello colleagues. can someone suggest or share code example how to make hotkeys for gmoccappy ?

Please Log in to join the conversation.

More
4 years 7 months ago #238102 by newbynobi
Replied by newbynobi on topic Key binding
It is done in
Code:
linuxcnc/src/emc/usr_intf/gmoccapy/gmoccapy.py

look for
Code:
def on_key_event(self, widget, event, signal):
 
around line 2936

Norbert

Please Log in to join the conversation.

More
4 years 6 months ago #240223 by mariusl
Replied by mariusl on topic Key binding
Thanks Norbert. I was just going to ask the question.

Regards
Marius


www.bluearccnc.com

Please Log in to join the conversation.

More
4 years 6 months ago #240376 by mariusl
Replied by mariusl on topic Key binding
For interest sake.
At about line 3077 you can add these lines to add keys for the A axis.

        elif keyname == "Page_Down" or keyname == "KP_Page_Down":
            button_name = "z-"
            if signal:
                self._on_btn_jog_pressed(None, button_name, fast)
            else:
                self._on_btn_jog_released(None, button_name)
        elif keyname == "Home" or keyname == "KP_Home":
            button_name = "a+"
            if signal:
                self._on_btn_jog_pressed(None, button_name, fast) 
            else:
                self._on_btn_jog_released(None, button_name)        
        elif keyname == "End" or keyname == "KP_End":
            button_name = "a-"
            if signal:
                self._on_btn_jog_pressed(None, button_name, fast)
            else:
                self._on_btn_jog_released(None, button_name)     
       
 

Regards
Marius


www.bluearccnc.com

Please Log in to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum