How to send SHIFT-TAB code using GUI_SendKeyMsg() in EMWIN

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

  • How to send SHIFT-TAB code using GUI_SendKeyMsg() in EMWIN

    Hi,

    I am simulating my application using keypad hardkeys.

    I have a window dialog that I would like to send a SHIFT-TAB key to select a widget focus.
    It works perfectly fine using the GUI_KEY_TAB code, but I need to go in the opposite direction using a SHIFT_TAB code. The manual does not mention a define for SHIFT_TAB.

    EMWIN works perfectly fine from windows keyboard when simulating, but when I try and send a key code for SHIFT_TAB using GUI_SendKeyMsg() nothing happens.

    The code that I am using for SHIFT_TAB is code 15 (0xf). The documentation says any code between 0x20 and 0xff is accepted.

    Am I using the incorrect keyboard code fro SHIFT_TAB?

    SM.

    The post was edited 2 times, last by ScaleMan ().

  • I am answering my question as I figured it out by looking at the header file.
    Found the code for BACKTAB. Now works.



    /*********************************************************************
    *
    * 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
  • Hello,

    I am glad to see, that this is solved. I took a look at the emWin user manual and recognized that the GUI_KEY_BACKTAB actually is not well explained. This will be improved in the next emWin release version. Thank you for pointing me to that.

    Best regards,
    Adrian