MATLAB: Re-enable keypress capture in pan or zoom mode

panwindowkeypressfcnzoom

I'm running R2014b, and I inherited some pre-2014b code that used an undocumented feature to re-enable capture of keypress events in either pan or zoom mode:
% This fix re-enables capture of in-window keypresses in pan or zoom mode. It
% makes use of an undocumented MATLAB feature that is broken in R2014b. I am
% still looking for the correct way to do this in R2014b or later.
function window_keypress_panzoom_fix()
if verLessThan('matlab', '8.4')
hManager = uigetmodemanager(figure_handle);
set(hManager.WindowListenerHandles, 'Enable', 'off');
set(figure_handle, 'WindowKeyPressFcn', []);
set(figure_handle, 'KeyPressFcn', @(obj, evt) keypress_cb(obj, evt));
end
end
In R2014b, and maybe earlier, it seems that this fix has been broken by the fact that hManager.WindowListenerHandles, which is an object of class event.proplistener, no longer has any 'set' methods (I think all its properties are now protected).
For R2014b or later, how do I re-enable keypress capture in pan or zoom mode?