Merge branch 'master' of ssh://tz.otcshare.org/profile/base/libXi
[platform/upstream/libXi.git] / man / XChangeKeyboardDevice.man
1 '\" t
2 .\"     Title: xchangekeyboarddevice
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 09/23/2011
6 .\"    Manual: [FIXME: manual]
7 .\"    Source: [FIXME: source]
8 .\"  Language: English
9 .\"
10 .TH "XCHANGEKEYBOARDDEVIC" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 XChangeKeyboardDevice \- change which device is used as the X keyboard
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <X11/extensions/XInput\&.h>
36 .fi
37 .sp
38 .nf
39 Status XChangeKeyboardDevice( Display *display,
40                               XDevice *device);
41 .fi
42 .sp
43 .nf
44 display
45        Specifies the connection to the X server\&.
46 .fi
47 .sp
48 .nf
49 device
50        Specifies the device to be used as the X keyboard\&.
51 .fi
52 .SH "DESCRIPTION"
53 .sp
54 .if n \{\
55 .RS 4
56 .\}
57 .nf
58 The XChangeKeyboardDevice request causes the server to use the
59 specified device as the X keyboard\&. The device must have been
60 previously opened by the requesting client via XOpenDevice or a
61 BadDevice error will result\&. The device must support input
62 class Keys, or a BadMatch error will result\&. If the server
63 implementation does not support using the requested device as
64 the X keyboard, a BadDevice error will result\&.
65 .fi
66 .if n \{\
67 .RE
68 .\}
69 .sp
70 .if n \{\
71 .RS 4
72 .\}
73 .nf
74 If the specified device is grabbed by another client,
75 AlreadyGrabbed is returned\&. If the specified device is frozen
76 by a grab on another device, GrabFrozen is returned\&. If the
77 request is successful, Success is returned\&.
78 .fi
79 .if n \{\
80 .RE
81 .\}
82 .sp
83 .if n \{\
84 .RS 4
85 .\}
86 .nf
87 If the request succeeds, a ChangeDeviceNotify event is sent to
88 all clients that have selected that event\&. A MappingNotify
89 event with request = MappingKeyboard is sent to all clients\&.
90 The specified device becomes the X keyboard and the old X
91 keyboard becomes accessible through the input extension
92 protocol requests\&.
93 .fi
94 .if n \{\
95 .RE
96 .\}
97 .sp
98 .if n \{\
99 .RS 4
100 .\}
101 .nf
102 XChangeKeyboardDevice can generate a BadDevice or a BadMatch
103 error\&.
104 .fi
105 .if n \{\
106 .RE
107 .\}
108 .SH "DIAGNOSTICS"
109 .sp
110 .if n \{\
111 .RS 4
112 .\}
113 .nf
114 BadDevice
115        An invalid device was specified\&. The specified device
116        does not exist, has not been opened by this client via
117        XOpenInputDevice, or is already one of the core X device
118        (pointer or keyboard)\&. This error may also occur if the
119        server implementation does not support using the
120        specified device as the X keyboard\&.
121 .fi
122 .if n \{\
123 .RE
124 .\}
125 .sp
126 .if n \{\
127 .RS 4
128 .\}
129 .nf
130 BadMatch
131        This error may occur if an XChangeKeyboardDevice request
132        was made specifying a device that has no keys\&.
133 .fi
134 .if n \{\
135 .RE
136 .\}
137 .SH "SEE ALSO"
138 .sp
139 .if n \{\
140 .RS 4
141 .\}
142 .nf
143 XChangePointerDevice(libmansuffix)
144 .fi
145 .if n \{\
146 .RE
147 .\}