GUI KEY Define conflicts for GUI_KEY_PGUP and GUI_KEY_PGDOWN in header GUI.h

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

  • GUI KEY Define conflicts for GUI_KEY_PGUP and GUI_KEY_PGDOWN in header GUI.h

    In my applications, I use Page UP and Page Down keys in ListView Widgets and MultiEdit Widgets.

    The problem I am having is that the Define values in GUI.h conflict with ASCII characters 33 and 34 from my keyboard which are ! and " characters.


    #define GUI_KEY_PGUP 33
    #define GUI_KEY_PGDOWN 34

    I did a workaround to solve this, but perhaps change this in a future revision.

    Also MultiEdit does not respond to Page UP and Page Down key strokes even though it is documented.
    I wrote my own Page UP and Page Down for Multiedit as a workaround.

    Just letting you know.
    Otherwise great stuff!




    /*********************************************************************
    *
    * GUI_KEY_...
    *
    * These ID values are basically meant to be used with widgets
    * Note that we have chosen the values to be close to existing
    * "standards", so do not change them unless forced to.
    *
    */
    #define GUI_KEY_BACKSPACE 8 /* ASCII: BACKSPACE Crtl-H */
    #define GUI_KEY_TAB 9 /* ASCII: TAB Crtl-I */
    #define GUI_KEY_BACKTAB 10
    #define GUI_KEY_ENTER 13 /* ASCII: ENTER Crtl-M */
    #define GUI_KEY_LEFT 16
    #define GUI_KEY_UP 17
    #define GUI_KEY_RIGHT 18
    #define GUI_KEY_DOWN 19
    #define GUI_KEY_HOME 23
    #define GUI_KEY_END 24
    #define GUI_KEY_SHIFT 25
    #define GUI_KEY_CONTROL 26
    #define GUI_KEY_ESCAPE 27 /* ASCII: ESCAPE 0x1b */
    #define GUI_KEY_INSERT 29
    #define GUI_KEY_DELETE 30
    #define GUI_KEY_SPACE 32
    #define GUI_KEY_PGUP 33
    #define GUI_KEY_PGDOWN 34

    #define GUI_KEY_F1 40
    #define GUI_KEY_F2 41
  • Hi,

    Regarding the conflicts of GUI_KEY_PGUP and GUI_KEY_PGDOWN with ASCII characters, we will discuss this.

    Which emWin Version are you using?

    The possibility to scroll up and down with page up and down was first introduced in version 5.38 of emWin.

    Regards
    Sven
    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.