It is possible from a plugin to do this, however this can only be done by disabling the keyboard plugin when mach4 loses focus, if the keyboard was enabled when in focus you will not be able to use the mdi panel as the windows event for onFocus will keep enabling the plugin.
Have a look at the function for enable/disable in the startup script, this can be adapted and used within the tabs when choosing between GCode and Mdi screens.
DazTheGas