## Pen for OS/2 Device Driver Reference

[prev][next][parent][TOC]

### Button Device Processing

                                            | Events Reported
                                            | to Pen for OS/2
    /----------------\                    /-----------------\
    | Pen Device     |                    | Pen for OS/2    |
    | Driver         |                    | Device Driver   |
    |                |    REPORT_EVENT    | Services        |
    | Button Device  |--------------------                 |
    |                |                    |                 |
    |                |                    |                 |
    |                |                    |                 |
    \---------------/                    \-----------------/
      |
      | External Hardware Events

A device object assigns actions to the pen hardware product's buttons through the Pen for OS/2 system extension API and informs the pen device driver using the category 92 Set Button Assignment IOCtl. The Query Button Assignment IOCtl can query the current assignment. The number of buttons and a summary of their assignment is obtainable by reading the unit capabilities packet with the Query Unit Capabilities IOCtl.

The driver reports all button events to the Pen for OS/2 Device Driver Services. The Pen for OS/2 Device Driver Services filter some of these events and do not pass them to the Pen for OS/2 system. The pen device driver reports all activations and releases, regardless of the state of the other logical devices.

The following assignments are possible:

Null

Buttons assigned to null action generate no action on activation or release . The button states are reported by the locator point stream.

Mouse-emulation buttons

Mouse-emulation buttons modify the normal mouse-button event emulation. Instead of the mouse button 1 emulating the stroke, mouse button 1 can be emulated as mouse button 2, mouse button 3, or a combination of mouse button 1, mouse button 2, and mouse button 3. The modification occurs while holding down a button, or during the next stroke after activating and releasing a button. A second activation and release cancels the modification so that the next stroke is not a modified mouse event.

Note: Pressing pen buttons is not like pressing mouse buttons. Mouse buttons generate a mouse event when activated and released. Pen buttons change the emulated mouse stream during the pen stroke but do not generate locator events directly as a result of activation or release.

Gesture mode

A stroke in gesture mode will force gesture recognition, even though the stroke might be in a drawing mode.

Hot-key buttons

The Pen for OS/2 device driver reports hot-key buttons to the Pen for OS/2 Device Driver Services. The pen device driver takes no action. The Pen for OS/2 Device Driver Services conditionally generate an event to the OS/2 operating system, and then report the event to the Pen for OS/2 system. The Pen for OS/2 Device Driver Services might not generate the event if the system is currently locked up or if the display has been turned off. The pen device driver always reports all activations and releases.

Other

All other assignments result in the buttons being reported to the Pen for OS/2 system by the device driver. The device driver uses the REPORT_EVENT Pen for OS/2 Device Driver Service to report the buttons. Generic IOCtl Interface provides a complete list of these assignments.

The state of all buttons is reported on each locator event in the locator event stream.