Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/wsmoused PR/17402: Julio Merino: better fine tuning...



details:   https://anonhg.NetBSD.org/src/rev/3dd194b17105
branches:  trunk
changeset: 535518:3dd194b17105
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Aug 20 16:55:28 2002 +0000

description:
PR/17402: Julio Merino: better fine tuning for both x and y.

diffstat:

 usr.sbin/wsmoused/wsmoused.8 |  16 +++++++++++++---
 usr.sbin/wsmoused/wsmoused.c |  22 ++++++++++++++++------
 2 files changed, 29 insertions(+), 9 deletions(-)

diffs (109 lines):

diff -r 5ded4aa9d2fc -r 3dd194b17105 usr.sbin/wsmoused/wsmoused.8
--- a/usr.sbin/wsmoused/wsmoused.8      Tue Aug 20 16:48:47 2002 +0000
+++ b/usr.sbin/wsmoused/wsmoused.8      Tue Aug 20 16:55:28 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsmoused.8,v 1.4 2002/06/27 22:53:12 wiz Exp $
+.\" $NetBSD: wsmoused.8,v 1.5 2002/08/20 16:55:28 christos Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -39,6 +39,8 @@
 .Op Fl f Ar fifo
 .Op Fl n
 .Op Fl X Ar number
+.Op Fl x Ar number
+.Op Fl y Ar number
 .Sh DESCRIPTION
 The
 .Nm
@@ -66,15 +68,23 @@
 .Nm
 will stop processing events when entering this console and will
 continue its job when you return to any other terminal.
+.It Fl x Ar number
+x slowdown. This positive integer specifies how many events in the x
+direction should be ignored before changing the current column. It
+defaults to 0.
+.It Fl y Ar number
+y slowdown. This positive integer specifies how many events in the y
+direction should be ignored before changing the current row. It
+defaults to 3.
 .El
 .Sh FILES
 .Bl -tag -width /dev/wsdisplayXXX -compact
 .It Pa /dev/ttyE[0-n]
 tty devices
+.It Pa /dev/ttyEstat
+wsdisplay status notification device
 .It Pa /dev/wsmouse0
 mouse control device
-.It Pa /dev/ttyEstat
-wsdisplay status notification device
 .El
 .Sh EXAMPLES
 The following are just a few examples of
diff -r 5ded4aa9d2fc -r 3dd194b17105 usr.sbin/wsmoused/wsmoused.c
--- a/usr.sbin/wsmoused/wsmoused.c      Tue Aug 20 16:48:47 2002 +0000
+++ b/usr.sbin/wsmoused/wsmoused.c      Tue Aug 20 16:55:28 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsmoused.c,v 1.4 2002/07/04 20:50:29 christos Exp $ */
+/* $NetBSD: wsmoused.c,v 1.5 2002/08/20 16:55:28 christos Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: wsmoused.c,v 1.4 2002/07/04 20:50:29 christos Exp $");
+__RCSID("$NetBSD: wsmoused.c,v 1.5 2002/08/20 16:55:28 christos Exp $");
 #endif /* not lint */
 
 #include <sys/ioctl.h>
@@ -72,7 +72,8 @@
 usage(void)
 {
        (void)fprintf(stderr,
-           "Usage: %s [-d device] [-f fifo] [-n] [-X number]\n",
+           "Usage: %s [-d device] [-f fifo] [-n] [-X number] [-x number] "
+           "[-y number]\n",
            getprogname());
        exit(EXIT_FAILURE);
 }
@@ -214,8 +215,6 @@
        mouse.col = mouse.max_col / 2;
        mouse.count_row = 0;
        mouse.count_col = 0;
-       mouse.slowdown_x = 0;
-       mouse.slowdown_y = 2;
        mouse.cursor = 0;
        mouse.selecting = 0;
 }
@@ -310,8 +309,13 @@
        mouse.device_name = _PATH_DEFAULT_MOUSE;
        mouse.fifo_name = NULL;
 
+       /* Defaults that can be overriden by options. If you change
+        * these, update wsmoused.8 accordingly. */
+       mouse.slowdown_x = 0;
+       mouse.slowdown_y = 3;
+
        /* Parse command line options */
-       while ((opt = getopt(argc, argv, "nf:d:X:")) != -1) {
+       while ((opt = getopt(argc, argv, "nf:d:X:x:y:")) != -1) {
                switch (opt) {
                case 'd': /* Mouse device name */
                        mouse.device_name = strdup(optarg);
@@ -325,6 +329,12 @@
                case 'X': /* X console number */
                        XConsole = atoi(optarg);
                        break;
+               case 'x': /* x slowdown */
+                       mouse.slowdown_x = atoi(optarg);
+                       break;
+               case 'y': /* y slowdown */
+                       mouse.slowdown_y = atoi(optarg);
+                       break;
                default:
                        usage();
                        /* NOTREACHED */



Home | Main Index | Thread Index | Old Index