Responding to touch events outside LCD boundary?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Responding to touch events outside LCD boundary?

      I'm considering getting an LCD screen with capacitive touch for a project. The capacitive touch extends beyond the dimensions of the LCD and has a few printed buttons (i.e. power button) on the glass below the LCD. I'm assuming the touch controller will then be sending touch coordinates that are beyond the LCD and will extend down to include the buttons. Can I use this type of touchscreen with emWin and be able to detect touch events on the printed buttons? I don't have the touch controller info and full screen dimensions yet. Right now I'm just trying to figure out if it might be possible.
    • I'll rephrase this to see if my request makes more sense. Let's say I have an 800x600 display. The touch panel extends down below the display and there are four buttons in the 200 pixel region below the display. Can emWin be setup to then handle an 800x600 display and also handle touch events occurring in the 800,0 to 1000,600 X,Y coordinate region? Is this something I can build out with AppWizard, or is there a need for some custom interfacing code to the touch controller?
    • Hi,

      Currently such a touch screen setup is not handled automatically by emWin. You would have to manually handle the input to these buttons.

      In your PIDConf.c (the touch screen interface), you would send the touch input events normally to emWin if they are inside the boundaries of the display. This is done with GUI_PID_StoreState().

      If they are not inside the boundaries, you can check if one of the buttons is pressed and handle this input however you need to. You could e.g. send a custom message to your main application window to perform certain commands based on the touch button. In an AppWizard project you would do this in user code and e.g. set an AppWizard variable to trigger a VALUE_CHANGED signal if the buttons need to interface with your AppWizard application.

      The emWin simulation also allows to add custom hard keys, where you can simulate these buttons on the PC as well. However, you won't be able to simulate hard keys within AppWizard.

      Best regards,
      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.