MATLAB: Pan cancels WindowKeyPressFcn callback…

panwindowkeypressfcn

Hi,
I noticed that after using the pan function, WindowKeyPressFcn callback doesn't work anymore…
Example:
function someFunction
Fig = figure('WindowKeyPressFcn', @buttonPressed_Callback);
plot(rand(1,10))
pan on
function buttonPressed_Callback(handle, event)
key = event.Key
end
end
How can I reactivate the WindowKeyPressFcn callback after the pan command?
Thanks,
Razvan

Best Answer

You are correct, pan does have that effect. Please see http://www.mathworks.com/matlabcentral/answers/30563-pan-mode-control-via-keyboard
Related Question