
523The MATLAB
®
Desktop
thisKey = inputKeys(ii);
thisAction = inputMap.get(thisKey);
accelerators(ii,:) = {char(thisKey), char(thisAction)};
end
accelerators = sortrows(accelerators,1);
catch
% never mind...
end
end % getAccelerators
Menu retrieval was more difcult: while it is possible to directly access the menubar reference
(jMainPane.getRootPane.getMenuBar), the menu items themselves are not visible until their
main menu item is clicked (displayed). The only way I know to access menu actions/keybindings
is to read them from the individual menu items (if anyone knows a better way please tell me —
perhaps some central key-listener repository?). ...