xref: /original-bsd/sys/luna68k/dev/kbio.h (revision b4c7f1a3)
198a904cbSakito /*
2*b4c7f1a3Sbostic  * Copyright (c) 1992, 1993
3*b4c7f1a3Sbostic  *	The Regents of the University of California.  All rights reserved.
498a904cbSakito  *
598a904cbSakito  * This software was developed by the Computer Systems Engineering group
698a904cbSakito  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
798a904cbSakito  * contributed to Berkeley.
898a904cbSakito  *
998a904cbSakito  * All advertising materials mentioning features or use of this software
1098a904cbSakito  * must display the following acknowledgement:
1198a904cbSakito  *	This product includes software developed by the University of
1298a904cbSakito  *	California, Lawrence Berkeley Laboratories.
1398a904cbSakito  *
1498a904cbSakito  * %sccs.include.redist.c%
1598a904cbSakito  *
1698a904cbSakito  * from: $Header: kbio.h,v 1.3 92/06/17 05:35:49 torek Exp $ (LBL)
1798a904cbSakito  *
1898a904cbSakito  * from: sparc/dev/kbio.h	7.2 (Berkeley) 7/21/92
1998a904cbSakito  *
20*b4c7f1a3Sbostic  *	@(#)kbio.h	8.1 (Berkeley) 06/10/93
2198a904cbSakito  */
2298a904cbSakito 
2398a904cbSakito #ifdef	notyet
2498a904cbSakito /*
2598a904cbSakito  * The following is a minimal emulation of Sun's `kio' structures
2698a904cbSakito  * and related operations necessary to make X11 happy (i.e., make it
2798a904cbSakito  * compile, and make old X11 binaries run).
2898a904cbSakito  */
2998a904cbSakito 
3098a904cbSakito /*
3198a904cbSakito  * The kiockey structure apparently gets and/or sets keyboard mappings.
3298a904cbSakito  * It seems to be kind of useless, but X11 uses it (according to the
3398a904cbSakito  * comments) to figure out when a Sun 386i has a type-4 keyboard but
3498a904cbSakito  * claims to have a type-3 keyboard.  We need just enough to cause the
3598a904cbSakito  * appropriate ioctl to return the appropriate magic value.
3698a904cbSakito  *
3798a904cbSakito  * KIOCGETKEY fills in kio_entry from kio_station.  Not sure what tablemask
3898a904cbSakito  * is for; X sets it before the call, so it is not an output, but we do not
3998a904cbSakito  * care anyway.  KIOCSDIRECT is supposed to tell the kernel whether to send
4098a904cbSakito  * keys to the console or to X; we just send them to X whenever the keyboard
4198a904cbSakito  * is open at all.  (XXX may need to change this later)
4298a904cbSakito  *
4398a904cbSakito  * Keyboard commands and types are defined in kbd.h as they are actually
4498a904cbSakito  * real hardware commands and type numbers.
4598a904cbSakito  */
4698a904cbSakito struct kiockey {
4798a904cbSakito 	int	kio_tablemask;	/* whatever */
4898a904cbSakito 	u_char	kio_station;	/* key number */
4998a904cbSakito 	u_char	kio_entry;	/* HOLE if not present */
5098a904cbSakito 	char	kio_text[10];	/* the silly escape sequences (unsupported) */
5198a904cbSakito };
5298a904cbSakito 
5398a904cbSakito #define	HOLE	0x302		/* value for kio_entry to say `really type 3' */
5498a904cbSakito 
5598a904cbSakito #define	KIOCTRANS	_IOW('k', 0, int)	/* set translation mode */
5698a904cbSakito 			/* (we only accept TR_UNTRANS_EVENT) */
5798a904cbSakito #define	KIOCGETKEY	_IOWR('k', 2, struct kiockey) /* fill in kio_entry */
5898a904cbSakito #define	KIOCGTRANS	_IOR('k', 5, int)	/* get translation mode */
5998a904cbSakito #define	KIOCCMD		_IOW('k', 8, int)	/* X uses this to ring bell */
6098a904cbSakito #define	KIOCTYPE	_IOR('k', 9, int)	/* get keyboard type */
6198a904cbSakito #define	KIOCSDIRECT	_IOW('k', 10, int)	/* keys to console? */
6298a904cbSakito 
6398a904cbSakito #define	TR_UNTRANS_EVENT	3
6498a904cbSakito #endif
6598a904cbSakito 
6698a904cbSakito #define	KIOCMOUSE	_IOW('k', 20, int)	/* enable/disabel to trace mouse motion */
67