What do you need help with?

Reticle Speed Mouse - Cursor Events

Follow

Key and Cursor Events Generated by the Reticle Speed Mouse

Unlike most Android devices, ODG Glasses do not have an embedded touch interface. Primary interaction is through a trackpad. The glasses frame includes a trackpad (often referred to as the "Crucialtec"), and a bluetooth-connected Wireless Finger Controller.

Two Modes

The Reticle Speed Mouse can be used in either of two modes: Trackball or Mouse. Trackball simulates a 4-arrow DPAD control, while Mouse simulates using a finger on a touch device. Trackball is the default mode, as most applications work well in this mode.

Input Device in ODG system is mostly unchanged, so it still behaves the same as what is in standard Android.  It reads the scan code from the driver and dispatches it in Android event formats (keyevent, cursor event, etc). The RSM has two hard buttons on the left and right hand side. The one on the left hand side is a "Back" key.  The "back" raw scan code is 0x0110, and driver would convert that to back key event by looking up to the predefined key map layout file.  As for the menu key on the right hand side, the logic is same as the back key the scan code is 0x0111. 

  • Trackball

The trackpad simulates a 4 arrow DPAD control as user's finger moving left, right, up and down. Driver would generate KEYCODE_DPAD_LEFT, KEYCODE_DPAD_RIGHT, KEYCODE_DPAD_UP and KEYCODE_DPAD_DOWN key events respectively. When pressing the selector, it would generate KEYCODE_DPAD_CENTER

  • Mouse Mode

Device mapping is now switched to cursor. Instead of generating key events, the Android input device would generate cursor events. Basically, it provides two cursor events for each movement, current and next events. The calculation in the driver is based on the how far your finger moves on the trackpad.

Have more questions? Submit a request

Comments

Powered by Zendesk