Windows Mobile 6.5 Trackball and Joystick Inputs
Windows Mobile 6.5 processed trackball and optical joystick inputs through the Windows Embedded CE Graphics, Windowing, and Events Subsystem (GWES) using low-level device drivers. Depending on the device configuration and OEM implementation, hardware sensors translated physical rolling or optical swipe movements into discrete directional virtual keys, relative pointer coordinates, or mouse wheel scrolling events. This allowed users to navigate menus, control on-screen cursors, and make selections via integrated hardware interrupts.
Driver Architecture and Hardware Interfacing
Optical joysticks (often referred to as Optical Finger Navigation or OFN sensors) and mechanical trackballs operated through microcontroller buses such as I2C, SPI, or direct GPIO interrupt lines. The hardware layer utilized a standard Windows CE driver model:
- Platform Dependent Driver (PDD): Directly interfaced with the hardware bus, reading optical sensor registers (such as delta X and delta Y registers) or tracking quadrature pulse encoders from a physical trackball.
- Model Device Driver (MDD): Took the raw directional pulses or relative coordinates from the PDD, processed thresholds and acceleration curves, and passed the normalized data into the GWES event queue.
Virtual Key Code Emulation
The most common method for processing trackball and optical joystick
events was mapping physical movement into directional virtual key codes
(VK_*). This was optimized for the Windows Mobile user
interface, which favored linear focus-based navigation over
free-floating mouse cursors.
- Directional Movement: Movement pulses beyond a
defined threshold triggered standard navigation keys:
VK_UP(0x26): Upward roll or swipe.VK_DOWN(0x28): Downward roll or swipe.VK_LEFT(0x25): Leftward roll or swipe.VK_RIGHT(0x27): Rightward roll or swipe.
- Selection Presses: Physical center-press switches
built into trackballs and optical sensors mapped directly to:
VK_RETURN(0x0D): Standard select/execute.VK_ACTION(0x84): Windows Mobile-specific center D-pad confirmation.
Drivers often featured acceleration algorithms where rapid sequential swipes produced repeated key-down and key-up messages to allow quick traversal of long lists.
Pointer and Mouse Messages
When configured to act as an analog pointing device, the driver
bypassed simple directional keys and fed relative coordinates directly
to the mouse driver interface using the mouse_event
API.
- Relative Coordinate Deltas: The driver reported
relative directional movement using the
MOUSEEVENTF_MOVEflag alongside integer values representing \(\Delta X\) and \(\Delta Y\). - Window Messages: The OS converted these driver
reports into standard Windows messages sent to the focused window or the
window beneath the cursor:
WM_MOUSEMOVE: Generated as the pointer position updated across the screen.WM_LBUTTONDOWNandWM_LBUTTONUP: Generated when the trackball or sensor center button was clicked.
Scroll Wheel Emulation
Windows Mobile 6.5 drivers could also route rotational or vertical
surface input directly into mouse wheel events. When reading continuous
vertical displacement, the driver issued mouse_event calls
configured with the MOUSEEVENTF_WHEEL flag.
- Message Generation: GWES interpreted this input as
WM_MOUSEWHEEL. - Delta Calculations: The driver provided a wheel
rotation metric based on multiples of
WHEEL_DELTA(typically 120 units per increment). This allowed native web browsers like Internet Explorer Mobile and document viewers to scroll vertically or horizontally without moving focus away from active fields.