locked
Windows CE - Smart Device development - Hardware Buttons RRS feed

  • Question

  • Hi,

    I want to make an app (.NET 3.5, Windows CE 6, Smart Device) for Scanner with Windows CE platform, in Visual Studio 2008. And I want to make a hotkey (shortcut) on hardware button of the scanner, so user can save the data on hardware key. And I was trying with KeyPress (which is not working on Win CE) and later with HardwareButtons from toolbox. But it is disabled (grayed out) from the toolbox. Is there any workaround to this? Or does anybody know if this is even possible on this kind of platform?

    Note: Scanner is Datalogic Memor X3

    Thanks in advance.

    Wednesday, November 18, 2015 12:14 PM

Answers

  • Hi IoTGirl,

    Thanks for your time and suggestions. The support from their site didn't help, I've already check every document related to the scanner.

    WM_CHAR, WM_KEYDOWN & WM_KEYUP did not work, but I actually made it with KeyPress somehow. It started to work. The links that have helped are:

    https://msdn.microsoft.com/en-us/library/ms171538%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    http://stackoverflow.com/questions/17948204/keypress-f1-does-not-work-c-sharp

    this.KeyPreview = true;
    this.KeyPress += new KeyPressEventHandler(Form1_KeyPress);

    So, the event works now.

    Thanks again, for your help.

    Cheers,

    Cartman89

    • Marked as answer by Cartman89 Friday, November 20, 2015 11:23 AM
    Friday, November 20, 2015 11:23 AM

All replies

  • Hi Cartman89,

    This is a custom embedded device so you will need to work with the OEM on how they intended their keyboard to be used. The fact that "KeyPress" is not working might indicate that they have implemented a custom driver that is not a replacement to a standard keyboard and you will need private details from them to leverage it.

    Their support is available from http://www.datalogic.com/eng/products/automatic-data-capture/mobile-computers/memor-x3-pd-636.html

    PS: Have you tried trapping WM_* messages in your window message loop? These would be issued to fill a text box, for example.  Check out WM_CHAR, WM_KEYDOWN & WM_KEYUP as, while these are not a driver level, they are how the OS gets keyboard input.

    Sincerely,

    IoTGirl

    Wednesday, November 18, 2015 6:27 PM
  • Hi IoTGirl,

    Thanks for your time and suggestions. The support from their site didn't help, I've already check every document related to the scanner.

    WM_CHAR, WM_KEYDOWN & WM_KEYUP did not work, but I actually made it with KeyPress somehow. It started to work. The links that have helped are:

    https://msdn.microsoft.com/en-us/library/ms171538%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    http://stackoverflow.com/questions/17948204/keypress-f1-does-not-work-c-sharp

    this.KeyPreview = true;
    this.KeyPress += new KeyPressEventHandler(Form1_KeyPress);

    So, the event works now.

    Thanks again, for your help.

    Cheers,

    Cartman89

    • Marked as answer by Cartman89 Friday, November 20, 2015 11:23 AM
    Friday, November 20, 2015 11:23 AM