xref: /csrg-svn/sys/luna68k/dev/kbio.h (revision 63192)
157377Sakito /*
2*63192Sbostic  * Copyright (c) 1992, 1993
3*63192Sbostic  *	The Regents of the University of California.  All rights reserved.
457377Sakito  *
557377Sakito  * This software was developed by the Computer Systems Engineering group
657377Sakito  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
757377Sakito  * contributed to Berkeley.
857377Sakito  *
957377Sakito  * All advertising materials mentioning features or use of this software
1057377Sakito  * must display the following acknowledgement:
1157377Sakito  *	This product includes software developed by the University of
1257377Sakito  *	California, Lawrence Berkeley Laboratories.
1357377Sakito  *
1457377Sakito  * %sccs.include.redist.c%
1557377Sakito  *
1657377Sakito  * from: $Header: kbio.h,v 1.3 92/06/17 05:35:49 torek Exp $ (LBL)
1757377Sakito  *
1857377Sakito  * from: sparc/dev/kbio.h	7.2 (Berkeley) 7/21/92
1957377Sakito  *
20*63192Sbostic  *	@(#)kbio.h	8.1 (Berkeley) 06/10/93
2157377Sakito  */
2257377Sakito 
2357377Sakito #ifdef	notyet
2457377Sakito /*
2557377Sakito  * The following is a minimal emulation of Sun's `kio' structures
2657377Sakito  * and related operations necessary to make X11 happy (i.e., make it
2757377Sakito  * compile, and make old X11 binaries run).
2857377Sakito  */
2957377Sakito 
3057377Sakito /*
3157377Sakito  * The kiockey structure apparently gets and/or sets keyboard mappings.
3257377Sakito  * It seems to be kind of useless, but X11 uses it (according to the
3357377Sakito  * comments) to figure out when a Sun 386i has a type-4 keyboard but
3457377Sakito  * claims to have a type-3 keyboard.  We need just enough to cause the
3557377Sakito  * appropriate ioctl to return the appropriate magic value.
3657377Sakito  *
3757377Sakito  * KIOCGETKEY fills in kio_entry from kio_station.  Not sure what tablemask
3857377Sakito  * is for; X sets it before the call, so it is not an output, but we do not
3957377Sakito  * care anyway.  KIOCSDIRECT is supposed to tell the kernel whether to send
4057377Sakito  * keys to the console or to X; we just send them to X whenever the keyboard
4157377Sakito  * is open at all.  (XXX may need to change this later)
4257377Sakito  *
4357377Sakito  * Keyboard commands and types are defined in kbd.h as they are actually
4457377Sakito  * real hardware commands and type numbers.
4557377Sakito  */
4657377Sakito struct kiockey {
4757377Sakito 	int	kio_tablemask;	/* whatever */
4857377Sakito 	u_char	kio_station;	/* key number */
4957377Sakito 	u_char	kio_entry;	/* HOLE if not present */
5057377Sakito 	char	kio_text[10];	/* the silly escape sequences (unsupported) */
5157377Sakito };
5257377Sakito 
5357377Sakito #define	HOLE	0x302		/* value for kio_entry to say `really type 3' */
5457377Sakito 
5557377Sakito #define	KIOCTRANS	_IOW('k', 0, int)	/* set translation mode */
5657377Sakito 			/* (we only accept TR_UNTRANS_EVENT) */
5757377Sakito #define	KIOCGETKEY	_IOWR('k', 2, struct kiockey) /* fill in kio_entry */
5857377Sakito #define	KIOCGTRANS	_IOR('k', 5, int)	/* get translation mode */
5957377Sakito #define	KIOCCMD		_IOW('k', 8, int)	/* X uses this to ring bell */
6057377Sakito #define	KIOCTYPE	_IOR('k', 9, int)	/* get keyboard type */
6157377Sakito #define	KIOCSDIRECT	_IOW('k', 10, int)	/* keys to console? */
6257377Sakito 
6357377Sakito #define	TR_UNTRANS_EVENT	3
6457377Sakito #endif
6557377Sakito 
6657377Sakito #define	KIOCMOUSE	_IOW('k', 20, int)	/* enable/disabel to trace mouse motion */
67