1 /* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * 9 * All advertising materials mentioning features or use of this software 10 * must display the following acknowledgement: 11 * This product includes software developed by the University of 12 * California, Lawrence Berkeley Laboratories. 13 * 14 * %sccs.include.redist.c% 15 * 16 * from: $Header: kbio.h,v 1.3 92/06/17 05:35:49 torek Exp $ (LBL) 17 * 18 * from: sparc/dev/kbio.h 7.2 (Berkeley) 7/21/92 19 * 20 * @(#)kbio.h 8.1 (Berkeley) 06/10/93 21 */ 22 23 #ifdef notyet 24 /* 25 * The following is a minimal emulation of Sun's `kio' structures 26 * and related operations necessary to make X11 happy (i.e., make it 27 * compile, and make old X11 binaries run). 28 */ 29 30 /* 31 * The kiockey structure apparently gets and/or sets keyboard mappings. 32 * It seems to be kind of useless, but X11 uses it (according to the 33 * comments) to figure out when a Sun 386i has a type-4 keyboard but 34 * claims to have a type-3 keyboard. We need just enough to cause the 35 * appropriate ioctl to return the appropriate magic value. 36 * 37 * KIOCGETKEY fills in kio_entry from kio_station. Not sure what tablemask 38 * is for; X sets it before the call, so it is not an output, but we do not 39 * care anyway. KIOCSDIRECT is supposed to tell the kernel whether to send 40 * keys to the console or to X; we just send them to X whenever the keyboard 41 * is open at all. (XXX may need to change this later) 42 * 43 * Keyboard commands and types are defined in kbd.h as they are actually 44 * real hardware commands and type numbers. 45 */ 46 struct kiockey { 47 int kio_tablemask; /* whatever */ 48 u_char kio_station; /* key number */ 49 u_char kio_entry; /* HOLE if not present */ 50 char kio_text[10]; /* the silly escape sequences (unsupported) */ 51 }; 52 53 #define HOLE 0x302 /* value for kio_entry to say `really type 3' */ 54 55 #define KIOCTRANS _IOW('k', 0, int) /* set translation mode */ 56 /* (we only accept TR_UNTRANS_EVENT) */ 57 #define KIOCGETKEY _IOWR('k', 2, struct kiockey) /* fill in kio_entry */ 58 #define KIOCGTRANS _IOR('k', 5, int) /* get translation mode */ 59 #define KIOCCMD _IOW('k', 8, int) /* X uses this to ring bell */ 60 #define KIOCTYPE _IOR('k', 9, int) /* get keyboard type */ 61 #define KIOCSDIRECT _IOW('k', 10, int) /* keys to console? */ 62 63 #define TR_UNTRANS_EVENT 3 64 #endif 65 66 #define KIOCMOUSE _IOW('k', 20, int) /* enable/disabel to trace mouse motion */ 67