155107Storek /* 2*63318Sbostic * Copyright (c) 1992, 1993 3*63318Sbostic * The Regents of the University of California. All rights reserved. 455107Storek * 555107Storek * This software was developed by the Computer Systems Engineering group 655107Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 755107Storek * contributed to Berkeley. 855107Storek * 955499Sbostic * All advertising materials mentioning features or use of this software 1055499Sbostic * must display the following acknowledgement: 1155499Sbostic * This product includes software developed by the University of 1259190Storek * California, Lawrence Berkeley Laboratory. 1355499Sbostic * 1455107Storek * %sccs.include.redist.c% 1555107Storek * 16*63318Sbostic * @(#)vuid_event.h 8.1 (Berkeley) 06/11/93 1755107Storek * 1859190Storek * from: $Header: vuid_event.h,v 1.4 92/11/26 01:20:27 torek Exp $ (LBL) 1955107Storek */ 2055107Storek 2155107Storek /* 2255107Storek * The following is a minimal emulation of Sun's `Firm_event' structures 2355107Storek * and related operations necessary to make X11 happy (i.e., make it 2455107Storek * compile, and make old X11 binaries run). 2555107Storek */ 2655107Storek typedef struct firm_event { 2755107Storek u_short id; /* key or MS_* or LOC_[XY]_DELTA */ 2855107Storek u_short pad; /* unused, at least by X11 */ 2955107Storek int value; /* VKEY_{UP,DOWN} or locator delta */ 3055107Storek struct timeval time; 3155107Storek } Firm_event; 3255107Storek 3355107Storek /* 3455107Storek * Special `id' fields. These weird numbers simply match the old binaries. 3555107Storek * Others are in 0..0x7f and are keyboard key numbers (keyboard dependent!). 3655107Storek */ 3755107Storek #define MS_LEFT 0x7f20 /* left mouse button */ 3855107Storek #define MS_MIDDLE 0x7f21 /* middle mouse button */ 3955107Storek #define MS_RIGHT 0x7f22 /* right mouse button */ 4055107Storek #define LOC_X_DELTA 0x7f80 /* mouse delta-X */ 4155107Storek #define LOC_Y_DELTA 0x7f81 /* mouse delta-Y */ 4255107Storek 4355107Storek /* 4455107Storek * Special `value' fields. These apply to keys and mouse buttons. The 4555107Storek * value of a mouse delta is the delta. Note that positive deltas are 4655107Storek * left and up (not left and down as you might expect). 4755107Storek */ 4855107Storek #define VKEY_UP 0 /* key or button went up */ 4955107Storek #define VKEY_DOWN 1 /* key or button went down */ 5055107Storek 5155107Storek /* 5255107Storek * The following ioctls are clearly intended to take things in and out 5355107Storek * of `firm event' mode. Since we always run in this mode (as far as 5455107Storek * /dev/kbd and /dev/mouse are concerned, anyway), we always claim to 5555107Storek * be in this mode and reject anything else. 5655107Storek */ 5755107Storek #define VUIDSFORMAT _IOW('v', 1, int) 5855107Storek #define VUIDGFORMAT _IOR('v', 2, int) 5955107Storek #define VUID_FIRM_EVENT 1 /* the only format we support */ 60