locked
Detect if physical keyboard is available RRS feed

  • Question

  • Does anybody know of a (near) perfect way to detect if a physical keyboard is available to the user?

    I cannot find of a way to detect if a keyboard is present. Some devices have a keyboard always present below the screen, some have sliding keyboards that can be slided into view. As far as i know there is no device-independent way to detect if a keyboard is presented.

     

    Thanks in advance, 

    Saturday, December 15, 2007 11:30 AM

Answers

  • Hi Peter,

    I am not aware of a detection mechanism either. Perhaps this is something to be suggested as an idea on the Windows Mobile Developer Experience Connect website (https://connect.microsoft.com/site/sitehome.aspx?SiteID=502).

    I'm also of the opinion that applications which strive to maximise the user experience could benefit from such information being available to them.

    I have a feeling that this is perhaps more of a hardware issue than a software issue. I'm taking an uneducated guess that most PDA hardware designs don't actually have a switch or other mechanism to determine the current position of the keyboard. If the OS doesn't dictate the presence of one (in order to implement an API such as the one you are after), there's probably little need for the state to be detectable.

    Hope this helps,
    Christopher Fairbairn
    Monday, December 17, 2007 12:11 PM

All replies

  • Have you tried checking HKCU\Software\Microsoft\Shell\HasKeyboard ?

    Also, check out Peter's post on this: http://peterfoot.net/KeyboardPresentAlwaysReturnsFalse.aspx

     

    There is also GetKeyboardStatus()  (http://msdn2.microsoft.com/en-us/library/aa929216.aspx), but that may not work consistently for you.

    • Proposed as answer by Swaroop TG Friday, March 25, 2011 8:07 AM
    Sunday, December 16, 2007 6:27 AM
  • Hello Nino!

     

    Thanks for your response. As far as i know, the KeyboardPresent registry key indicates weither the device has a keyboard at all. However, the new generation of devices sometimes have sliding keyboards. With these the user has the option to show or hide the keyboard completely. Thus a device can have a keyboard which can be unavailable.  

    In my opinion it would be quite interesting to know (if present) what the status of the keyboard is. This way the whole user interaction could be optimized.

     

    The problem is that i cannot find a API call / registry setting that changes accordingly.

     

    Greetings,

    Monday, December 17, 2007 9:11 AM
  • Hi Peter,

    I am not aware of a detection mechanism either. Perhaps this is something to be suggested as an idea on the Windows Mobile Developer Experience Connect website (https://connect.microsoft.com/site/sitehome.aspx?SiteID=502).

    I'm also of the opinion that applications which strive to maximise the user experience could benefit from such information being available to them.

    I have a feeling that this is perhaps more of a hardware issue than a software issue. I'm taking an uneducated guess that most PDA hardware designs don't actually have a switch or other mechanism to determine the current position of the keyboard. If the OS doesn't dictate the presence of one (in order to implement an API such as the one you are after), there's probably little need for the state to be detectable.

    Hope this helps,
    Christopher Fairbairn
    Monday, December 17, 2007 12:11 PM