1 /*
2 * Copyright (c) 1992, 2000 Hellmuth Michaelis
3 *
4 * Copyright (c) 1992, 1995 Joerg Wunsch.
5 *
6 * Copyright (c) 1992, 1993 Brian Dunford-Shore and Holger Veit.
7 *
8 * Copyright (C) 1992, 1993 Soeren Schmidt.
9 *
10 * All rights reserved.
11 *
12 * For the sake of compatibility, portions of this code regarding the
13 * X server interface are taken from Soeren Schmidt's syscons driver.
14 *
15 * This code is derived from software contributed to 386BSD by
16 * Holger Veit.
17 *
18 * This code is derived from software contributed to Berkeley by
19 * William Jolitz and Don Ahn.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. All advertising materials mentioning features or use of this software
30 * must display the following acknowledgement:
31 * This product includes software developed by
32 * Hellmuth Michaelis, Brian Dunford-Shore, Joerg Wunsch, Holger Veit
33 * and Soeren Schmidt.
34 * 4. The name authors may not be used to endorse or promote products
35 * derived from this software without specific prior written permission.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
38 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
39 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
40 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
41 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
43 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
46 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 */
48
49 /*---------------------------------------------------------------------------
50 *
51 * pcvt_ioctl.h ioctl's for the VT220 video driver 'pcvt'
52 * ---------------------------------------------------------
53 *
54 * Last Edit-Date: [Fri Mar 31 10:22:29 2000]
55 *
56 * $FreeBSD: releng/5.1/sys/i386/include/pcvt_ioctl.h 58853 2000-03-31 08:29:21Z hm $
57 *
58 *---------------------------------------------------------------------------*/
59
60 #ifndef _MACHINE_PCVT_IOCTL_H_
61 #define _MACHINE_PCVT_IOCTL_H_
62
63 /* pcvt version information for VGAPCVTID ioctl */
64
65 #define PCVTIDNAME "pcvt" /* driver id - string */
66 #define PCVTIDMAJOR 3 /* driver id - major release */
67 #define PCVTIDMINOR 60 /* driver id - minor release */
68
69 #if !defined(_KERNEL)
70 #include <sys/types.h>
71 #endif
72 #include <sys/ioccom.h>
73
74 /*---------------------------------------------------------------------------*
75 * IOCTLs for MF II and AT Keyboards
76 *---------------------------------------------------------------------------*/
77
78 #define KBDRESET _IO('K', 1) /* reset keyboard / set defaults */
79 #define KBDGTPMAT _IOR('K', 2, int) /* get current typematic value */
80 #define KBDSTPMAT _IOW('K', 3, int) /* set current typematic value */
81
82 /* Typematic Delay Values */
83
84 #define KBD_TPD250 0x00 /* 250 ms */
85 #define KBD_TPD500 0x20 /* 500 ms */
86 #define KBD_TPD750 0x40 /* 750 ms */
87 #define KBD_TPD1000 0x60 /* 1000 ms */
88
89 /* Typematic Repeat Rate */
90
91 #define KBD_TPM300 0x00 /* 30.0 char/second */
92 #define KBD_TPM267 0x01 /* 26.7 char/second */
93 #define KBD_TPM240 0x02 /* 24.0 char/second */
94 #define KBD_TPM218 0x03 /* 21.8 char/second */
95 #define KBD_TPM200 0x04 /* 20.0 char/second */
96 #define KBD_TPM185 0x05 /* 18.5 char/second */
97 #define KBD_TPM171 0x06 /* 17.1 char/second */
98 #define KBD_TPM160 0x07 /* 16.0 char/second */
99 #define KBD_TPM150 0x08 /* 15.0 char/second */
100 #define KBD_TPM133 0x09 /* 13.3 char/second */
101 #define KBD_TPM120 0x0A /* 12.0 char/second */
102 #define KBD_TPM109 0x0B /* 10.9 char/second */
103 #define KBD_TPM100 0x0C /* 10.0 char/second */
104 #define KBD_TPM92 0x0D /* 9.2 char/second */
105 #define KBD_TPM86 0x0E /* 8.6 char/second */
106 #define KBD_TPM80 0x0F /* 8.0 char/second */
107 #define KBD_TPM75 0x10 /* 7.5 char/second */
108 #define KBD_TPM67 0x11 /* 6.7 char/second */
109 #define KBD_TPM60 0x12 /* 6.0 char/second */
110 #define KBD_TPM55 0x13 /* 5.5 char/second */
111 #define KBD_TPM50 0x14 /* 5.0 char/second */
112 #define KBD_TPM46 0x15 /* 4.6 char/second */
113 #define KBD_TPM43 0x16 /* 4.3 char/second */
114 #define KBD_TPM40 0x17 /* 4.0 char/second */
115 #define KBD_TPM37 0x18 /* 3.7 char/second */
116 #define KBD_TPM33 0x19 /* 3.3 char/second */
117 #define KBD_TPM30 0x1A /* 3.0 char/second */
118 #define KBD_TPM27 0x1B /* 2.7 char/second */
119 #define KBD_TPM25 0x1C /* 2.5 char/second */
120 #define KBD_TPM23 0x1D /* 2.3 char/second */
121 #define KBD_TPM21 0x1E /* 2.1 char/second */
122 #define KBD_TPM20 0x1F /* 2.0 char/second */
123
124 #define KBDGREPSW _IOR('K', 4, int) /* get key repetition switch */
125 #define KBDSREPSW _IOW('K', 5, int) /* set key repetition switch */
126 #define KBD_REPEATOFF 0
127 #define KBD_REPEATON 1
128
129 #define KBDGLEDS _IOR('K', 6, int) /* get LED state */
130 #define KBDSLEDS _IOW('K', 7, int) /* set LED state, does not influence */
131 #define KBD_SCROLLLOCK 0x0001 /* the driver's idea of lock key state */
132 #define KBD_NUMLOCK 0x0002
133 #define KBD_CAPSLOCK 0x0004
134 #define KBDGLOCK _IOR('K', 8, int) /* gets state of SCROLL,NUM,CAPS */
135 #define KBDSLOCK _IOW('K', 9, int) /* sets state of SCROLL,NUM,CAPS + LEDs */
136
137 #define KBDMAXOVLKEYSIZE 15 /* + zero byte */
138
139 struct kbd_ovlkey /* complete definition of a key */
140 {
141 u_short keynum; /* the key itself */
142 u_short type; /* type of key, see below */
143 u_char subu; /* subtype, ignored on write */
144 char unshift[KBDMAXOVLKEYSIZE+1]; /* emitted string, unshifted */
145 u_char subs; /* subtype, ignored on write */
146 char shift[KBDMAXOVLKEYSIZE+1]; /* emitted string, shifted */
147 u_char subc; /* subtype, ignored on write */
148 char ctrl[KBDMAXOVLKEYSIZE+1]; /* emitted string, control */
149 u_char suba; /* subtype, ignored on write */
150 char altgr[KBDMAXOVLKEYSIZE+1]; /* emitted string, altgr */
151 };
152
153 /* Max value for keynum field */
154
155 #define KBDMAXKEYS 128 /* Max No. of Keys */
156
157 /* Values for type field */
158
159 #define KBD_NONE 0 /* no function, key is disabled */
160 #define KBD_SHIFT 1 /* keyboard shift */
161 #define KBD_META 2 /* alternate shift, sets bit8 to ASCII code */
162 #define KBD_NUM 3 /* numeric shift, keypad num / appl */
163 #define KBD_CTL 4 /* control code generation */
164 #define KBD_CAPS 5 /* caps shift - swaps case of letter */
165 #define KBD_ASCII 6 /* ascii code generating key */
166 #define KBD_SCROLL 7 /* stop output */
167 #define KBD_FUNC 8 /* function key */
168 #define KBD_KP 9 /* keypad keys */
169 #define KBD_BREAK 10 /* ignored */
170 #define KBD_ALTGR 11 /* AltGr Translation feature */
171 #define KBD_SHFTLOCK 12 /* shiftlock */
172 #define KBD_CURSOR 13 /* cursor keys */
173 #define KBD_RETURN 14 /* RETURN/ENTER keys */
174
175 /* Values for subtype field */
176
177 #define KBD_SUBT_STR 0 /* key is bound to a string */
178 #define KBD_SUBT_FNC 1 /* key is bound to a function */
179
180
181 #define KBD_OVERLOAD 0x8000 /* Key is overloaded, ignored in ioctl */
182 #define KBD_MASK (~KBD_OVERLOAD) /* mask for type */
183
184 #define KBDGCKEY _IOWR('K',16, struct kbd_ovlkey) /* get current key values */
185 #define KBDSCKEY _IOW('K',17, struct kbd_ovlkey) /* set new key assignment values*/
186 #define KBDGOKEY _IOWR('K',18, struct kbd_ovlkey) /* get original key assignment values*/
187
188 #define KBDRMKEY _IOW('K',19, int) /* remove a key assignment */
189 #define KBDDEFAULT _IO('K',20) /* remove all key assignments */
190
191 /*---------------------------------------------------------------------------*
192 * IOCTLs for Video Adapter
193 *---------------------------------------------------------------------------*/
194
195 /* Definition of PC Video Adaptor Types */
196
197 #define UNKNOWN_ADAPTOR 0 /* Unidentified adaptor ... */
198 #define MDA_ADAPTOR 1 /* Monochrome Display Adaptor/Hercules Graphics Card */
199 #define CGA_ADAPTOR 2 /* Color Graphics Adaptor */
200 #define EGA_ADAPTOR 3 /* Enhanced Graphics Adaptor */
201 #define VGA_ADAPTOR 4 /* Video Graphics Adaptor/Array */
202
203 /* Definitions of Monitor types */
204
205 #define MONITOR_MONO 0 /* Monochrome Monitor */
206 #define MONITOR_COLOR 1 /* Color Monitor */
207
208 /* Types of VGA chips detectable by current driver version */
209
210 #define VGA_F_NONE 0 /* FAMILY NOT KNOWN */
211 #define VGA_UNKNOWN 0 /* default, no 132 columns */
212
213 #define VGA_F_TSENG 1 /* FAMILY TSENG */
214 #define VGA_ET4000 1 /* Tseng Labs ET4000 */
215 #define VGA_ET3000 2 /* Tseng Labs ET3000 */
216
217 #define VGA_F_WD 2 /* FAMILY WD */
218 #define VGA_PVGA 3 /* Western Digital Paradise VGA */
219 #define VGA_WD90C00 4 /* Western Digital WD90C00 */
220 #define VGA_WD90C10 5 /* Western Digital WD90C10 */
221 #define VGA_WD90C11 6 /* Western Digital WD90C11 */
222
223 #define VGA_F_V7 3 /* FAMILY VIDEO 7 */
224 #define VGA_V7VEGA 7 /* Video 7 VEGA VGA */
225 #define VGA_V7FWVR 8 /* Video 7 FASTWRITE/VRAM */
226 #define VGA_V7V5 9 /* Video 7 Version 5 */
227 #define VGA_V71024I 10 /* Video 7 1024i */
228 #define VGA_V7UNKNOWN 11 /* Video 7 unknown board .. */
229
230 #define VGA_F_TRI 4 /* FAMILY TRIDENT */
231 #define VGA_TR8800BR 12 /* Trident TVGA 8800BR */
232 #define VGA_TR8800CS 13 /* Trident TVGA 8800CS */
233 #define VGA_TR8900B 14 /* Trident TVGA 8900B */
234 #define VGA_TR8900C 15 /* Trident TVGA 8900C */
235 #define VGA_TR8900CL 16 /* Trident TVGA 8900CL */
236 #define VGA_TR9000 17 /* Trident TVGA 9000 */
237 #define VGA_TR9100 18 /* Trident TVGA 9100 */
238 #define VGA_TR9200 19 /* Trident TVGA 9200 */
239 #define VGA_TRUNKNOWN 20 /* Trident unknown */
240
241 #define VGA_F_S3 5 /* FAMILY S3 */
242 #define VGA_S3_911 21 /* S3 911 */
243 #define VGA_S3_924 22 /* S3 924 */
244 #define VGA_S3_80x 23 /* S3 801/805 */
245 #define VGA_S3_928 24 /* S3 928 */
246 #define VGA_S3_UNKNOWN 25 /* unknown S3 chipset */
247
248 #define VGA_F_CIR 6 /* FAMILY CIRRUS */
249 #define VGA_CL_GD5402 26 /* Cirrus CL-GD5402 */
250 #define VGA_CL_GD5402r1 27 /* Cirrus CL-GD5402r1 */
251 #define VGA_CL_GD5420 28 /* Cirrus CL-GD5420 */
252 #define VGA_CL_GD5420r1 29 /* Cirrus CL-GD5420r1 */
253 #define VGA_CL_GD5422 30 /* Cirrus CL-GD5422 */
254 #define VGA_CL_GD5424 31 /* Cirrus CL-GD5424 */
255 #define VGA_CL_GD5426 32 /* Cirrus CL-GD5426 */
256 #define VGA_CL_GD5428 33 /* Cirrus CL-GD5428 */
257
258 /*****************************************************************************/
259 /* NOTE: update the 'scon' utility when adding support for more chipsets !!! */
260 /*****************************************************************************/
261
262 /* Definitions of Vertical Screen Sizes for EGA/VGA Adaptors */
263
264 #define SIZ_25ROWS 0 /* VGA: 25 lines, 8x16 font */
265 /* EGA: 25 lines, 8x14 font */
266 #define SIZ_28ROWS 1 /* VGA: 28 lines, 8x14 font */
267 #define SIZ_35ROWS 2 /* EGA: 35 lines, 8x10 font */
268 #define SIZ_40ROWS 3 /* VGA: 40 lines, 8x10 font */
269 #define SIZ_43ROWS 4 /* EGA: 43 lines, 8x8 font */
270 #define SIZ_50ROWS 5 /* VGA: 50 lines, 8x8 font */
271
272 /* Definitions of Font Sizes for EGA/VGA Adaptors */
273
274 #define FNT_8x16 0 /* 8x16 Pixel Font, only VGA */
275 #define FNT_8x14 1 /* 8x14 Pixel Font, EGA/VGA */
276 #define FNT_8x10 2 /* 8x10 Pixel Font, EGA/VGA */
277 #define FNT_8x8 3 /* 8x8 Pixel Font, EGA/VGA */
278
279 /* Definitions of Character Set (Font) Numbers */
280
281 #define CH_SET0 0 /* Character Set (Font) 0, EGA/VGA */
282 #define CH_SET1 1 /* Character Set (Font) 1, EGA/VGA */
283 #define CH_SET2 2 /* Character Set (Font) 2, EGA/VGA */
284 #define CH_SET3 3 /* Character Set (Font) 3, EGA/VGA */
285 #define CH_SETMAX_EGA 3 /* EGA has 4 Character Sets / Fonts */
286 #define CH_SET4 4 /* Character Set (Font) 4, VGA */
287 #define CH_SET5 5 /* Character Set (Font) 5, VGA */
288 #define CH_SET6 6 /* Character Set (Font) 6, VGA */
289 #define CH_SET7 7 /* Character Set (Font) 7, VGA */
290 #define CH_SETMAX_VGA 7 /* VGA has 8 Character Sets / Fonts */
291
292 /* Definitions of Terminal Emulation Modes */
293
294 #define M_HPVT 0 /* VTxxx and HP Mode, Labels & Status Line on */
295 #define M_PUREVT 1 /* only VTxxx Sequences recognized, no Labels */
296
297 /*---*/
298
299 #define VGACURSOR _IOW('V',100, struct cursorshape) /* set cursor shape */
300
301 struct cursorshape {
302 int screen_no; /* screen number for which to set, */
303 /* or -1 to set on current active screen */
304 int start; /* top scanline, range 0... Character Height - 1 */
305 int end; /* end scanline, range 0... Character Height - 1 */
306 };
307
308 #define VGALOADCHAR _IOW('V',101, struct vgaloadchar) /* load vga char */
309
310 struct vgaloadchar {
311 int character_set; /* VGA character set to load into */
312 int character; /* Character to load */
313 int character_scanlines; /* Scanlines per character */
314 u_char char_table[32]; /* VGA character shape table */
315 };
316
317 #define VGASETFONTATTR _IOW('V',102, struct vgafontattr) /* set font attr */
318 #define VGAGETFONTATTR _IOWR('V',103, struct vgafontattr) /* get font attr */
319
320 struct vgafontattr {
321 int character_set; /* VGA character set */
322 int font_loaded; /* Mark font loaded or unloaded */
323 int screen_size; /* Character rows per screen */
324 int character_scanlines; /* Scanlines per character - 1 */
325 int screen_scanlines; /* Scanlines per screen - 1 byte */
326 };
327
328 #define VGASETSCREEN _IOW('V',104, struct screeninfo) /* set screen info */
329 #define VGAGETSCREEN _IOWR('V',105, struct screeninfo) /* get screen info */
330
331 struct screeninfo {
332 int adaptor_type; /* type of video adaptor installed */
333 /* read only, ignored on write */
334 int monitor_type; /* type of monitor (mono/color)installed*/
335 /* read only, ignored on write */
336 int totalfonts; /* no of downloadable fonts */
337 /* read only, ignored on write */
338 int totalscreens; /* no of virtual screens */
339 /* read only, ignored on write */
340 int screen_no; /* screen number, this was got from */
341 /* on write, if -1, apply pure_vt_mode */
342 /* and/or screen_size to current screen */
343 /* else to screen_no supplied */
344 int current_screen; /* screen number, which is displayed. */
345 /* on write, if -1, make this screen */
346 /* the current screen, else set current */
347 /* displayed screen to parameter */
348 int pure_vt_mode; /* flag, pure VT mode or HP/VT mode */
349 /* on write, if -1, no change */
350 int screen_size; /* screen size */
351 /* on write, if -1, no change */
352 int force_24lines; /* force 24 lines if 25 lines VT mode */
353 /* or 28 lines HP mode to get pure */
354 /* VT220 screen size */
355 /* on write, if -1, no change */
356 int vga_family; /* if adaptor_type = VGA, this reflects */
357 /* the chipset family after a read */
358 /* nothing happens on write ... */
359 int vga_type; /* if adaptor_type = VGA, this reflects */
360 /* the chipset after a read */
361 /* nothing happens on write ... */
362 int vga_132; /* set to 1 if driver has support for */
363 /* 132 column operation for chipset */
364 /* currently ignored on write */
365 };
366
367 #define VGAREADPEL _IOWR('V', 110, struct vgapel) /*r VGA palette entry */
368 #define VGAWRITEPEL _IOW('V', 111, struct vgapel) /*w VGA palette entry */
369
370 struct vgapel {
371 unsigned idx; /* index into palette, 0 .. 255 valid */
372 unsigned r, g, b; /* RGB values, masked by VGA_PMASK (63) */
373 };
374
375 /* NOTE: The next ioctl is only valid if option PCVT_SCREENSAVER is configured*/
376 /* this is *not* restricted to VGA's, but won't introduce new garbage... */
377
378 #define VGASCREENSAVER _IOW('V', 112, int) /* set timeout for screen */
379 /* saver in seconds; 0 turns */
380 /* it off */
381
382 #define VGAPCVTID _IOWR('V',113, struct pcvtid) /* get driver id */
383
384 struct pcvtid { /* THIS STRUCTURE IS NOW FROZEN !!! */
385 #define PCVTIDNAMELN 16 /* driver id - string length */
386 char name[PCVTIDNAMELN]; /* driver name, == PCVTIDSTR */
387 int rmajor; /* revision number, major */
388 int rminor; /* revision number, minor */
389 }; /* END OF COLD PART ... */
390
391 #define VGAPCVTINFO _IOWR('V',114, struct pcvtinfo) /* get driver info */
392
393 struct pcvtinfo { /* compile time option values */
394 u_int nscreens; /* PCVT_NSCREENS */
395 u_int scanset; /* PCVT_SCANSET */
396 u_int updatefast; /* PCVT_UPDATEFAST */
397 u_int updateslow; /* PCVT_UPDATESLOW */
398 u_int sysbeepf; /* PCVT_SYSBEEPF */
399 u_int pcburst; /* PCVT_PCBURST */
400 u_int kbd_fifo_sz; /* PCVT_KBD_FIFO_SZ */
401
402 /* config booleans */
403
404 u_long compile_opts; /* PCVT_xxxxxxxxxxxxxxx */
405
406 #define CONF_VT220KEYB 0x00000001
407 #define CONF_SCREENSAVER 0x00000002
408 #define CONF_PRETTYSCRNS 0x00000004
409 #define CONF_CTRL_ALT_DEL 0x00000008
410 #define CONF_USEKBDSEC 0x00000010
411 #define CONF_24LINESDEF 0x00000020
412 #define CONF_SHOWKEYS 0x00000040
413 #define CONF_NULLCHARS 0x00000080
414 #define CONF_SETCOLOR 0x00000100
415 #define CONF_132GENERIC 0x00000200
416 #define CONF_XSERVER 0x00000400
417 #define CONF_INHIBIT_NUMLOCK 0x00000800
418 #define CONF_META_ESC 0x00001000
419 #define CONF_SLOW_INTERRUPT 0x00002000
420 #define CONF_NO_LED_UPDATE 0x00004000
421 #define CONF_GREENSAVER 0x00008000
422 };
423
424 #define VGASETCOLMS _IOW('V', 115, int) /* set number of columns (80/132)*/
425
426 /*
427 * start of USL VT compatibility stuff (in case XSERVER defined)
428 * these definitions must match those ones used by syscons
429 *
430 * Note that some of the ioctl command definitions below break the Berkeley
431 * style. They accept a parameter of type "int" (instead of Berkeley style
432 * "int *") in order to pass a single integer to the ioctl. These macros
433 * below are marked with a dummy "int" comment. Dont blame anyone else
434 * than USL for that braindeadness. It is done here to be a bit source-
435 * level compatible to SysV. (N.B., within the ioctl, the argument is
436 * dereferenced by "int *" anyway. The translation is done by the upper-
437 * level ioctl stuff.)
438 */
439
440 /*
441 * NB: Some of the definitions below apparently override the definitions
442 * in the KBD section above. But, due to BSDs encoding of the IO direction
443 * and transfer size, the resulting ioctl cmds differ, so we can take them
444 * here. The only real conflict would appear if we implemented KDGKBMODE,
445 * which would be identical to KBDGLEDS above. Since this command is not
446 * necessary for XFree86 2.0, we omit it.
447 */
448
449 /* #define KDGKBMODE _IOR('K', 6, int) */ /* not yet implemented */
450
451 #define KDSKBMODE _IO('K', 7 /*, int */)
452 #define K_RAW 0 /* keyboard returns scancodes */
453 #define K_XLATE 1 /* keyboard returns ascii */
454
455 #define KDMKTONE _IO('K', 8 /*, int */)
456
457 /* #define KDGETMODE _IOR('K', 9, int) */ /* not yet implemented */
458
459 #define KDSETMODE _IO('K', 10 /*, int */)
460 #define KD_TEXT 0 /* set text mode restore fonts */
461 #define KD_GRAPHICS 1 /* set graphics mode */
462
463 /* we cannot see any sense to support KD_TEXT0 or KD_TEXT1 */
464
465 #define KDENABIO _IO('K', 60) /* only allowed if euid == 0 */
466 #define KDDISABIO _IO('K', 61)
467
468 #define KDGETLED _IOR('K', 65, int)
469 #define KDSETLED _IO('K', 66 /*, int */)
470 #define LED_CAP 1
471 #define LED_NUM 2
472 #define LED_SCR 4
473
474 #define KDSETRAD _IO('K', 67 /*, int */)
475
476 /*
477 * Note that since our idea of key mapping is much different from the
478 * SysV style, we _only_ support mapping layers base (0), shifted (1),
479 * alt (4), and alt-shift (5), and only for the basic keys (without
480 * any function keys). This is what XFree86 2.0+ needs to establish
481 * the default X keysym mapping.
482 */
483 #define GIO_KEYMAP _IOR('k', 6, keymap_t)
484
485 #define VT_OPENQRY _IOR('v', 1, int)
486 #define VT_SETMODE _IOW('v', 2, vtmode_t)
487 #define VT_GETMODE _IOR('v', 3, vtmode_t)
488
489 #define VT_RELDISP _IO('v', 4 /*, int */)
490
491 /* acceptable values for the VT_RELDISP command */
492
493 #define VT_FALSE 0 /* release of VT refused */
494 #define VT_TRUE 1 /* VT released */
495 #define VT_ACKACQ 2 /* acknowledging VT acquisition */
496
497
498 #define VT_ACTIVATE _IO('v', 5 /*, int */)
499 #define VT_WAITACTIVE _IO('v', 6 /*, int */)
500 #define VT_GETACTIVE _IOR('v', 7, int)
501
502 #ifndef _VT_MODE_DECLARED
503 #define _VT_MODE_DECLARED
504 struct vt_mode {
505 char mode;
506
507 #define VT_AUTO 0 /* switching controlled by drvr */
508 #define VT_PROCESS 1 /* switching controlled by prog */
509
510 char waitv; /* not implemented yet SOS */
511 short relsig;
512 short acqsig;
513 short frsig; /* not implemented yet SOS */
514 };
515
516 typedef struct vt_mode vtmode_t;
517 #endif /* !_VT_MODE_DECLARED */
518
519 #define NUM_KEYS 256
520 #define NUM_STATES 8
521
522 #ifndef _KEYMAP_DECLARED
523 #define _KEYMAP_DECLARED
524 struct keyent_t {
525 u_char map[NUM_STATES];
526 u_char spcl;
527 u_char flgs;
528 };
529
530 struct keymap {
531 u_short n_keys;
532 struct keyent_t key[NUM_KEYS];
533 };
534
535 typedef struct keymap keymap_t;
536 #endif /* !_KEYMAP_DECLARED */
537
538 /* end of USL VT compatibility stuff */
539
540 #endif /* !_MACHINE_PCVT_IOCTL_H_ */
Cache object: 5c1441e7d1e0633efd19b96f15ad065d
|