Jaa


Detecting hardware keyboards on Pocket PC 2003 Second Edition devices

While I was at TechEd someone asked me how you detect a hardware keyboard on Pocket PC 2003 Second Edition devices. This could either be a clip-on keyboard or an integrated keyboard, depending on the device. Typically if the keyboard is attached you'll want to suppress displaying the on-screen SIP.

To detect the keyboard check the following registry key: HKCU\Software\Microsoft\Shell\HasKeyboard. This will be set to 1 if the keyboard is present.

[Author: Neil Enns]

Comments

  • Anonymous
    July 03, 2004
    So, GetKeyboardStatus() isn't reliable, then?

  • Anonymous
    July 04, 2004
    Don't know, I can ask on Tuesday. When I checked with our Shell developers though this is how they said to check.

  • Anonymous
    July 06, 2004
    GetKeyboardStatus() doesn't report changes in added/removed keyboards. It only covers whether built-in keyboards are enabled. We'd like to fix that going forward, but for now the reliable way is to check the registry entry.

    Neil

  • Anonymous
    May 31, 2006
    what are the native PPC keyboard drivers?  the Samsung i730 does not seem to have an FN key that can be detected.

  • Anonymous
    June 26, 2006
    Is there any better solution in CF 2.0 (WM 5.0) to detect hardware keyboard and detects events when it is enabled?

  • Anonymous
    January 25, 2007
    Neil, A suggestion: there should be another value (or simply have HasKeyboard be '2') for devices with both a keypad on the front, and with a slideout keyboard; effectively this would mean that "it has a keyboard only when in the landscape orientation". This would be helpful on the upcoming Vox device and other PPC PE devices that have a keypad and a keyboard.

  • Anonymous
    February 01, 2007
    The comment has been removed

  • Anonymous
    February 06, 2009
    The comment has been removed