Shortcuts in RadioButtonGroup

Can anyone tell me if it is possible to add a shortcut listener to the RadioButtonGroup.

Yes: Keyboard Shortcuts | Creating UI | Vaadin Docs

I have seen these solutions before posting to discord, but for the radio button it doesn’t work.

It really doesn’t work or you didn’t figure out how to use it?

Quickly tested and for me it works just fine:

    RadioButtonGroup<Integer> g = new RadioButtonGroup<>();
    g.setItems(1,2,3);

    UI.getCurrent().addShortcutListener(
            () -> {
                g.setValue(2);
            },
            Key.of("2")
            //, KeyModifier.CONTROL, KeyModifier.ALT // possible modifiers
    )
            .listenOn(g) // only listen on group g, otherwise on whole UI
    ;

    add(new TextField("Textfield for testing elsewhere in the UI"));

    add(g);