In this example I've added a "Rapid to Home Position" button to my pyVCP panel. Make sure you understand what the G Codes will do before trying this!
In your .ini file add the following lines: [HALUI] MDI_COMMAND = G0 X0 Y0 Z0
Also, make sure you have the following line in the [HAL] section of your ini file: [HAL] HALUI=halui
In your panel.xml file add the following lines: <button> <halpin>"rapid-to-home"</halpin> <text>"Rapid to Home"</text> <font>('Fixed',16)</font> </button>
In your postgui.hal file add the following lines: # set up the rapid to home button net remote-rapid-to-home halui.mdi-command-00 <= pyvcp.rapid-to-home
Once you test this and understand what it does you can change the input to your pendant by changing the pyvcp reference to your paraport pin.