1994-09-15 07:26:40 +00:00
|
|
|
|
/*-
|
1996-06-21 07:19:18 +00:00
|
|
|
|
* Copyright (c) 1991-1996 S<EFBFBD>ren Schmidt
|
1994-09-15 07:26:40 +00:00
|
|
|
|
* All rights reserved.
|
1993-10-01 00:00:43 +00:00
|
|
|
|
*
|
1994-09-15 07:26:40 +00:00
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
|
* are met:
|
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
1994-09-29 08:31:39 +00:00
|
|
|
|
* notice, this list of conditions and the following disclaimer
|
|
|
|
|
* in this position and unchanged.
|
1994-09-15 07:26:40 +00:00
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
1996-01-30 23:02:38 +00:00
|
|
|
|
* derived from this software without specific prior written permission
|
1993-10-01 00:00:43 +00:00
|
|
|
|
*
|
1994-09-15 07:26:40 +00:00
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1993-10-01 00:00:43 +00:00
|
|
|
|
*
|
1998-02-12 20:47:39 +00:00
|
|
|
|
* $Id: console.h,v 1.35 1998/02/03 19:57:45 bde Exp $
|
1993-10-01 00:00:43 +00:00
|
|
|
|
*/
|
|
|
|
|
|
1996-09-21 14:59:43 +00:00
|
|
|
|
#ifndef _MACHINE_CONSOLE_H_
|
|
|
|
|
#define _MACHINE_CONSOLE_H_
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1996-09-21 14:59:43 +00:00
|
|
|
|
#ifndef KERNEL
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#include <sys/types.h>
|
1996-09-21 14:59:43 +00:00
|
|
|
|
#endif
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#include <sys/ioccom.h>
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#define KDGKBMODE _IOR('K', 6, int)
|
|
|
|
|
#define KDSKBMODE _IO('K', 7 /*, int */)
|
|
|
|
|
#define KDMKTONE _IO('K', 8 /*, int */)
|
|
|
|
|
#define KDGETMODE _IOR('K', 9, int)
|
|
|
|
|
#define KDSETMODE _IO('K', 10 /*, int */)
|
|
|
|
|
#define KDSBORDER _IO('K', 13 /*, int */)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define KDGKBSTATE _IOR('K', 19, int)
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#define KDSKBSTATE _IO('K', 20 /*, int */)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define KDENABIO _IO('K', 60)
|
|
|
|
|
#define KDDISABIO _IO('K', 61)
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#define KIOCSOUND _IO('K', 63 /*, int */)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define KDGKBTYPE _IOR('K', 64, int)
|
|
|
|
|
#define KDGETLED _IOR('K', 65, int)
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#define KDSETLED _IO('K', 66 /*, int */)
|
|
|
|
|
#define KDSETRAD _IO('K', 67 /*, int */)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
|
|
|
|
#define GETFKEY _IOWR('k', 0, fkeyarg_t)
|
|
|
|
|
#define SETFKEY _IOWR('k', 1, fkeyarg_t)
|
|
|
|
|
#define GIO_SCRNMAP _IOR('k', 2, scrmap_t)
|
|
|
|
|
#define PIO_SCRNMAP _IOW('k', 3, scrmap_t)
|
|
|
|
|
#define GIO_KEYMAP _IOR('k', 6, keymap_t)
|
|
|
|
|
#define PIO_KEYMAP _IOW('k', 7, keymap_t)
|
1998-01-07 08:40:34 +00:00
|
|
|
|
#define GIO_DEADKEYMAP _IOR('k', 8, accentmap_t)
|
|
|
|
|
#define PIO_DEADKEYMAP _IOW('k', 9, accentmap_t)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define GIO_ATTR _IOR('a', 0, int)
|
|
|
|
|
#define GIO_COLOR _IOR('c', 0, int)
|
|
|
|
|
#define CONS_CURRENT _IOR('c', 1, int)
|
|
|
|
|
#define CONS_GET _IOR('c', 2, int)
|
1995-01-20 08:35:32 +00:00
|
|
|
|
#define CONS_IO _IO('c', 3)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define CONS_BLANKTIME _IOW('c', 4, int)
|
1994-02-04 10:36:15 +00:00
|
|
|
|
#define CONS_SSAVER _IOW('c', 5, ssaver_t)
|
|
|
|
|
#define CONS_GSAVER _IOWR('c', 6, ssaver_t)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define CONS_CURSORTYPE _IOW('c', 7, int)
|
|
|
|
|
#define CONS_BELLTYPE _IOW('c', 8, int)
|
1995-01-20 08:35:32 +00:00
|
|
|
|
#define CONS_HISTORY _IOW('c', 9, int)
|
|
|
|
|
#define CONS_MOUSECTL _IOWR('c', 10, mouse_info_t)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define PIO_FONT8x8 _IOW('c', 64, fnt8_t)
|
|
|
|
|
#define GIO_FONT8x8 _IOR('c', 65, fnt8_t)
|
|
|
|
|
#define PIO_FONT8x14 _IOW('c', 66, fnt14_t)
|
|
|
|
|
#define GIO_FONT8x14 _IOR('c', 67, fnt14_t)
|
|
|
|
|
#define PIO_FONT8x16 _IOW('c', 68, fnt16_t)
|
|
|
|
|
#define GIO_FONT8x16 _IOR('c', 69, fnt16_t)
|
1994-04-07 23:23:01 +00:00
|
|
|
|
#define CONS_GETINFO _IOWR('c', 73, vid_info_t)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define CONS_GETVERS _IOR('c', 74, int)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1996-06-14 11:02:28 +00:00
|
|
|
|
#ifdef PC98
|
|
|
|
|
#define ADJUST_CLOCK _IO('t',100) /* for 98note resume */
|
1996-09-21 14:59:43 +00:00
|
|
|
|
#endif
|
1996-06-14 11:02:28 +00:00
|
|
|
|
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define VT_OPENQRY _IOR('v', 1, int)
|
1995-05-30 08:16:23 +00:00
|
|
|
|
#define VT_SETMODE _IOW('v', 2, vtmode_t)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define VT_GETMODE _IOR('v', 3, vtmode_t)
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#define VT_RELDISP _IO('v', 4 /*, int */)
|
|
|
|
|
#define VT_ACTIVATE _IO('v', 5 /*, int */)
|
|
|
|
|
#define VT_WAITACTIVE _IO('v', 6 /*, int */)
|
1993-10-04 22:21:10 +00:00
|
|
|
|
#define VT_GETACTIVE _IOR('v', 7, int)
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1995-05-30 08:16:23 +00:00
|
|
|
|
#define VT_FALSE 0
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define VT_TRUE 1
|
|
|
|
|
#define VT_ACKACQ 2
|
|
|
|
|
|
|
|
|
|
#define VT_AUTO 0 /* switching is automatic */
|
|
|
|
|
#define VT_PROCESS 1 /* switching controlled by prog */
|
1996-09-30 23:00:58 +00:00
|
|
|
|
#define VT_KERNEL 255 /* switching controlled in kernel */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#ifndef _VT_MODE_DECLARED
|
|
|
|
|
#define _VT_MODE_DECLARED
|
1993-10-01 00:00:43 +00:00
|
|
|
|
struct vt_mode {
|
|
|
|
|
char mode;
|
|
|
|
|
char waitv; /* not implemented yet SOS */
|
|
|
|
|
short relsig;
|
|
|
|
|
short acqsig;
|
|
|
|
|
short frsig; /* not implemented yet SOS */
|
|
|
|
|
};
|
|
|
|
|
|
1998-02-03 19:57:46 +00:00
|
|
|
|
typedef struct vt_mode vtmode_t;
|
|
|
|
|
#endif /* !_VT_MODE_DECLARED */
|
|
|
|
|
|
1996-06-25 08:54:57 +00:00
|
|
|
|
struct mouse_data {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
- Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
MieMouse, Logitech MouseMan+, FirstMouse+
- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.
- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.
- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.
- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.
/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.
/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits
defined in `mouse.h' instead.
/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones. Most important
of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
While the output level remains zero, the output from the `psm' driver is
in the standard PS/2 mouse format (three bytes long). When the level
is set to one, the `psm' driver will send data in the extended format.
At the level two the driver uses the format which is native to the
connected mouse is used. (Meaning that the output from the device is
passed to the caller as is, unmodified.) The `psm' driver will pass
such extended data format as is to the caller if the output level is
two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
(PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
Acceleration ratio is now specified by the kernel configuration flags
stated above. Sync check logic is refined and now standard.
The sync check can be turned off by the new kernel configuration flags
PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use.
- Summer clean up :-) Removed unused code and obsolete comments.
/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
Most importantly, the MOUSE_SETLEVEL ioctl will change the
output format from the 5 byte format to the new, extended format
so that the caller can take advantage of Z axis movement and additional
buttons.
- Use constants defined in `mouse.h' rather than magic numbers.
/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL
ioctl will change the `sysmouse' output format from the MouseSystems
5 byte format to the new, extended format so that the caller can
take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
single click action of the right button in the virtual console. The
left button double click will select a word under the mouse pointer.
The triple click will select a line and the single click of the right
button will extend the selected region to the current position of
the mouse pointer. This will make the cut/paste support more compatible
with xterm.
/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
|
|
|
|
int z;
|
1996-06-25 08:54:57 +00:00
|
|
|
|
int buttons;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct mouse_mode {
|
|
|
|
|
int mode;
|
|
|
|
|
int signal;
|
|
|
|
|
};
|
|
|
|
|
|
- Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
MieMouse, Logitech MouseMan+, FirstMouse+
- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.
- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.
- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.
- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.
/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.
/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits
defined in `mouse.h' instead.
/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones. Most important
of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
While the output level remains zero, the output from the `psm' driver is
in the standard PS/2 mouse format (three bytes long). When the level
is set to one, the `psm' driver will send data in the extended format.
At the level two the driver uses the format which is native to the
connected mouse is used. (Meaning that the output from the device is
passed to the caller as is, unmodified.) The `psm' driver will pass
such extended data format as is to the caller if the output level is
two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
(PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
Acceleration ratio is now specified by the kernel configuration flags
stated above. Sync check logic is refined and now standard.
The sync check can be turned off by the new kernel configuration flags
PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use.
- Summer clean up :-) Removed unused code and obsolete comments.
/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
Most importantly, the MOUSE_SETLEVEL ioctl will change the
output format from the 5 byte format to the new, extended format
so that the caller can take advantage of Z axis movement and additional
buttons.
- Use constants defined in `mouse.h' rather than magic numbers.
/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL
ioctl will change the `sysmouse' output format from the MouseSystems
5 byte format to the new, extended format so that the caller can
take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
single click action of the right button in the virtual console. The
left button double click will select a word under the mouse pointer.
The triple click will select a line and the single click of the right
button will extend the selected region to the current position of
the mouse pointer. This will make the cut/paste support more compatible
with xterm.
/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
|
|
|
|
struct mouse_event {
|
|
|
|
|
int id; /* one based */
|
|
|
|
|
int value;
|
|
|
|
|
};
|
|
|
|
|
|
1996-06-21 07:19:18 +00:00
|
|
|
|
#define MOUSE_SHOW 0x01
|
|
|
|
|
#define MOUSE_HIDE 0x02
|
|
|
|
|
#define MOUSE_MOVEABS 0x03
|
|
|
|
|
#define MOUSE_MOVEREL 0x04
|
1996-06-25 08:54:57 +00:00
|
|
|
|
#define MOUSE_GETINFO 0x05
|
|
|
|
|
#define MOUSE_MODE 0x06
|
|
|
|
|
#define MOUSE_ACTION 0x07
|
- Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
MieMouse, Logitech MouseMan+, FirstMouse+
- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.
- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.
- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.
- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.
/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.
/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits
defined in `mouse.h' instead.
/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones. Most important
of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
While the output level remains zero, the output from the `psm' driver is
in the standard PS/2 mouse format (three bytes long). When the level
is set to one, the `psm' driver will send data in the extended format.
At the level two the driver uses the format which is native to the
connected mouse is used. (Meaning that the output from the device is
passed to the caller as is, unmodified.) The `psm' driver will pass
such extended data format as is to the caller if the output level is
two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
(PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
Acceleration ratio is now specified by the kernel configuration flags
stated above. Sync check logic is refined and now standard.
The sync check can be turned off by the new kernel configuration flags
PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use.
- Summer clean up :-) Removed unused code and obsolete comments.
/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
Most importantly, the MOUSE_SETLEVEL ioctl will change the
output format from the 5 byte format to the new, extended format
so that the caller can take advantage of Z axis movement and additional
buttons.
- Use constants defined in `mouse.h' rather than magic numbers.
/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL
ioctl will change the `sysmouse' output format from the MouseSystems
5 byte format to the new, extended format so that the caller can
take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
single click action of the right button in the virtual console. The
left button double click will select a word under the mouse pointer.
The triple click will select a line and the single click of the right
button will extend the selected region to the current position of
the mouse pointer. This will make the cut/paste support more compatible
with xterm.
/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
|
|
|
|
#define MOUSE_MOTION_EVENT 0x08
|
|
|
|
|
#define MOUSE_BUTTON_EVENT 0x09
|
1995-01-20 08:35:32 +00:00
|
|
|
|
|
|
|
|
|
struct mouse_info {
|
|
|
|
|
int operation;
|
1996-06-25 08:54:57 +00:00
|
|
|
|
union {
|
|
|
|
|
struct mouse_data data;
|
|
|
|
|
struct mouse_mode mode;
|
- Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
MieMouse, Logitech MouseMan+, FirstMouse+
- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.
- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.
- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.
- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.
/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.
/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON. Use button bits
defined in `mouse.h' instead.
/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones. Most important
of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
While the output level remains zero, the output from the `psm' driver is
in the standard PS/2 mouse format (three bytes long). When the level
is set to one, the `psm' driver will send data in the extended format.
At the level two the driver uses the format which is native to the
connected mouse is used. (Meaning that the output from the device is
passed to the caller as is, unmodified.) The `psm' driver will pass
such extended data format as is to the caller if the output level is
two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
(PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
Acceleration ratio is now specified by the kernel configuration flags
stated above. Sync check logic is refined and now standard.
The sync check can be turned off by the new kernel configuration flags
PSM_CONFIG_NOCHECKSYNC (0x100). PSM_EMULATION has been of little use.
- Summer clean up :-) Removed unused code and obsolete comments.
/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
Most importantly, the MOUSE_SETLEVEL ioctl will change the
output format from the 5 byte format to the new, extended format
so that the caller can take advantage of Z axis movement and additional
buttons.
- Use constants defined in `mouse.h' rather than magic numbers.
/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
ioctls defined in `mouse.h'. Most importantly, the MOUSE_SETLEVEL
ioctl will change the `sysmouse' output format from the MouseSystems
5 byte format to the new, extended format so that the caller can
take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
single click action of the right button in the virtual console. The
left button double click will select a word under the mouse pointer.
The triple click will select a line and the single click of the right
button will extend the selected region to the current position of
the mouse pointer. This will make the cut/paste support more compatible
with xterm.
/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
|
|
|
|
struct mouse_event event;
|
1996-06-25 08:54:57 +00:00
|
|
|
|
}u;
|
1995-01-20 08:35:32 +00:00
|
|
|
|
};
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
|
|
|
|
#define KD_MONO 1 /* monochrome adapter */
|
|
|
|
|
#define KD_HERCULES 2 /* hercules adapter */
|
|
|
|
|
#define KD_CGA 3 /* color graphics adapter */
|
|
|
|
|
#define KD_EGA 4 /* enhanced graphics adapter */
|
1996-01-30 23:02:38 +00:00
|
|
|
|
#define KD_VGA 5 /* video graphics adapter */
|
1997-09-04 09:05:17 +00:00
|
|
|
|
#define KD_PC98 6 /* PC-98 display */
|
1998-02-12 20:47:39 +00:00
|
|
|
|
#define KD_PIXEL 7 /* Pixel based display */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
|
|
|
|
#define KD_TEXT 0 /* set text mode restore fonts */
|
|
|
|
|
#define KD_TEXT0 0 /* ditto */
|
|
|
|
|
#define KD_TEXT1 2 /* set text mode !restore fonts */
|
|
|
|
|
#define KD_GRAPHICS 1 /* set graphics mode */
|
|
|
|
|
|
|
|
|
|
#define K_RAW 0 /* keyboard returns scancodes */
|
|
|
|
|
#define K_XLATE 1 /* keyboard returns ascii */
|
1997-10-01 20:46:29 +00:00
|
|
|
|
#define K_CODE 2 /* keyboard returns keycodes */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define KB_84 1 /* 'old' 84 key AT-keyboard */
|
|
|
|
|
#define KB_101 2 /* MF-101 or MF-102 keyboard */
|
|
|
|
|
#define KB_OTHER 3 /* keyboard not known */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define CLKED 1 /* Caps locked */
|
|
|
|
|
#define NLKED 2 /* Num locked */
|
|
|
|
|
#define SLKED 4 /* Scroll locked */
|
|
|
|
|
#define ALKED 8 /* AltGr locked */
|
1995-05-30 08:16:23 +00:00
|
|
|
|
#define LED_CAP 1 /* Caps lock LED */
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define LED_NUM 2 /* Num lock LED */
|
|
|
|
|
#define LED_SCR 4 /* Scroll lock LED */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
|
|
|
|
/* possible flag values */
|
|
|
|
|
#define FLAG_LOCK_O 0
|
|
|
|
|
#define FLAG_LOCK_C 1
|
|
|
|
|
#define FLAG_LOCK_N 2
|
|
|
|
|
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define NUM_KEYS 256 /* number of keys in table */
|
|
|
|
|
#define NUM_STATES 8 /* states per key */
|
|
|
|
|
#define ALTGR_OFFSET 128 /* offset for altlock keys */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1998-02-03 19:57:46 +00:00
|
|
|
|
#ifndef _KEYMAP_DECLARED
|
|
|
|
|
#define _KEYMAP_DECLARED
|
1994-08-17 08:51:10 +00:00
|
|
|
|
struct key_t {
|
|
|
|
|
u_char map[NUM_STATES];
|
|
|
|
|
u_char spcl;
|
|
|
|
|
u_char flgs;
|
|
|
|
|
};
|
|
|
|
|
|
1993-10-01 00:00:43 +00:00
|
|
|
|
struct keymap {
|
|
|
|
|
u_short n_keys;
|
1994-08-17 08:51:10 +00:00
|
|
|
|
struct key_t key[NUM_KEYS];
|
1993-10-01 00:00:43 +00:00
|
|
|
|
};
|
|
|
|
|
|
1998-02-03 19:57:46 +00:00
|
|
|
|
typedef struct keymap keymap_t;
|
|
|
|
|
#endif /* !_KEYMAP_DECLARED */
|
|
|
|
|
|
1998-01-07 08:40:34 +00:00
|
|
|
|
#define NUM_DEADKEYS 15 /* number of accent keys */
|
|
|
|
|
#define NUM_ACCENTCHARS 52 /* max number of accent chars */
|
|
|
|
|
|
|
|
|
|
struct acc_t {
|
|
|
|
|
u_char accchar;
|
|
|
|
|
u_char map[NUM_ACCENTCHARS][2];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct accentmap {
|
|
|
|
|
u_short n_accs;
|
|
|
|
|
struct acc_t acc[NUM_DEADKEYS];
|
|
|
|
|
};
|
|
|
|
|
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define MAXFK 16
|
1995-01-28 22:18:05 +00:00
|
|
|
|
#define NUM_FKEYS 96
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
|
|
|
|
struct fkeytab {
|
|
|
|
|
u_char str[MAXFK];
|
|
|
|
|
u_char len;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct fkeyarg {
|
|
|
|
|
u_short keynum;
|
|
|
|
|
char keydef[MAXFK];
|
|
|
|
|
char flen;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct colors {
|
|
|
|
|
char fore;
|
|
|
|
|
char back;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct vid_info {
|
|
|
|
|
short size;
|
|
|
|
|
short m_num;
|
|
|
|
|
u_short mv_row, mv_col;
|
|
|
|
|
u_short mv_rsz, mv_csz;
|
|
|
|
|
struct colors mv_norm,
|
|
|
|
|
mv_rev,
|
|
|
|
|
mv_grfc;
|
|
|
|
|
u_char mv_ovscan;
|
|
|
|
|
u_char mk_keylock;
|
|
|
|
|
};
|
|
|
|
|
|
1994-02-04 10:36:15 +00:00
|
|
|
|
#define MAXSSAVER 16
|
|
|
|
|
|
|
|
|
|
struct ssaver {
|
|
|
|
|
char name[MAXSSAVER];
|
|
|
|
|
int num;
|
|
|
|
|
long time;
|
|
|
|
|
};
|
|
|
|
|
|
1998-01-07 08:40:34 +00:00
|
|
|
|
typedef struct accentmap accentmap_t;
|
1993-10-01 00:00:43 +00:00
|
|
|
|
typedef struct fkeytab fkeytab_t;
|
|
|
|
|
typedef struct fkeyarg fkeyarg_t;
|
|
|
|
|
typedef struct vid_info vid_info_t;
|
1995-01-20 08:35:32 +00:00
|
|
|
|
typedef struct mouse_info mouse_info_t;
|
1993-10-01 00:00:43 +00:00
|
|
|
|
typedef struct {char scrmap[256];} scrmap_t;
|
|
|
|
|
typedef struct {char fnt8x8[8*256];} fnt8_t;
|
|
|
|
|
typedef struct {char fnt8x14[14*256];} fnt14_t;
|
|
|
|
|
typedef struct {char fnt8x16[16*256];} fnt16_t;
|
1994-02-04 10:36:15 +00:00
|
|
|
|
typedef struct ssaver ssaver_t;
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1993-10-28 05:27:36 +00:00
|
|
|
|
/* defines for "special" keys (spcl bit set in keymap) */
|
|
|
|
|
#define NOP 0x00 /* nothing (dead key) */
|
|
|
|
|
#define LSH 0x02 /* left shift key */
|
|
|
|
|
#define RSH 0x03 /* right shift key */
|
|
|
|
|
#define CLK 0x04 /* caps lock key */
|
|
|
|
|
#define NLK 0x05 /* num lock key */
|
|
|
|
|
#define SLK 0x06 /* scroll lock key */
|
|
|
|
|
#define LALT 0x07 /* left alt key */
|
1994-08-17 08:51:10 +00:00
|
|
|
|
#define BTAB 0x08 /* backwards tab */
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define LCTR 0x09 /* left control key */
|
|
|
|
|
#define NEXT 0x0a /* switch to next screen */
|
|
|
|
|
#define F_SCR 0x0b /* switch to first screen */
|
1995-01-28 22:18:05 +00:00
|
|
|
|
#define L_SCR 0x1a /* switch to last screen */
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define F_FN 0x1b /* first function key */
|
1995-01-28 22:18:05 +00:00
|
|
|
|
#define L_FN 0x7a /* last function key */
|
|
|
|
|
/* 0x7b-0x7f reserved do not use ! */
|
|
|
|
|
#define RCTR 0x80 /* right control key */
|
|
|
|
|
#define RALT 0x81 /* right alt (altgr) key */
|
|
|
|
|
#define ALK 0x82 /* alt lock key */
|
|
|
|
|
#define ASH 0x83 /* alt shift key */
|
|
|
|
|
#define META 0x84 /* meta key */
|
|
|
|
|
#define RBT 0x85 /* boot machine */
|
|
|
|
|
#define DBG 0x86 /* call debugger */
|
|
|
|
|
#define SUSP 0x87 /* suspend power (APM) */
|
1996-09-30 23:00:58 +00:00
|
|
|
|
#define SPSC 0x88 /* toggle splash/text screen */
|
1993-10-28 05:27:36 +00:00
|
|
|
|
|
1998-01-07 08:40:34 +00:00
|
|
|
|
#define F_ACC DGRA /* first accent key */
|
|
|
|
|
#define DGRA 0x89 /* grave */
|
|
|
|
|
#define DACU 0x8a /* acute */
|
|
|
|
|
#define DCIR 0x8b /* circumflex */
|
|
|
|
|
#define DTIL 0x8c /* tilde */
|
|
|
|
|
#define DMAC 0x8d /* macron */
|
|
|
|
|
#define DBRE 0x8e /* breve */
|
|
|
|
|
#define DDOT 0x8f /* dot */
|
|
|
|
|
#define DUML 0x90 /* umlaut/diaresis */
|
|
|
|
|
#define DDIA 0x90 /* diaresis */
|
|
|
|
|
#define DSLA 0x91 /* slash */
|
|
|
|
|
#define DRIN 0x92 /* ring */
|
|
|
|
|
#define DCED 0x93 /* cedilla */
|
|
|
|
|
#define DAPO 0x94 /* apostrophe */
|
|
|
|
|
#define DDAC 0x95 /* double acute */
|
|
|
|
|
#define DOGO 0x96 /* ogonek */
|
|
|
|
|
#define DCAR 0x97 /* caron */
|
|
|
|
|
#define L_ACC DCAR /* last accent key */
|
|
|
|
|
|
1993-10-01 00:00:43 +00:00
|
|
|
|
#define F(x) ((x)+F_FN-1)
|
|
|
|
|
#define S(x) ((x)+F_SCR-1)
|
1998-01-07 08:40:34 +00:00
|
|
|
|
#define ACC(x) ((x)+F_ACC)
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define NOKEY 0x100 /* no key pressed marker */
|
1996-01-30 23:02:38 +00:00
|
|
|
|
#define FKEY 0x200 /* function key marker */
|
1993-10-28 05:27:36 +00:00
|
|
|
|
#define MKEY 0x400 /* meta key marker (prepend ESC)*/
|
1995-01-28 22:18:05 +00:00
|
|
|
|
#define BKEY 0x800 /* backtab (ESC [ Z) */
|
1993-10-01 00:00:43 +00:00
|
|
|
|
|
1994-09-15 07:26:40 +00:00
|
|
|
|
/* video mode definitions */
|
|
|
|
|
#define M_B40x25 0 /* black & white 40 columns */
|
|
|
|
|
#define M_C40x25 1 /* color 40 columns */
|
|
|
|
|
#define M_B80x25 2 /* black & white 80 columns */
|
|
|
|
|
#define M_C80x25 3 /* color 80 columns */
|
|
|
|
|
#define M_BG320 4 /* black & white graphics 320x200 */
|
|
|
|
|
#define M_CG320 5 /* color graphics 320x200 */
|
|
|
|
|
#define M_BG640 6 /* black & white graphics 640x200 hi-res */
|
|
|
|
|
#define M_EGAMONO80x25 7 /* ega-mono 80x25 */
|
|
|
|
|
#define M_CG320_D 13 /* ega mode D */
|
|
|
|
|
#define M_CG640_E 14 /* ega mode E */
|
|
|
|
|
#define M_EGAMONOAPA 15 /* ega mode F */
|
|
|
|
|
#define M_CG640x350 16 /* ega mode 10 */
|
|
|
|
|
#define M_ENHMONOAPA2 17 /* ega mode F with extended memory */
|
|
|
|
|
#define M_ENH_CG640 18 /* ega mode 10* */
|
|
|
|
|
#define M_ENH_B40x25 19 /* ega enhanced black & white 40 columns */
|
|
|
|
|
#define M_ENH_C40x25 20 /* ega enhanced color 40 columns */
|
|
|
|
|
#define M_ENH_B80x25 21 /* ega enhanced black & white 80 columns */
|
|
|
|
|
#define M_ENH_C80x25 22 /* ega enhanced color 80 columns */
|
|
|
|
|
#define M_VGA_C40x25 23 /* vga 8x16 font on color */
|
|
|
|
|
#define M_VGA_C80x25 24 /* vga 8x16 font on color */
|
|
|
|
|
#define M_VGA_M80x25 25 /* vga 8x16 font on mono */
|
1995-01-12 11:47:05 +00:00
|
|
|
|
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define M_VGA11 26 /* vga 640x480 2 colors */
|
|
|
|
|
#define M_BG640x480 26
|
|
|
|
|
#define M_VGA12 27 /* vga 640x480 16 colors */
|
|
|
|
|
#define M_CG640x480 27
|
|
|
|
|
#define M_VGA13 28 /* vga 640x200 256 colors */
|
|
|
|
|
#define M_VGA_CG320 28
|
1995-01-12 11:47:05 +00:00
|
|
|
|
|
|
|
|
|
#define M_VGA_C80x50 30 /* vga 8x8 font on color */
|
|
|
|
|
#define M_VGA_M80x50 31 /* vga 8x8 font on color */
|
|
|
|
|
#define M_VGA_C80x30 32 /* vga 8x16 font on color */
|
|
|
|
|
#define M_VGA_M80x30 33 /* vga 8x16 font on color */
|
|
|
|
|
#define M_VGA_C80x60 34 /* vga 8x8 font on color */
|
|
|
|
|
#define M_VGA_M80x60 35 /* vga 8x8 font on color */
|
1997-08-08 22:52:30 +00:00
|
|
|
|
#define M_VGA_CG640 36 /* vga 640x400 256 color */
|
|
|
|
|
#define M_VGA_MODEX 37 /* vga 320x240 256 color */
|
1995-01-12 11:47:05 +00:00
|
|
|
|
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define M_ENH_B80x43 0x70 /* ega black & white 80x43 */
|
|
|
|
|
#define M_ENH_C80x43 0x71 /* ega color 80x43 */
|
1997-09-04 09:05:17 +00:00
|
|
|
|
|
|
|
|
|
#define M_PC98_80x25 98 /* PC98 80x25 */
|
|
|
|
|
#define M_PC98_80x30 99 /* PC98 80x30 */
|
|
|
|
|
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define M_HGC_P0 0xe0 /* hercules graphics - page 0 @ B0000 */
|
|
|
|
|
#define M_HGC_P1 0xe1 /* hercules graphics - page 1 @ B8000 */
|
|
|
|
|
#define M_MCA_MODE 0xff /* monochrome adapter mode */
|
|
|
|
|
|
1996-06-14 11:02:28 +00:00
|
|
|
|
#define SW_PC98_80x25 _IO('S', M_PC98_80x25)
|
|
|
|
|
#define SW_PC98_80x30 _IO('S', M_PC98_80x30)
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define SW_B40x25 _IO('S', M_B40x25)
|
|
|
|
|
#define SW_C40x25 _IO('S', M_C40x25)
|
|
|
|
|
#define SW_B80x25 _IO('S', M_B80x25)
|
|
|
|
|
#define SW_C80x25 _IO('S', M_C80x25)
|
|
|
|
|
#define SW_BG320 _IO('S', M_BG320)
|
|
|
|
|
#define SW_CG320 _IO('S', M_CG320)
|
|
|
|
|
#define SW_BG640 _IO('S', M_BG640)
|
|
|
|
|
#define SW_EGAMONO80x25 _IO('S', M_EGAMONO80x25)
|
|
|
|
|
#define SW_CG320_D _IO('S', M_CG320_D)
|
|
|
|
|
#define SW_CG640_E _IO('S', M_CG640_E)
|
|
|
|
|
#define SW_EGAMONOAPA _IO('S', M_EGAMONOAPA)
|
|
|
|
|
#define SW_CG640x350 _IO('S', M_CG640x350)
|
|
|
|
|
#define SW_ENH_MONOAPA2 _IO('S', M_ENHMONOAPA2)
|
|
|
|
|
#define SW_ENH_CG640 _IO('S', M_ENH_CG640)
|
|
|
|
|
#define SW_ENH_B40x25 _IO('S', M_ENH_B40x25)
|
|
|
|
|
#define SW_ENH_C40x25 _IO('S', M_ENH_C40x25)
|
|
|
|
|
#define SW_ENH_B80x25 _IO('S', M_ENH_B80x25)
|
|
|
|
|
#define SW_ENH_C80x25 _IO('S', M_ENH_C80x25)
|
|
|
|
|
#define SW_ENH_B80x43 _IO('S', M_ENH_B80x43)
|
|
|
|
|
#define SW_ENH_C80x43 _IO('S', M_ENH_C80x43)
|
|
|
|
|
#define SW_MCAMODE _IO('S', M_MCA_MODE)
|
|
|
|
|
#define SW_VGA_C40x25 _IO('S', M_VGA_C40x25)
|
|
|
|
|
#define SW_VGA_C80x25 _IO('S', M_VGA_C80x25)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define SW_VGA_C80x30 _IO('S', M_VGA_C80x30)
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define SW_VGA_C80x50 _IO('S', M_VGA_C80x50)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define SW_VGA_C80x60 _IO('S', M_VGA_C80x60)
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define SW_VGA_M80x25 _IO('S', M_VGA_M80x25)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define SW_VGA_M80x30 _IO('S', M_VGA_M80x30)
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define SW_VGA_M80x50 _IO('S', M_VGA_M80x50)
|
1995-01-12 11:47:05 +00:00
|
|
|
|
#define SW_VGA_M80x60 _IO('S', M_VGA_M80x60)
|
1994-09-15 07:26:40 +00:00
|
|
|
|
#define SW_VGA11 _IO('S', M_VGA11)
|
|
|
|
|
#define SW_BG640x480 _IO('S', M_VGA11)
|
|
|
|
|
#define SW_VGA12 _IO('S', M_VGA12)
|
|
|
|
|
#define SW_CG640x480 _IO('S', M_VGA12)
|
|
|
|
|
#define SW_VGA13 _IO('S', M_VGA13)
|
|
|
|
|
#define SW_VGA_CG320 _IO('S', M_VGA13)
|
1997-08-08 22:52:30 +00:00
|
|
|
|
#define SW_VGA_CG640 _IO('S', M_VGA_CG640)
|
|
|
|
|
#define SW_VGA_MODEX _IO('S', M_VGA_MODEX)
|
1994-09-15 07:26:40 +00:00
|
|
|
|
|
1996-09-21 14:59:43 +00:00
|
|
|
|
#endif /* !_MACHINE_CONSOLE_H_ */
|