XHPSetDeviceFocus(3X)XHPSetDeviceFocus(3X)NAME
XHPSetDeviceFocus - Set the focus for an extended input device.
XHPSetDeviceModifierMapping - Change the modifier mapping of an
extension input device.
SYNOPSIS
int XHPSetDeviceFocus (display, deviceid, focus, revert_to, time)
Display *display;
XID deviceid;
Window focus;
int revert_to;
Time time;
int XHPSetDeviceModifierMapping (display, deviceid, modmap)
Display *display;
XID deviceid;
XModifierKeymap *modmap;
ARGUMENTS
display Specifies the connection to the X server.
deviceid Specifies the ID of the desired device.
XHPSetDeviceFocus Only
focus Specifies the ID of the window to which the device's focus
should be set. This may be a window ID, or either
PointerRoot or None.
revert_to Specifies to which window the focus of the device should
revert if the focus window becomes not viewable. One of
the following constants may be passed: RevertToParent,
RevertToPointerRoot, or RevertToNone.
time Specifies the time. You can pass either a timestamp,
expressed in milliseconds, or CurrentTime.
XHPSetDeviceModifierMapping Only
modmap Specifies a pointer to an XModifierKeymap structure.
DESCRIPTION
These requests are part of an HP-proprietary extension to X. Their
functionality has been superseded by standard X input device extension
requests. You should use XSetDeviceFocus instead of XHPSetDeviceFocus
and XSetDeviceModifierMapping instead of XHPSetDeviceModifierMapping if
possible.
These requests are provided to support the use of input devices other
than the X keyboard device and X pointer device.
XHPSetDeviceFocus
XHPSetDeviceFocus allows a client to redirect the focus for a
particular extended input device. This request causes an
HPDeviceFocusOut event to be sent to the window losing the device
focus, and an HPDeviceFocusIn event to be sent to the window gaining
the device focus.
This request may not be used to set the focus of the X keyboard device.
The XSetInputFocus request should be used for that purpose.
XHPSetDeviceModifierMapping
This request is provided to support the use of input devices other than
the X keyboard and X pointer device. It allows a client program to
define the keycodes that are to be used as modifiers for an extension
device.
The XHPSetDeviceModifierMapping request specifies the KeyCodes of the
keys, if any, that are to be used as modifiers for the specified input
device. X permits at most eight modifier keys. If more than eight are
specified in the XModifierKeymap structure, a BadLength error will be
generated.
There are eight modifiers, and the modifiermap member of the
XModifierKeymap structure contains eight sets of max_keypermod
KeyCodes, one for each modifier in the order Shift, Lock, Control,
Mod1, Mod2, Mod3, Mod4, and Mod5. Only nonzero KeyCodes have meaning
in each set, and zero KeyCodes are ignored. In addition, all of the
nonzero KeyCodes must be in the range specified by min_keycode and
max_keycode as returned by the XHPListInputDevices request. Otherwise,
a BadValue error is generated. No KeyCode may appear twice in the
entire map. Otherwise, a BadValue error will be generated.
A X server can impose restrictions on how modifiers can be changed, for
example, if certain keys do not generate up transitions in hardware or
if multiple modifier keys are not supported. If some such restriction
is violated, the status reply is MappingFailed, and none of the
modifiers are changed. If the new KeyCodes specified for a modifier
differ from those currently defined and any (current or new) keys for
that modifier are in the logically down state, the status reply is
MappingBusy, and none of the modifiers are changed.
XHPSetDeviceModifierMapping generates a MappingNotify event when it
returns MappingSuccess.
DIAGNOSTICS
XHPSetDeviceFocus can generate BadMatch, BadWindow, and BadDevice
errors.
XHPSetDeviceModifierMapping can generate BadDevice, BadLength, and
BadValue errors.
BadMatch The focus window was not viewable.
BadWindow An invalid window ID was specified.
BadDevice The specified device does not exist, was not previously
enabled via XHPSetInputDevice, or is the X system pointer
or X system keyboard.
BadLength More than 8 modifier keys were specified.
BadValue One of the values specified was beyond the range of valid
values.
RETURN VALUE
none
FILES
none
ORIGIN
Hewlett-Packard Company
SEE ALSOXHPListInputDevices(3x)XHPSetInputDevice(3x)XHPGetDeviceFocus(3x)XHPGetDeviceModifierMapping(3x)XGetModifierMapping(3x)XSetModifierMapping(3x)X Version 11 Release 5 XHPSetDeviceFocus(3X)