HP OpenVMS Systems Documentation

Content starts here

VMS DECwindows Device Driver Manual


Previous Contents Index

Normally, when the cursor pattern is loaded with the $QIO call, it will load all of the UCBs that are attached to the same input device. If you want to load different patterns for different screens, you can set IO$M_DECW_UPDATE_ONE_DISPLAY in p3. This allows you to use a different cursor for displays that support different size cursors.

Occasionally, a pattern that is loaded will not be displayed on the screen that happens to be current. (For example, a 48x48 pattern is loaded while the cursor is on a screen that has a 16x16 cursor.) In this case, you may want the true cursor to be displayed completely when it is first sent to the driver. When you set IO$M_DECW_MOVE_POINTER in p3, the cursor jumps to the display of the output device to which the $QIO call was directed.


Set Cursor Position

The Set Cursor Position $QIO function sets the cursor x or y position. It returns a SS$_BADPARAM message if the cursor (pointer) is out of range along the x- and y-axes. If multiple screens are attached to a single mouse, it removes the mouse from all other attached screens and places the pointer on the home screen. The target device is the output display. The cursor information is stored in the UCB common output extension (DECW). Table 2-16 provides the required argument information for the Set Cursor Position $QIO call.

Table 2-16 Argument Data for Set Cursor Position$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_CURSOR_POSITION function modifier
p2 Value that defines the x position of the cursor on the screen
p3 Value that defines the y position of the cursor on the screen
p4, p5, p6 Set to 0

Set Keyboard Information

The Set Keyboard Information $QIO function keyboard functions and sets various functional characteristics of the keyboard device. Table 2-17 provides the argument information required for the Set Keyboard Information $QIO call.

Figure A-4 and Table A-4 show and define the data structure that passes required keyboard information for the $QIO call.

Table 2-17 Argument Data for Set Keyboard Information$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_KB_INFO function modifier is used to set or adjust the keyclick and bell volume and to set the alphanumeric keys (main keyboard) in up/down transition mode of event reporting

IO$M_DECW_KEYCLICK optional function modifier is used to set the keyclick volume

IO$M_DECW_BELL is used to set the bell volume

IO$M_DECW_AUTOREPEAT is used to enable/disable the autorepeat feature

p2 Address of the keyboard information block (KIB)
p3 Specifies the length of the keyboard information block (KIB$S_KBD_INFO)
p4 Defines the up/down or down-only transition mode of the alphanumeric keys. A value of 1 sets the FLAG$V_MAIN_KB_UPDOWN bit in the UCB keyboard input extension, enabling the up/down mode. A value of 0 selects the down-only transition mode for alphanumeric key events.
p5, p6 Set to 0

Set Keyboard LED

The Set Keyboard LED $QIO function sets the state of the keyboard LEDs. The target device is the keyboard. Table 2-18 provides the argument information required for the Set Keyboard LED $QIO call.

Table 2-18 Argument Data for Set Keyboard LED$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_KB_LED function modifier
p2 A value of 1 turns the p3 LEDs on; a value of 0 turns the p3 LEDs off
p3 A longword LED mask that sets the keyboard lights to the state specified in p2. The mask bits correspond to the keyboard LEDs as follows:
DECW$M_LIGHT1 Wait
DECW$M_LIGHT2 Compose
DECW$M_LIGHT3 Lock
DECW$M_LIGHT4 Hold Screen
p4, p5, p6 Set to 0

Note

The keyboard class driver ignores this $QIO for the Wait and Lock LEDs. The lock LED corresponds to the lock key on the LK201 keyboard and the wait LED identifies the keyboard pseudomouse mode.

Set Motion Compression

The Set Motion Compression $QIO function sets or clears the pointing device's motion compression mode. The motion compression bit (FLAG$V_MOTION_COMP) is located in DWI$L_PTR_CTRL of the input UCB extension. The target is the pointing device. Table 2-19 provides the argument information required for the Set Motion Compression $QIO call.

Table 2-19 Argument Data for Set Motion Compression$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_MOTION_COMP function modifier
p2 A value of 1 sets motion compression on; a value of 0 turns motion compression off
p3, p4, p5, p6 Set to 0

Set Operator Window Key

The Set Operator Window Key $QIO function sets the key code that invokes the operator window. If the key code parameter p2 is not set, Ctrl/F2 is the operator key default. The target device is the keyboard. Table 2-20 provides the required argument information for the Set Operator Window Key $QIO call.

Table 2-20 Argument Data for Set Operator Window Key$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_OPWIN_KEY function modifier
p2 Byte specifying the LK201 key code that invokes the operator window. If p2 is set to 0, p3 is ignored and Ctrl/F2 is established as the default.
p3 Longword mask that specifies either a shift or control selection modifier key (INP$M_CONTROLMASK or INP$M_SHIFTMASK). The default selector for the operator window mode is Ctrl/F2. If a modifier is not used, p3 must be 0.
p4, p5, p6 Set to 0

Set Pointer Acceleration

The Set Pointer Acceleration $QIO function sets the pointer acceleration table states and the acceleration threshold value. The p2, p3, and p4 parameters set states DWI$W_PTR_ACCEL_NUM, DWI$W_PTR_ACCEL_DEN, and DWI$W_PTR_ACCEL_THR, respectively, in the pointer input UCB extension. The target is the pointer device. Table 2-21 provides the argument information required for the Set Pointer Acceleration $QIO call.

Table 2-21 Argument Data for Set Pointer Acceleration$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_PTR_ACCEL function modifier
p2 A word containing the pointer acceleration numerator for DWI$W_PTR_ACCEL_NUM and the acceleration routine
p3 A word containing the pointer acceleration denominator for DWI$W_PTR_ACCEL_DEN and the acceleration routine. The default is 1.
p4 A word containing the pointer acceleration threshold for DWI$W_PTR_ACCEL_THR and the acceleration routine
p5, p6 Set to 0

Set Pseudomouse Key

The Set Pseudomouse Key $QIO function sets the key code to select the pseudomouse mode. The $QIO sets both the key and the key modifier scan codes in the keyboard input UCB extension (DWI$B_KB_PMOUSE_KEY and DWI$B_KB_PMOUSE_MOD). The default is Ctrl/F3. The target device is the keyboard. Table 2-22 provides the argument information required for the Set Pseudomouse Key $QIO call.

Table 2-22 Argument Data for Set Pseudomouse Key$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_PMOUSE_KEY function modifier
p2 The select pseudomouse key code. The default is 58 16 for key F3 on an LK201 keyboard.
p3 A longword mask that specifies either a shift or control selection modifier key (INP$M_CONTROLMASK or INP$M_SHIFTMASK). The default selectors for the pseudomouse mode are Ctrl/F3. If a modifier key is not used, p3 must equal 0.
p4, p5, p6 Set to 0

Set Screen Saver Timeout

The Set Screen Saver Timeout $QIO function enables or disables the screen saver function and sets the screen saver timeout value in seconds. The target device is the output monitor. Table 2-23 provides the required argument information for the Set Screen Saver $QIO call.

Table 2-23 Argument Data for Set Screen Saver$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_SCRSAV function modifier is used for setting a timeout value

An IO$M_DECW_RESET_SCRSAV optional function modifier is used to turn the screen saver off, or a IO$M_DECW_FORCE_SCRSAV function modifier is used to activate the screen saver

p2 Specifies the timeout value in seconds. If p2 is set to 0, the screen saver function is disabled
p3, p4, p5, p6 Set to 0

Write X Event

The Write X Event $QIO call generates an X event without the use of input hardware. The call simulates an input event, queuing an input packet (INP) on the input queue. There are four pointer event options you can select using the appropriate function modifier in parameter p1.

Parameter p2 points to the input event data block of the calling program. The block should have the same basic structure as the DECwindows input packet, shown in Figure 2-3 of Section 2.1.2. Figure 2-5 and Table 2-25 show and define the structure and fields that are required for the call.

Constant INP$K_LENGTH defines the input block size. Field INP$L_ROOT_WIN is copied from the output UCB. Fields INP$W_ROOT_X and _Y are updates for UCB$W_DECW_CURSOR_X and _Y for the output UCB. Field INP$B_DETAIL should contain the simulated key or mouse code and INP$B_TYPE contains the event type being generated.

Table 2-24 provides the required argument information for the Write X Event $QIO call.

Table 2-24 Argument Data for Write X Event$QIO Call
$QIO Argument Required Data
func IO$_DECW_WRITEV function code
p1 The function modifier for the specific event function selected:
IO$K_DECW_NO_PTR No pointer data is sent.
IO$K_DECW_ABS_PTR The absolute pointer data position is sent.
IO$K_DECW_REL_PTR New position data (delta x and y) is sent.
IO$K_DECW_X11_PTR Pointer acceleration data is sent.
p2 A longword address of the input data block of the calling program

Figure 2-5 Input Data Block of Calling Program


4735INPUTSTRUCT.TEX

Table 2-25 Input Data Block Fields
Field Name Contents
INP$B_TYPE Specifies the X11 event type. Write the packet event type in this field. Possible key definition states: KEYPRESS, KEYRELEASE. Possible mouse definition states: BUTTONPRESS, BUTTONRELEASE, and MOTIONNOTIFY.
INP$B_DETAIL A keyboard or mouse code simulating the key or button activity.
INP$L_ROOT_WIN The pointer to a root window data structure in the display application.
INP$W_ROOT_X A value in pixels specifying the horizontal placement of the upper left corner of the root window on the screen.
INP$W_ROOT_Y A value in pixels specifying the vertical placement of the upper left corner of the root window on the screen.

1read only fields


Input Event $QIO Example

The following are programming steps to generate an input event that positions the pointer at screen location 100, 200.

  1. Allocate space for the input data block using constant INP$K_LENGTH.
  2. Clear all fields of the input data block.
  3. Load the input data block fields:
    • Set INP$B_DETAIL to 0.
    • Set INP$B_TYPE to MOTIONNOTIFY.
    • Set INP$W_ROOT_X to 100.
    • Set INP$W_ROOT_Y to 200.
  4. Enter the Write X Event $QIO call with a function code of IO$_DECW_WRITEV, p1 set to IO$K_DECW_ABS_PTR, and p2 set to the address of the input data block.


Previous Next Contents Index