How to submit a grid selection with Enter?

grid.addItemDoubleClickListener() works fine. I would like to enable grids to also submit with enter. How can i do that?

So you want Enter to function as selection key the way Space does?

If so, something like this would be a java-only solution:

            if (e.getItem().isPresent()) {
                focusedPerson = e.getItem().get();
            } else {
                focusedPerson = null;
            if (focusedPerson != null) {
                if (grid.getSelectedItems().contains(focusedPerson)) {
                } else {
        }, Key.ENTER).listenOn(grid);

(where focusedPerson is a Person of course)

Thank you Rolf!