Why does the KeyPressFcn property of a figure not work in MATLAB for the MAC?
When I create a figure in MATLAB with a uicontrol on it and specify a KeyPressFcn callback, the callback does not execute consistently. For example if I use the following code:
figureset(gcf,'KeyPress','disp(''Hello'')')uicontrol('Style','text')
The KeyPressFcn callback fails to respond consistently. More specifically, when I press the arrow
keys, it will only capture the first key press and ignore subsequent keypresses until I click on the figure again.
Best Answer