ago in Embedded Wizard Studio by

dialog config


dialog2 : vertical list, text

dialog3 : text


Screen 2 and Screen 3 each have their own key handlers.
To increase the font size when the enter key is pressed, it is converted to Application::Font->Application::FontLarge.
In screen 2, it works fine, but in screen 3, it doesn't work when I press the enter key, but when I change the key to another key such as f1, it works.
How can I make it work when the same enter key is pressed?
Is there something I'm missing out on?
Thank you in advance.

1 Answer

0 votes
ago by

Hello sukyeong,
When using a key handler the key events are passed to the handers along the focus path. As soon as a handler consumes the key, it is no longer passed to the other handlers. If you want to pass the key event also to other handlers, please use the KeyHandler.Continue property accordingly.

With kind regards,

ago by
Each screen has its own keyhandler. When you press the same key on the screen, each plays a different role. The role is executed on screen 2 and not on screen 3. Screen 2 is placed on the bottom stack on screen 3, could it be a problem?
ago by
If the key handler on screen 2 is consuming the key event, it is no longer passed to the key handler within screen 3. Please use the 'Continue' property.
ago by
It seems that there was an error in the description while I was translating.

I don't want to pass the key handler content to screen3.
Screen 3 wants to have a different action from the screen 2 event without forwarding it.
ago by
Can you please send your project or a short part of it. This might help to understand your issue.
ago by


I can't seem to attach a photo....

In screen 1, the enter key works fine, but in screen 2, the enter key does not work.

ago by


In screen 1, the enter key works fine, but in screen 2, the enter key does not work.

A screen transition occurs between screen 1 and screen 2. I think it's because screen 2 includes screen 1. Is there any way to solve it?

This slot is used when the button is pressed. 

if ( IsCurrentDialog()) 
GetRoot().ActiveDialogClass = Application::SCREEN2Dialog;


ago by
When you change the ActiveDialogClass to Application::SCREEN2Dialog, a the job to add an instance of Application::SCREEN2Dialog is created. At this moment the new instance of Application::SCREEN2Dialog it not jet part of the root tree and will not receive any KeyEvents.

New KeyEvents can be received after the dialog is presented.
ago by
  • So is it a good idea to use menu items when you have a lot of dialogs?
    Can I use the switch to dialog function?
ago by

Which architecture to choose depends on your requirements. In principle it is not a good idea to handle one KeyEvent within different classes. Here a 'global' key handler within the application might be better. This one can change things like the 'font size' within a property and each class using this information can listen for a change using eg. a property observer.

For alternative architectures you can have a look on one of our MasterClass videos.

ago by
The video is very informative. thank you for telling me.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint