October 28, 2018

MATLAB bug: How can I modify the INPUTDLG function to make the "Enter" key synonymous with the "OK" button?

It is quite annoying for the user that with the standard MATLAB input dialog (

) you can not validate your inputs by simply pressing the Enter key and have to click with the mouse on the "OK" button or the only way to close the dialog without using the mouse is to Tab through all of the fields until the OK button is active and then press "Enter".
The question was already asked to MathWorks support. This is the solution provided by MathWorks:
It is not very comfortable, since you have to copy a file into the MATLAB installation uitools subfolder.
Another solution is implemented in the function myinputdlg. This function is standalone and does not require the use of native uitools/private functions.
Besides you can press the "Space" key on the pushbuttons to activate them and the space KeyPress on the figure is not buggy anymore.

Related posts:

No comments:

Post a Comment