Provides access to the natively attached mouse.
The mouse special file serves as an interface between the application interface and the system mouse. This special file provides the application with the ability to receive input from the mouse and allows the application to change mouse configuration parameters, such as mouse sampling rates and resolution.
Standard configuration methods work with the mouse special file. No user configurable attribute commands exist for this special file. Applications that open the special file can modify device attribute dynamically using the appropriate ioctl interface; however, modifications are not saved in the configuration database.
The open subroutine call specifying the mouse special file is processed normally except that the Oflag and Mode parameters are ignored. The open request is rejected when the special file is already opened or when a kernel extension attempts to open the special file. All mouse inputs are flushed following an open subroutine call until an input ring is established. The mouse device is reset to the default configuration when an open request is made.
The mouse special file does not support the read or write subroutine calls. Instead, input data is obtained from the mouse via the input ring. The read and write subroutine calls behave the same as read or write to the /dev/null file.
The mouse special file supports the following functions with ioctls:
|Returns a devinfo structure.
|Returns the query mouse device identifier.
|Specifies the address of the input ring and the value to be used as the source identifier when enqueueing reports on the ring.
|Flushes the input ring.
|Sets the mouse reporting threshold.
|Sets the mouse resolution.
|Sets the mouse scale factor.
|Sets the mouse sample rate.
The following error codes can be found in the /usr/include/sys/errno.h file:
|Indicates insufficient authority to access an address or invalid address.
|Indicates and I/O error.
|Indicates insufficient memory for required paging operation.
|Indicates insufficient file system or paging space.
|Indicates invalid argument specified.
|Indicates that the request has been interrupted by a signal.
|Specifies a permanent error occurred.
|Indicates a device is busy.
|Indicates an unsupported device number.
|Indicates an unsupported device or device type mismatch.
|Indicates that an open is not allowed.
The mouse special file is part of Base Operating System (BOS) Runtime.
|Contains the ioctl commands.
The close subroutine, ioctl subroutine, open subroutine, read subroutine, write subroutine.
Special Files Overview.