none
send hash(#) key to upper layer in WinCE7 RRS feed

  • Question

  • Hi All,

    for normal key press,i shall do like below and it works fine

    keybd_event(virtual_key,0,0,0);

    keybd_event(virtual_key,0,KEYEVENTF_KEYUP,0);

    I need to send hash(#) key to upper layer in WinCE7.

    I have tried like below (send SHIFT + 3) and it didn't work

    keybd_event(VK_SHIFT,0,0,0);

    keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);

    keybd_event(0x63,0,0,0);/* Numeric key 3 */

    keybd_event(0x63,0,KEYEVENTF_KEYUP,0);

    I am using wordpad application in WinCE to test it.

    I need to print hash(#) key in wordpad application and how can i achieve it?

    Can you please help on this?

    Regards

    Senthil

    Thursday, July 16, 2015 6:24 AM

Answers

  • Looking at this quickly, I think that you have the order wrong.

    Shift down

    3 down

    3 up

    shift up

    would be how you would do it on a physical keyboard.


    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Thursday, July 16, 2015 12:26 PM
    Moderator
  • It's not numpad3, there is no # when you press SHIFT + NUMPAD3!

    It would be:

    keybd_event(VK_SHIFT,0,0,0);
    keybd_event(0x33,0,0,0);
    keybd_event(0x33,0,KEYEVENTF_KEYUP,0);
    keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, July 16, 2015 1:15 PM
    Moderator

All replies

  • Looking at this quickly, I think that you have the order wrong.

    Shift down

    3 down

    3 up

    shift up

    would be how you would do it on a physical keyboard.


    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Thursday, July 16, 2015 12:26 PM
    Moderator
  • Hi Bruce Eitman & all,

    I have tried as you suggested and it didn't work.

    keybd_event(VK_SHIFT,0,0,0);
    keybd_event(VK_NUMPAD3,0,0,0);
    keybd_event(VK_NUMPAD3,0,KEYEVENTF_KEYUP,0);
    keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);

    can you please help on this?

    Regards

    Senthil


    Thursday, July 16, 2015 1:05 PM
  • It's not numpad3, there is no # when you press SHIFT + NUMPAD3!

    It would be:

    keybd_event(VK_SHIFT,0,0,0);
    keybd_event(0x33,0,0,0);
    keybd_event(0x33,0,KEYEVENTF_KEYUP,0);
    keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, July 16, 2015 1:15 PM
    Moderator
  • Hi Micheal & Bruce Eitman,

    I have tried as you suggested,It worked fine.

    Thanks a lot

    Regards

    Senthil

    Thursday, July 16, 2015 2:01 PM