|
|
HP Xlib Extensions: > Chapter 5 X Input Device Extension FunctionsChanging the Core X Devices |
|
To change the X keyboard device, use XChangeKeyboardDevice.
Title not available (Changing the X Keyboard Device )
The XChangeKeyboardDevice function causes the server to use the specified device as the X keyboard. The server implementation must support focusing of the new device, or a BadDevice error will be returned. Whether or not a given device can be focused can be determined by examining the information returned by the XOpenDevice request. For those devices that can be focused, XOpenDevice will return an XInputClassInfo structure with the input_class field equal to the constant FocusClass (defined in the file XI.h). If the specified device is grabbed by another client, AlreadyGrabbed is returned. If the specified device is frozen by a grab on another device, GrabFrozen is returned. If the request is successful, Success is returned. A ChangeDeviceNotify event is sent to all clients that have selected that event. A MappingNotify event with request = MappingKeyboard is sent to all clients. The specified device becomes the X keyboard and the old X keyboard becomes accessible through the input extension protocol requests. XChangeKeyboardDevice can generate a BadDevice or a BadMatch error. To change the X pointer device, use XChangePointerDevice.
Title not available (Changing the X Pointer Device )
The XChangePointerDevice function causes the server to use the specified device as the X pointer. If the specified device is grabbed by another client, AlreadyGrabbed is returned. If the specified device is frozen by a grab on another device, GrabFrozen is returned. If the request is successful, Success is returned. A ChangeDeviceNotify event is sent to all clients that have selected that event. A MappingNotify event with request = MappingPointer is sent to all clients. The specified device becomes the X pointer, and the old X pointer becomes accessible through the input extension protocol requests. XChangePointerDevice can generate BadDevice and BadMatch errors. |
|