Hello paul,
As the screenshot shows, I have a group screen with left and right keys to control the addition and subtraction of variable.
// TO DO: Write your code here ...
//Init code
attachobserver OnSubCsreenChangeed, ^Application::Device.SubScreen;
postsignal OnSubCsreenChangeed;
OnSubCsreenChangeed code:
sender; /* the method is called from the sender object */
switch(Application::Device.SubScreen)
{
case Application::SubScreenType.FirstScreen : Group.Content = new Screen_xxxx::SubScreen1;
case Application::SubScreenType.SecondScreen : Group.Content = new Screen_xxxx::SubScreen2;
case Application::SubScreenType.ThirdScreen : Group.Content = new Screen_xxxx::SubScreen3;
default:;
}
![](https://ask.embedded-wizard.de/?qa=blob&qa_blobid=18352370101394491778)
There are three different subscreens with left and right keystroke handlers.
![](https://ask.embedded-wizard.de/?qa=blob&qa_blobid=17955947208619732467)
When I simulate the project, sometimes the variable changes as I switch screens.
![](https://ask.embedded-wizard.de/?qa=blob&qa_blobid=2149791817130437776)
My guess is that in the process of switching screens, there may be only the main screen key handler left on the entire focus path.
Therefore, is it possible to disable the key handling function of the main screen in the init function of the subscreen, and enable it when exiting. What am I supposed to do?