Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ evs(4) — NEXTSTEP 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

EVS(4)  —  UNIX Programmer’s Manual

NAME

evs − event driver status

SYNOPSIS

device event status
#include <nextdev/evsio.h>

DESCRIPTION

The evs driver is a device driver allowing a program to set the user preference values for the mouse and keyboard devices. 

The mouse and keyboard are read by the window server through the ev driver.  The ev driver is opened by the window server at system startup time, and is exclusive access, so no other program may make use of it.  The evs driver, however, can be opened by many programs in order to make ioctl calls which will affect the way the mouse and keyboard work. 

The following event status special ioctls are available:

EVSIOLLPE
This ioctl places a new event in the low−level event queue which is read by the window server.  The type of event, the position for it, and the NXData structure for it are placed in a special evsioLLEvent structure, and a pointer to that structure is passed as the arg. 

EVSIOSKR
This ioctl sets the key repeat interval for a key on the keyboard which is held down.  The (int ∗) arg to the call points to an integer which gives the number of vertical intervals between successive repeats of the key.  If the current key repeat is set to 34, for instance, then a key that is held down will repeat every 34/68 seconds, or twice per second. 

EVSIOCKR
This ioctl returns the current key repeat interval in an integer pointed to by the (int ∗)arg. 

EVSIOSIKR
This ioctl sets the initial key repeat interval to the value pointed to by the (int ∗)arg.  From when a key is first depressed, the initial key repeat interval elapses.  If the key goes up during that interval, no addtional events are generated.  After the initial key repeat interval has elapsed, the first repeated key event is generated (a key-down event with the repeated flag set).  Another such event is generated each key repeat interval from then on.  The intent of making the initial key repeat interval separate from the key repeat interval is to allow an extra long time before the first repeat, and thus avoid having every key repeat, while still allowing keys to repeat very quickly after thye begin repeating. 

EVSIOCIKR
This ioctl returns the current initial key repeat in the integer pointed to by the (int ∗)arg. 

EVSIOSKM
This ioctl sets the key mapping used by the ev driver to the one given in the structure pointed to by the (struct evsioKeymapping ∗)arg.  See the document, Key Mappings on the NeXT Computer, for more details on a key mapping string.  Key mappings are created by the KeyMap utility program. 

EVSIOCKM
This ioctl takes an (struct evsioKeymapping ∗)arg where the size and pointer given in the arg define an area into which the key mapping currently used by the ev driver are copied.  The portion of the key mapping which will fit in the size given in the evsioKeymapping structure pointed to by arg is copied; the remainder of the mapping is thrown away.  The number of bytes actually placed in the area is returned in the size component of the evsioKeymapping structure. 

EVSIOCKML
This ioctl returns the length of the current key mapping being used by the ev driver in the integer pointed to by its (int ∗)arg.  This can be used to find out how large an area to allocate for use with the EVSIOCKM ioctl call. 

EVSIORKBD
This ioctl call resets all the user preference items for the keyboard to their initial states.  The initial key repeat interval, key repeat interval, and key mapping are all reset.

EVSIOSCT
This ioctl sets the click time threshold to the integer pointed to by its (int ∗)arg.  The click time threshold is the maximum number of vertical retrace intervals that may elapse between two mouse-down events and still have them be considered a double-click. 

EVSIOCCT
This ioctl returns the current click time threshold in the integer pointed to by its (int ∗)arg. 

EVSIOSCS
This ioctl sets the current click space threshold to the integer pointed to by its (int ∗)arg.  The click space threshold is the maximum number of pixels apart that two mouse-down events may be and still be considered a double-click.  Thus, for a subsequent mouse-down event to be considered a double-click, it must occur within the number of vertical retrace intervals given by the click time threshold since the first mouse-down, and the location where it occurs must be within the distance given by the click space theshold from the original mouse-down.  The click space threshold must be met in both x and y. 

EVSIOCCS
This ioctl returns the current click space theshold in the integer pointed to by its (int ∗)arg. 

EVSIOSMS
This ioctl sets the current mouse scalings to the ones contained in the evsioMouseScaling structure pointed to by its (struct evsioMouseScaling ∗)arg.  When the ev driver receives mouse motion, it looks at the amount of mouse motion that has occurred in the last 1/68th of a second.  That amount of motion, in pixels, is then compared to the first entry in the scaleThresholds component of the current mouse scaling.  If the amount of mouse motion is greater than that threshold, it keeps going to the next entry in the thresholds array.  Once the correct entry of the thresholds array is found, the ev driver looks in the corresopnding element of the scale factors array, found in the scaleFactors component of the structure.  It then multiplies the mouse motion by that scale factor. 

Mouse Scaling Example
For example, let the numScaleLevels component be 2, and the scaleThresholds array contain 3 and 6, and the scaleFactors array contain 2 and 4.  Then, if the mouse moved by a cartesian distance of 4 pixels, it would get to the first element of the thresholds array (3), since it was less than second element (6).  This would cause the driver to multiply the mouse motion by the corresponding scale factor, which in this case is 2.  Thus the cursor would move twice as far as the mouse.  Thus, the affect of mouse scaling is to cause the cursor to move nonlinearally faster than the mouse as both are speeded up.  This is very useful on the large screen of a NeXT machine. 

EVSIOCMS
This ioctl returns the current mouse scaling thresholds and factors in the struct evsioMouseScaling pointed to by its (struct evsioMouseScaling ∗)arg.  The number of entries in these arrays is given by the numScaleLevels component of the structure. 

EVSIOSADT
This ioctl sets the autodim time to the integer pointed to by its (int ∗)arg.  The autodim time is the number of vertical retrace intervals from the last generated user event until the screen automatically dims to one-fourth of its original value.  This is done to prolong the life of the screen phosphor. 

EVSIOCADT
This ioctl returns the current autodim time in the integer pointed to by its (int ∗)arg. 

EVSIOSMH
This ioctl sets the mouse handedness to the integer pointed to by its (int ∗)arg.  If the mouse handedness is nonzero, then the effects of the left and right mouse buttons are completely exchanged; that is, if the mouse handedness is set, then when the right mouse button is pressed, a left-mouse-down event is generated.  This is intended for use by left-handed people or others who would like to place the mouse on the left side of their keyboard and still be able to use their index finger as the primary pointing digit. 

EVSIOCMH
This ioctl returns the current mouse handedness in the integer pointed to by its (int ∗)arg. 

EVSIOSMBT
This ioctl sets the mouse buttons tied state to the integer pointed to by its (int ∗)arg.  If the mouse buttons tied state is nonzero, then if either the left or the right mouse button is down, they are both considered to be down; that is, the two mouse buttons may be used interchangeably.  This is for people who, for simplicity of interface, wish to disable the right mouse button’s special actions. 

EVSIOCMBT
This ioctl returns the current mouse buttons tied state in the integer pointed to by its (int ∗)arg. 

EVIORMS
This ioctl resets all of the user preference items for the mouse to their default states.  The click time threshold, click space theshold, mouse scaling thesholds and factors, the mouse handedness, and the autodim time are all reset.

EVSIOSB
This ioctl sets the brightness level of the MegaPixel display to the integer pointed to by its (int ∗)arg.  This level is immediately reflected on the screen.  Note, however, that this level is not remembered anywhere; in order for the state to be remembered, it must be written to parameter RAM.  Brightness values can range from 0 to 61 inclusive; if a value outside of this range is passed, it will be clipped to the legal values. 

EVSIOCB
This ioctl returns the current screen brightness level in the integer pointed to by its (int ∗)arg. 

EVSIOSA
This ioctl sets the attenuation level of the sound output to the integer pointed to by its (int ∗)arg.  This level is immediately reflected in any ongoing sound output.  Note, however, that this level is not remembered anywhere; in order for the state to be remembered, it must be written to parameter RAM.  Attenuation values determine how much the volume is lowered from its possible maximum; an attenuation value of 0 results in the maximum volume.  Attenuation values can range from 0 to 43 inclusive; if a value outside of this range is passed, it will be clipped to the legal values.  The same attenuation is applied to both left and right sound channels. 

EVSIOCA
This ioctl returns the current attenuation level in the integer pointed to by its (int ∗)arg. 

SEE ALSO

/dev/ev0 (4)

FILES

/dev/evs0

7th Edition  —  12 December 1988

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026