Windows Mobile 6.5 Slider Keyboard Detection

Windows Mobile 6.5 handled physical slider keyboard detection through a coordinated pipeline involving hardware interrupt sensors, platform-dependent keyboard drivers, and the Windows CE State and Notification Broker. When a user opened or closed a sliding mechanism, hardware switches signaled the operating system to automatically manage screen orientation, route hardware key events, and toggle the on-screen Software Input Panel (SIP).

Hardware Sensing and Interrupt Handling

The physical movement of a slider was detected at the board level using either a mechanical limit switch or, more commonly, a magnetic Hall-effect sensor embedded in the chassis. When the slider reached its fully extended or closed position, the sensor triggered a General Purpose Input/Output (GPIO) line change. This hardware interrupt was routed directly to the microprocessor's interrupt controller, which mapped it to a logical interrupt identifier (SYSINTR) within the Windows CE kernel.

The Keyboard Driver Layer

Windows Mobile used a layered driver architecture consisting of a Model Device Driver (MDD) and a Platform Dependent Driver (PDD):

  1. PDD Monitoring: The OEM-written keyboard PDD monitored the assigned GPIO line. Upon receiving the interrupt, the PDD read the hardware state to determine whether the keyboard was deployed or stowed.
  2. Event Dispatch: The PDD passed this status update to the unified MDD. Rather than treating the slider as a standard keystroke, the driver recognized it as a state change event representing device configuration.

State and Notification Broker

Once the driver processed the interrupt, it broadcast the change through the Windows Mobile State and Notification Broker. The broker maintained real-time device states in the system registry, specifically updating values under:

HKLM\System\State\Hardware\Keyboard

A dedicated status flag, typically tracked via properties such as SN_KEYBOARDDEPLOYED, was toggled between 0 (hidden) and 1 (deployed). Applications and shell services registered with the broker received an instantaneous notification via standard Windows messages or event handles whenever this registry value changed.

Shell and UI Adjustments

The Windows Mobile shell listened for these state changes to execute specific interface behaviors without requiring user intervention:

  • SIP Automation: When the physical keyboard was deployed, the OS automatically suppressed or minimized the virtual keyboard (Software Input Panel), freeing up screen space. Retracting the slider restored default SIP availability.
  • Display Orientation: Most OEM configurations paired keyboard deployment with an automatic display rotation. The shell instructed the display driver via ChangeDisplaySettingsEx to switch the UI from portrait mode (typically 480x800 or 240x320) to landscape orientation.
  • Backlight Control: The power management subsystem utilized the deployed notification to enable power to the physical keyboard's backlight LEDs, often governed by ambient light sensor readings to conserve battery.