Hi,

 

I encounter some strange behaviour in an extension I wrote.

I made a search button respond to the enter key. In Eclipse it responds immediately, but in oXygen a user has to use the enter key twice to make the extension respond.

I did this to make it work:

                  btnSearch.registerKeyboardAction(btnSearch.getActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, false)), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), JComponent.WHEN_IN_FOCUSED_WINDOW);

                  btnSearch.registerKeyboardAction(btnSearch.getActionForKeyStroke(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, true)), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true), JComponent.WHEN_IN_FOCUSED_WINDOW);

                  btnSearch.addActionListener(this);

 

 

What should I do to make it respond immediately in oXygen?

 

Kind regards,

 

Roderik Dernison

 




----------------------------------------------------------
Aan dit bericht kunnen geen rechten worden ontleend.
Het bericht is alleen bestemd voor de geadresseerde.
Indien het bericht niet voor u is bestemd, verzoeken wij
u dit aan ons te melden en het bericht te verwijderen.

This message shall not constitute any obligations.
This message is intended solely for the addressee.
If you have received this message in error, please
inform us and delete the message.
----------------------------------------------------------