Replying to [akks]:
Another idea (I cannot find exact ticket but it is not new).
Is it possible to protect all core shortcuts like Alt-A from automatic changing by plugins?
Add some registerCoreShortcut, for example, with higher priority?
When plugin intends explicitly to replace core shortcut, it should also call some special function.
This can prevent many problems...
This is not as easy as you think. JOSM core does not know what shortcuts it has, as they are initialized only, when function is activated. So not all shortcuts are known before the plugins are registered.
The initial shortcut handling had a "remember all shortcuts whenever seen at least once". I disabled that mode, as it would prevent fixing broken shortcuts (the users would get a permanently saved redirect shortcut, which is not changeable by program updates).
If you have a good idea how to work around this problem ...
Probably a timed "remember shortcut whenever seen" which drops the information after a certain unused time and also updates the value, when default changes. I.e. don't store the real final shortcut, but store the information which leads to that shortcut and simply reconstruct all core shortcuts on startup. Ideas and code welcome.
BTW: I deprecated the Shortcut calls passing modifiers as argument. They should be converted to proper usage of GROUPS_ALT1 and ALT2. I will update the table, so that it converts group to corresponding modifier in the list, so it is better human readable in future (when I have time...).
I do not know if this is possible. What do you think?