[josm-dev] Register for keys/shortcuts

Dirk Stöcker openstreetmap at dstoecker.de
Mon May 31 08:43:37 BST 2010


On Sun, 30 May 2010, Matthias Meißer wrote:

> no sry missed your mail.
>
> Your code doesn't work cause in Main (and in every published method) is
> no possibility to
>> .registerActionShortcut(a, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE,
>> 0));
>
> Damn....
> I didn't expected that such an easy thing would make so much trouble :(

The question is, what do you want to do? Why don't you use a JosmAction 
which provides the whole framework required? The code is not designed to 
register keystrokes freely, as this would disable the whole keyboard 
assignment and handling, so it is good, that it is not so easy to register 
custom keys settings without the regular interface.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)


More information about the josm-dev mailing list