1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= xorg-driver-input-keyboard
7 SDESC[standard]= X.org keyboard input driver
8 HOMEPAGE= https://www.x.org/
12 SITES[main]= XORG/individual/driver
13 DISTFILE[1]= xf86-input-keyboard-2.0.0.tar.xz:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
22 BUILDRUN_DEPENDS= xorg-server:single:standard
25 XORG_COMPONENTS= xorgproto
27 DISTNAME= xf86-input-keyboard-2.0.0
30 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
33 FPC_EQUIVALENT= x11-drivers/xf86-input-keyboard
37 INSTALL_TARGET= install-strip
39 VAR_OPSYS[sunos]= CFLAGS=-D__EXTENSIONS__
41 [FILE:60:descriptions/desc.single]
42 This package contains the X.Org xf86-input-keyboard driver.
46 3266fdf1a2175fd4fe999527ae8527cc59f3f01a1d6271ad474bff0b9451feb9 292208 xf86-input-keyboard-2.0.0.tar.xz
49 [FILE:58:manifests/plist.single]
50 lib/xorg/modules/input/kbd_drv.so
51 share/man/man4/kbd.4.gz
54 [FILE:2114:patches/patch-src_at__scancode.c]
55 --- src/at_scancode.c.orig 2022-07-10 23:28:06 UTC
57 @@ -82,6 +82,10 @@ ATScancode(InputInfoPtr pInfo, int *scan
61 + case 0x1e: *scanCode = KEY_AudioRaise;break;
62 + case 0x1f: *scanCode = KEY_AudioLower;break;
63 + case 0x20: *scanCode = KEY_Power; break;
64 + case 0x25: *scanCode = KEY_Mute; break;
65 case KEY_KP_7: *scanCode = KEY_Home; break; /* curs home */
66 case KEY_KP_8: *scanCode = KEY_Up; break; /* curs up */
67 case KEY_KP_9: *scanCode = KEY_PgUp; break; /* curs pgup */
68 @@ -102,6 +106,17 @@ ATScancode(InputInfoPtr pInfo, int *scan
69 case 0x5b: *scanCode = KEY_LMeta; break;
70 case 0x5c: *scanCode = KEY_RMeta; break;
71 case 0x5d: *scanCode = KEY_Menu; break;
72 + case 0x5e: *scanCode = KEY_L1; break; /* stop */
73 + case 0x5f: *scanCode = KEY_L2; break; /* again */
74 + case 0x60: *scanCode = KEY_L3; break; /* props */
75 + case 0x61: *scanCode = KEY_L4; break; /* undo */
76 + case 0x62: *scanCode = KEY_L5; break; /* front */
77 + case 0x63: *scanCode = KEY_L6; break; /* copy */
78 + case 0x64: *scanCode = KEY_L7; break; /* open */
79 + case 0x65: *scanCode = KEY_L8; break; /* paste */
80 + case 0x66: *scanCode = KEY_L9; break; /* find */
81 + case 0x67: *scanCode = KEY_L10; break; /* cut */
82 + case 0x68: *scanCode = KEY_Help; break;
83 case KEY_F3: *scanCode = KEY_F13; break;
84 case KEY_F4: *scanCode = KEY_F14; break;
85 case KEY_F5: *scanCode = KEY_F15; break;
88 [FILE:8979:patches/patch-src_bsd__KbdMap.c]
89 Don't query console keymap
91 This seems to be useless and doesn't work anymore with vt(4), due to the
92 use of Unicode codepoints in vt(4). So remove the related code. This fixes
93 a segmentation fault during X.Org server startup.
96 Submitted by: Claude Buisson <clbuisson@orange.fr> (earlier version)
98 --- src/bsd_KbdMap.c.orig 2022-07-10 23:28:06 UTC
101 #include "xf86Keymap.h"
104 -#if (defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT)) && defined(GIO_KEYMAP)
105 -#define KD_GET_ENTRY(i,n) \
106 - eascii_to_x[((keymap.key[i].spcl << (n+1)) & 0x100) + keymap.key[i].map[n]]
108 -static unsigned char remap[NUM_KEYCODES] = {
109 - 0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00 - 0x07 */
110 - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08 - 0x0f */
111 - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10 - 0x17 */
112 - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18 - 0x1f */
113 - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20 - 0x27 */
114 - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28 - 0x2f */
115 - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0, /* 0x30 - 0x37 */
116 - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38 - 0x3f */
117 - 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0, /* 0x40 - 0x47 */
118 - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 - 0x4f */
119 - 0, 0, 0, 0, 0, 0, 0x56, 0x57, /* 0x50 - 0x57 */
120 - 0x58, 0, 0, 0, 0, 0, 0, 0, /* 0x58 - 0x5f */
121 - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x67 */
122 - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 - 0x6f */
123 - 0, 0, 0x69, 0x65, 0, 0, 0, 0, /* 0x70 - 0x77 */
124 - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 - 0x7f */
127 -/* This table assumes the ibm code page 437 coding for characters
128 - * > 0x80. They are returned in this form by PCVT */
129 -static KeySym eascii_to_x[512] = {
130 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
131 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
132 - XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol,
133 - NoSymbol, XK_Return, NoSymbol, NoSymbol,
134 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
135 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
136 - NoSymbol, NoSymbol, NoSymbol, XK_Escape,
137 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
138 - XK_space, XK_exclam, XK_quotedbl, XK_numbersign,
139 - XK_dollar, XK_percent, XK_ampersand, XK_apostrophe,
140 - XK_parenleft, XK_parenright, XK_asterisk, XK_plus,
141 - XK_comma, XK_minus, XK_period, XK_slash,
142 - XK_0, XK_1, XK_2, XK_3,
143 - XK_4, XK_5, XK_6, XK_7,
144 - XK_8, XK_9, XK_colon, XK_semicolon,
145 - XK_less, XK_equal, XK_greater, XK_question,
146 - XK_at, XK_A, XK_B, XK_C,
147 - XK_D, XK_E, XK_F, XK_G,
148 - XK_H, XK_I, XK_J, XK_K,
149 - XK_L, XK_M, XK_N, XK_O,
150 - XK_P, XK_Q, XK_R, XK_S,
151 - XK_T, XK_U, XK_V, XK_W,
152 - XK_X, XK_Y, XK_Z, XK_bracketleft,
153 - XK_backslash, XK_bracketright,XK_asciicircum, XK_underscore,
154 - XK_grave, XK_a, XK_b, XK_c,
155 - XK_d, XK_e, XK_f, XK_g,
156 - XK_h, XK_i, XK_j, XK_k,
157 - XK_l, XK_m, XK_n, XK_o,
158 - XK_p, XK_q, XK_r, XK_s,
159 - XK_t, XK_u, XK_v, XK_w,
160 - XK_x, XK_y, XK_z, XK_braceleft,
161 - XK_bar, XK_braceright, XK_asciitilde, XK_Delete,
162 - XK_Ccedilla, XK_udiaeresis, XK_eacute, XK_acircumflex,
163 - XK_adiaeresis, XK_agrave, XK_aring, XK_ccedilla,
164 - XK_ecircumflex, XK_ediaeresis, XK_egrave, XK_idiaeresis,
165 - XK_icircumflex, XK_igrave, XK_Adiaeresis, XK_Aring,
166 - XK_Eacute, XK_ae, XK_AE, XK_ocircumflex,
167 - XK_odiaeresis, XK_ograve, XK_ucircumflex, XK_ugrave,
168 - XK_ydiaeresis, XK_Odiaeresis, XK_Udiaeresis, XK_cent,
169 - XK_sterling, XK_yen, XK_paragraph, XK_section,
170 - XK_aacute, XK_iacute, XK_oacute, XK_uacute,
171 - XK_ntilde, XK_Ntilde, XK_ordfeminine, XK_masculine,
172 - XK_questiondown,XK_hyphen, XK_notsign, XK_onehalf,
173 - XK_onequarter, XK_exclamdown, XK_guillemotleft,XK_guillemotright,
174 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
175 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
176 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
177 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
178 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
179 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
180 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
181 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
182 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
183 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
184 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
185 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
186 - XK_Greek_alpha, XK_ssharp, XK_Greek_GAMMA, XK_Greek_pi,
187 - XK_Greek_SIGMA, XK_Greek_sigma, XK_mu, XK_Greek_tau,
188 - XK_Greek_PHI, XK_Greek_THETA, XK_Greek_OMEGA, XK_Greek_delta,
189 - XK_infinity, XK_Ooblique, XK_Greek_epsilon, XK_intersection,
190 - XK_identical, XK_plusminus, XK_greaterthanequal, XK_lessthanequal,
191 - XK_topintegral, XK_botintegral, XK_division, XK_similarequal,
192 - XK_degree, NoSymbol, NoSymbol, XK_radical,
193 - XK_Greek_eta, XK_twosuperior, XK_periodcentered, NoSymbol,
196 - * special marked entries (256 + x)
199 - /* This has been checked against what syscons actually does */
200 - NoSymbol, NoSymbol, XK_Shift_L, XK_Shift_R,
201 - XK_Caps_Lock, XK_Num_Lock, XK_Scroll_Lock, XK_Alt_L,
202 - XK_ISO_Left_Tab,XK_Control_L, NoSymbol, NoSymbol,
203 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
204 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
205 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
206 - NoSymbol, NoSymbol, NoSymbol, XK_F1,
207 - XK_F2, XK_F3, XK_F4, XK_F5,
208 - XK_F6, XK_F7, XK_F8, XK_F9,
209 - XK_F10, XK_F11, XK_F12, NoSymbol,
210 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
211 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
212 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
213 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
214 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
215 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
216 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
217 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
218 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
219 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
220 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
221 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
222 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
223 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
224 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
225 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
226 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
227 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
228 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
229 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
230 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
231 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
232 - XK_Control_R, XK_Alt_R, NoSymbol, NoSymbol,
233 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
234 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
235 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
236 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
237 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
238 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
239 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
240 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
241 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
242 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
243 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
244 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
245 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
246 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
247 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
248 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
249 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
250 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
251 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
252 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
253 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
254 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
255 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
256 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
257 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
258 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
259 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
260 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
261 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
262 - NoSymbol, NoSymbol, NoSymbol, NoSymbol,
263 - NoSymbol, NoSymbol, NoSymbol, NoSymbol
266 #ifdef SYSCONS_SUPPORT
268 unsigned char sysconsCODEMap[] = {
269 @@ -205,7 +43,6 @@ TransMapRec sysconsCODE = {
273 -#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
275 #ifdef WSCONS_SUPPORT
277 @@ -1261,40 +1098,6 @@ KbdGetMapping (InputInfoPtr pInfo, KeySy
282 - switch (pKbd->consType) {
285 - * XXX wscons has no GIO_KEYMAP
287 -#if (defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)) && defined(GIO_KEYMAP)
293 - if (ioctl(pInfo->fd, GIO_KEYMAP, &keymap) != -1) {
294 - for (i = 0; i < keymap.n_keys && i < NUM_KEYCODES; i++)
296 - k = map + (remap[i] << 2);
297 - k[0] = KD_GET_ENTRY(i,0); /* non-shifed */
298 - k[1] = KD_GET_ENTRY(i,1); /* shifted */
299 - k[2] = KD_GET_ENTRY(i,4); /* alt */
300 - k[3] = KD_GET_ENTRY(i,5); /* alt - shifted */
301 - if (k[3] == k[2]) k[3] = NoSymbol;
302 - if (k[2] == k[1]) k[2] = NoSymbol;
303 - if (k[1] == k[0]) k[1] = NoSymbol;
304 - if (k[0] == k[2] && k[1] == k[3])
305 - k[2] = k[3] = NoSymbol;
310 -#endif /* SYSCONS || PCVT */
316 * compute the modifier map
320 [FILE:346:patches/patch-src_bsd__kbd.c]
321 --- src/bsd_kbd.c.orig 2022-07-10 23:28:06 UTC
323 @@ -237,6 +237,12 @@ KbdOn(InputInfoPtr pInfo, int what)
328 + * Switch keyboards which are not attached to console in RAW mode
330 +#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
331 + ioctl(pInfo->fd, KDSKBMODE, K_RAW);
338 [FILE:665:patches/patch-src_kdb.c]
339 --- src/kbd.c.orig 2022-07-10 23:28:06 UTC
344 #include "atKeynames.h"
345 +#include "xf86Priv.h"
346 #include "xf86Privstr.h"
348 #include <X11/extensions/XI.h>
349 @@ -382,6 +383,14 @@ KbdProc(DeviceIntPtr device, int what)
351 pKbd->KbdOff(pInfo, what);
352 device->public.on = FALSE;
354 + * Close device file for keyboards which are not attached
355 + * to console, otherwise they can't be opened again after
356 + * relogin when using session manager like xdm.
357 + * X server will take care about console attached keyboards.
359 + if (pInfo->fd != xf86Info.consoleFd)