M-codes are functions of the PMC. Therefor it would be a fairly easy task to either use spare buttons from the Machine Operators panel (Not MDI /QWERTY key pad), or even to add buttons. Then modify the PMC to activate the functions currently controlled by the M-codes. Using the PMC would also allow any interlocking deemed necessary to prevent accidental activation.
There is also a function called "Software Operators Panel" which could eliminate the need to add buttons. But their operation is limited.