Deleted Added
full compact
sysmouse.4 (53200) sysmouse.4 (57676)
1.\" Copyright (c) 1997
2.\" John-Mark Gurney. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
1.\" Copyright (c) 1997
2.\" John-Mark Gurney. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD: head/share/man/man4/sysmouse.4 53200 1999-11-15 23:14:32Z phantom $
28.\" $FreeBSD: head/share/man/man4/sysmouse.4 57676 2000-03-01 14:50:24Z sheldonh $
29.\"
30.Dd December 3, 1997
31.Dt SYSMOUSE 4
32.Os FreeBSD
33.Sh NAME
34.Nm sysmouse
35.\" .Nd supplies mouse data from syscons for other applications
36.Nd virtualized mouse driver

--- 43 unchanged lines hidden (view full) ---

80.Bl -tag -width bit_7 -compact
81.It bit 7
82Always one.
83.It bit 6..3
84Always zero.
85.It bit 2
86Left button status; cleared if pressed, otherwise set.
87.It bit 1
29.\"
30.Dd December 3, 1997
31.Dt SYSMOUSE 4
32.Os FreeBSD
33.Sh NAME
34.Nm sysmouse
35.\" .Nd supplies mouse data from syscons for other applications
36.Nd virtualized mouse driver

--- 43 unchanged lines hidden (view full) ---

80.Bl -tag -width bit_7 -compact
81.It bit 7
82Always one.
83.It bit 6..3
84Always zero.
85.It bit 2
86Left button status; cleared if pressed, otherwise set.
87.It bit 1
88Middle button status; cleared if pressed, otherwise set. Always one,
88Middle button status; cleared if pressed, otherwise set.
89Always one,
89if the device does not have the middle button.
90.It bit 0
91Right button status; cleared if pressed, otherwise set.
92.El
93.It Byte 2
94The first half of horizontal movement count in two's complement;
95-128 through 127.
96.It Byte 3

--- 129 unchanged lines hidden (view full) ---

226is always set to -1.
227.Pp
228The
229.Dv accelfactor
230is always 0.
231.Pp
232The
233.Dv packetsize
90if the device does not have the middle button.
91.It bit 0
92Right button status; cleared if pressed, otherwise set.
93.El
94.It Byte 2
95The first half of horizontal movement count in two's complement;
96-128 through 127.
97.It Byte 3

--- 129 unchanged lines hidden (view full) ---

227is always set to -1.
228.Pp
229The
230.Dv accelfactor
231is always 0.
232.Pp
233The
234.Dv packetsize
234field specifies the length of the data packet. It depends on the
235field specifies the length of the data packet.
236It depends on the
235operation level.
236.Pp
237.Bl -tag -width level_0__ -compact
238.It Em level 0
2395 bytes
240.It Em level 1
2418 bytes
242.El
243.Pp
244The array
245.Dv syncmask
246holds a bit mask and pattern to detect the first byte of the
247data packet.
248.Dv syncmask[0]
237operation level.
238.Pp
239.Bl -tag -width level_0__ -compact
240.It Em level 0
2415 bytes
242.It Em level 1
2438 bytes
244.El
245.Pp
246The array
247.Dv syncmask
248holds a bit mask and pattern to detect the first byte of the
249data packet.
250.Dv syncmask[0]
249is the bit mask to be ANDed with a byte. If the result is equal to
251is the bit mask to be ANDed with a byte.
252If the result is equal to
250.Dv syncmask[1] ,
251the byte is likely to be the first byte of the data packet.
252Note that this method of detecting the first byte is not 100% reliable,
253thus, should be taken only as an advisory measure.
254.Pp
255.It Dv MOUSE_SETMODE Ar mousemode_t *mode
256The command changes the current operation parameters of the mouse driver
257as specified in
258.Ar mode .
259Only
260.Dv level
253.Dv syncmask[1] ,
254the byte is likely to be the first byte of the data packet.
255Note that this method of detecting the first byte is not 100% reliable,
256thus, should be taken only as an advisory measure.
257.Pp
258.It Dv MOUSE_SETMODE Ar mousemode_t *mode
259The command changes the current operation parameters of the mouse driver
260as specified in
261.Ar mode .
262Only
263.Dv level
261may be modifiable. Setting values in the other field does not generate
264may be modifiable.
265Setting values in the other field does not generate
262error and has no effect.
263.\" .Pp
264.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
265.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
266.\" These commands are not supported by the
267.\" .Nm
268.\" driver.
269.Pp

--- 67 unchanged lines hidden (view full) ---

337.It Dv MOUSE_MODE
338This sets the
339.Xr signal 3
340to be delivered to the current process when a button is pressed.
341The signal to be delivered is set in
342.Dv u.mode .
343.El
344.Pp
266error and has no effect.
267.\" .Pp
268.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
269.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
270.\" These commands are not supported by the
271.\" .Nm
272.\" driver.
273.Pp

--- 67 unchanged lines hidden (view full) ---

341.It Dv MOUSE_MODE
342This sets the
343.Xr signal 3
344to be delivered to the current process when a button is pressed.
345The signal to be delivered is set in
346.Dv u.mode .
347.El
348.Pp
345The above operations are for virtual consoles. The operations defined
349The above operations are for virtual consoles.
350The operations defined
346below are for the console control device and used by
347.Xr moused 8
348to pass mouse data to the console driver.
349.Pp
350.Bl -tag -width MOUSE_MOVEABS -compact
351.It Dv MOUSE_ACTION
352.It Dv MOUSE_MOTIONEVENT
353These operations take the information in
354.Dv u.data
355and act upon it. Mouse data will be sent to the
356.Nm
357driver if it is open.
358.Dv MOUSE_ACTION
359also processes button press actions and sends signal to the process if
360requested or performs cut and paste operations
361if the current console is a text interface.
362.It Dv MOUSE_BUTTONEVENT
363.Dv u.data
351below are for the console control device and used by
352.Xr moused 8
353to pass mouse data to the console driver.
354.Pp
355.Bl -tag -width MOUSE_MOVEABS -compact
356.It Dv MOUSE_ACTION
357.It Dv MOUSE_MOTIONEVENT
358These operations take the information in
359.Dv u.data
360and act upon it. Mouse data will be sent to the
361.Nm
362driver if it is open.
363.Dv MOUSE_ACTION
364also processes button press actions and sends signal to the process if
365requested or performs cut and paste operations
366if the current console is a text interface.
367.It Dv MOUSE_BUTTONEVENT
368.Dv u.data
364specifies a button and its click count. The console driver will
369specifies a button and its click count.
370The console driver will
365use this information for signal delivery if requested or
366for cut and paste operations if the console is in text mode.
367.El
368.Pp
369.Dv MOUSE_MOTIONEVENT
370and
371.Dv MOUSE_BUTTONEVENT
372are newer interface and are designed to be used together.

--- 16 unchanged lines hidden (view full) ---

389.Ed
390.Pp
391.Dv x ,
392.Dv y
393and
394.Dv z
395represent movement of the mouse along respective directions.
396.Dv buttons
371use this information for signal delivery if requested or
372for cut and paste operations if the console is in text mode.
373.El
374.Pp
375.Dv MOUSE_MOTIONEVENT
376and
377.Dv MOUSE_BUTTONEVENT
378are newer interface and are designed to be used together.

--- 16 unchanged lines hidden (view full) ---

395.Ed
396.Pp
397.Dv x ,
398.Dv y
399and
400.Dv z
401represent movement of the mouse along respective directions.
402.Dv buttons
397tells the state of buttons. It encodes up to 31 buttons in the bit 0 though
403tells the state of buttons.
404It encodes up to 31 buttons in the bit 0 though
398the bit 30. If a button is held down, the corresponding bit is set.
399.Pp
400.It Dv mode
401.Bd -literal
402struct mouse_mode {
403 int mode;
404 int signal;
405};
406.Ed
407.Pp
408The
409.Dv signal
405the bit 30. If a button is held down, the corresponding bit is set.
406.Pp
407.It Dv mode
408.Bd -literal
409struct mouse_mode {
410 int mode;
411 int signal;
412};
413.Ed
414.Pp
415The
416.Dv signal
410field specifies the signal to be delivered to the process. It must be
417field specifies the signal to be delivered to the process.
418It must be
411one of the values defined in
412.Ao Pa signal.h Ac .
413The
414.Dv mode
415field is currently unused.
416.Pp
417.It Dv event
418.Bd -literal

--- 45 unchanged lines hidden ---
419one of the values defined in
420.Ao Pa signal.h Ac .
421The
422.Dv mode
423field is currently unused.
424.Pp
425.It Dv event
426.Bd -literal

--- 45 unchanged lines hidden ---