jvx

Can I add a KeyListener to a UIPanel? Also in the WebUI?


If I type e.g.: the letter A then my registered action is called up

This does not seem to be the case.

…
panelMain.eventKeyPressed().addListener(this, "doPanelMainKeyPressed");
…

public void doPanelMainKeyPressed(UIKeyEvent event) throws Throwable 
{
        System.out.println("Key = " + event.getKeyChar() + "Code=" + event.getKeyCode());   
    buttonButton.requestFocus();
}

My doPanelMainKeyPressed isnt called.


Solution

  • Currently, this isn't supported in every UI technology. It will work in desktop, but not in e.g. reactUI

    You should open a ticket for the UI.