Enter key at TextArea doesn't work after adding shortcut listener

I added shortcut listener with KeyCode.Enter to a Table and it works fine. But when I added another shortcut listener with the same key code to TextField, only one of that listeners works. And pressing Enter on TextArea don’t work (cursor don’t move to the next line).
I need at least 4 different shortcut listeners for 4 different components with KeyCode.Enter. What can I do?

I have a feeling that only Panel component can have its own shortcut listener, so if you need 4 shortcut listeners on 1 page, u probably need to create at least 3 Panels.

Thank for advice.
I added ActionHandler to each panels and it works. But problem with TextArea still exists: pressing Enter on TextArea causes handleAction(…) method call. But I need default behavior (move cursor to the next line). Of course, it’s not a problem to handle this case in handleAction(…) method, but it’s not the best solution I think -_-.


one option is to add a FocusListener to your TextField that removes the problematic ActionHandler and add it back on a BlurListener.