It is relatively easy to have a halpin execute the current mdi command in gmoccapy.py:
create the pin:
Code:
pin = self.halcomp.newpin("mdi_execute", hal.HAL_BIT, hal.HAL_IN)
hal_glib.GPin(pin).connect("value_changed", self._mdi_execute)
Create the handler:
Code:
def _mdi_execute(self, pin):
if pin.get() and self.widgets.ntb_button.get_current_page() == _BB_MDI:
mdi_entry = self.widgets.hal_mdihistory.submit()
As mentioned above, you would want to remove all other events in 'hal_mdihistory.py' that currently execute the 'submit()' function (eg. double clicking on an entry):
github.com/LinuxCNC/linuxcnc/blob/master...l_mdihistory.py#L151
GUI development in LinuxCNC has, generally speaking, not been driven by industry standards but by what is convenient and the easiest way forward, which is also what most lower end users want.
Personally I would welcome a GUI that could at least be configured to only allow initiation of physical machine movement through hal pins. This would also remove the possibility to start a tool change by mouse click from the GUI.