Emwin_keyboard

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

    • Emwin_keyboard

      Dear Sir,

      I created a Keyboard.

      Would you please guide me how I can delete long press character from keyboard display.

      please find the attachment photo.

      Kind regards
      Saeed
      Images
      • Keyphoto.jpg

        13.24 kB, 373×193, viewed 272 times
    • Hi Saeed,

      Long press characters are defined in the keyboard's layout. You can remove the long press characters from the layout you are using.

      I am assuming you are using the predefined layout "KEYBOARD_ENG", you can copy the layout to another file to create your own custom layout. I have attached the layout KEYBOARD_ENG.c, in case you need it.

      You can remove the long press characters for a line of keys by passing "NULL" as the last argument for the KEYDEF_LINE structure (see "Pointer to longpress codes" below).

      C Source Code

      1. //
      2. // Pointer to longpress codes -------------------------------------------------------------------------------+
      3. // Pointer to codes --------------------------------------------------------------+ |
      4. // Number of keys in contiguous line ----------------------------------+ | |
      5. // y-Size ---------------------------+ | | |
      6. // x-Size ----------------------+ | | | |
      7. // y-Pos ----------------+ | | | | |
      8. // x-Pos -----------+ | | | | | |
      9. // | | | | | | |
      10. static const KEYDEF_LINE _Numbers = { { 0, 0, 1000, 200 }, { GUI_COUNTOF(_aNumbers), _aNumbers }, NULL };
      11. static const KEYDEF_LINE _Minus = { { 150, 800, 100, 200 }, { GUI_COUNTOF(_aMinus), _aMinus }, NULL };
      12. static const KEYDEF_LINE _Dot = { { 750, 800, 100, 200 }, { GUI_COUNTOF(_aDot), _aDot }, NULL };
      13. static const KEYDEF_LINE _AlphaLower0 = { { 0, 200, 1000, 200 }, { GUI_COUNTOF(_aAlphaLower0), _aAlphaLower0 }, _aLong00 };
      14. static const KEYDEF_LINE _AlphaLower1 = { { 50, 400, 900, 200 }, { GUI_COUNTOF(_aAlphaLower1), _aAlphaLower1 }, _aLong10 };
      15. static const KEYDEF_LINE _AlphaLower2 = { { 150, 600, 700, 200 }, { GUI_COUNTOF(_aAlphaLower2), _aAlphaLower2 }, _aLong20 };
      16. static const KEYDEF_LINE _AlphaUpper0 = { { 0, 200, 1000, 200 }, { GUI_COUNTOF(_aAlphaUpper0), _aAlphaUpper0 }, _aLong01 };
      17. static const KEYDEF_LINE _AlphaUpper1 = { { 50, 400, 900, 200 }, { GUI_COUNTOF(_aAlphaUpper1), _aAlphaUpper1 }, _aLong11 };
      18. static const KEYDEF_LINE _AlphaUpper2 = { { 150, 600, 700, 200 }, { GUI_COUNTOF(_aAlphaUpper2), _aAlphaUpper2 }, _aLong21 };
      19. static const KEYDEF_LINE _AlphaExtra0 = { { 0, 200, 1000, 200 }, { GUI_COUNTOF(_aAlphaExtra0), _aAlphaExtra0 }, NULL };
      20. static const KEYDEF_LINE _AlphaExtra1 = { { 0, 400, 1000, 200 }, { GUI_COUNTOF(_aAlphaExtra1), _aAlphaExtra1 }, NULL };
      21. static const KEYDEF_LINE _AlphaExtra2 = { { 150, 600, 700, 200 }, { GUI_COUNTOF(_aAlphaExtra2), _aAlphaExtra2 }, NULL };
      Display All

      Best regards,
      Florian
      Files
      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.