home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!westmx!rodkey
- From: rodkey@westmont.EDU (John Rodkey)
- Newsgroups: comp.os.linux
- Subject: Slightly better mouse testing
- Summary: diffs for changing mouse.c included
- Keywords: mouse linux testing
- Message-ID: <320@westmx.westmont.edu>
- Date: 13 Nov 92 20:10:20 GMT
- Organization: Westmont College, Santa Barbara, CA
- Lines: 182
-
- If you have a busmouse, you know how frustrating it is to try to get
- it going with linux/X . Thus, the /usr/X386/lib/X11/tst/mouse/mouse.c
- program was created to allow one to see if the mouse is being recognized
- properly. Unfortunately, this program floods the screen with extra information
- every time it polls (it does poll, doesn't it?) the mouse. I made a slight
- mod to mouse.c which only outputs if dx, dy, or button changes. The
- difference is enormouse - I mean enormous :) - you can actually see
- what's going on with your mouse. Enjoy.
-
- Contents below - mouse droppings + diffs for mouse.c
-
- ---- mouse droppings - output of mouse after the modification ---
-
- mouse BusMouse /dev/modem
-
- You are testing BusMouse on /dev/mouse.
- Play with the mouse - hit ctrl-c to stop
- <Here I moved the mouse to the left>
- button: 0, dx: 0, dy: -1
- button: 0, dx: 0, dy: -2
- button: 0, dx: 0, dy: -3
- button: 0, dx: 0, dy: -4
- button: 0, dx: 0, dy: -5
- button: 0, dx: 0, dy: -4
- button: 0, dx: 0, dy: -3
- button: 0, dx: 0, dy: -2
- button: 0, dx: 0, dy: -1
- <Here I moved the mouse to the right>
- button: 0, dx: 0, dy: 0
- button: 0, dx: 0, dy: 1
- button: 0, dx: 0, dy: 1
- button: 0, dx: 0, dy: 2
- button: 0, dx: 0, dy: 8
- button: 0, dx: 0, dy: 12
- button: 0, dx: 0, dy: 10
- button: 0, dx: 0, dy: 11
- button: 0, dx: 0, dy: 10
- button: 0, dx: 0, dy: 8
- button: 0, dx: 0, dy: 5
- button: 0, dx: 0, dy: 1
- button: 0, dx: 0, dy: 0
- <Here I moved the mouse to the down>
- button: 0, dx: -3, dy: 0
- button: 0, dx: -5, dy: 0
- button: 0, dx: -6, dy: 0
- button: 0, dx: -7, dy: 0
- button: 0, dx: -8, dy: 0
- button: 0, dx: -6, dy: 0
- button: 0, dx: -4, dy: -1
- button: 0, dx: -5, dy: -1
- button: 0, dx: -3, dy: -1
- button: 0, dx: -1, dy: 0
- <Here I moved the mouse to the up>
- button: 0, dx: 0, dy: 0
- button: 0, dx: 3, dy: 0
- button: 0, dx: 6, dy: 0
- button: 0, dx: 4, dy: 0
- button: 0, dx: 1, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - left >
- button: 4, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - middle >
- button: 2, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - right >
- button: 1, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - left 2 >
- button: 4, dx: 0, dy: 0
- button: 6, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - right 2 >
- button: 2, dx: 0, dy: 0
- button: 3, dx: 0, dy: 0
- button: 2, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - all 3 >
- button: 5, dx: 0, dy: 0
- button: 7, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- <clicking buttons - outside 2 >
- button: 4, dx: 0, dy: 0
- button: 5, dx: 0, dy: 0
- button: 0, dx: 0, dy: 0
- finished.
- ---- end of droppings ---
- ---- start of mousediffs ---
- # - mousediffs - mouse.c is the modified version.
- *** mouse.c Thu Nov 12 22:26:28 1992
- --- mouse.old.c Thu Nov 12 22:24:41 1992
- ***************
- *** 37,61 ****
- #include "atKeynames.h"
- #else
- #include "mouse.h"
- #endif
-
- - static int obutton, odx, ody;
- -
- static void
- Error (const char *str)
- {
- fprintf (stderr, "%s\n", str);
- }
-
- static void
- x386PostMseEvent (int button, int dx, int dy)
- {
- - if ( odx != dx || ody != dy || obutton != button ) {
- fprintf (stderr, "button: %d, dx: %d, dy: %d\n", button, dx, dy);
- - odx = dx ; ody = dy ; obutton = button;
- - }
- }
-
- static void
- x386SetSpeed(old, new, cflag)
- int old, new;
- --- 37,56 ----
- ***************
- *** 312,331 ****
- int i = 0;
- char *str, *dev;
-
-
- if (argc != 3) {
- ! fprintf (stderr, "Usage: %s [Microsoft|MouseSystem|MMseries|Logitech|BusMouse] device\n", argv [0]);
- exit (1);
- }
-
- i = P_MS;
- if (!strcasecmp (argv [1], "Microsoft")) i = P_MS;
- if (!strcasecmp (argv [1], "MouseSystem")) i = P_MSC;
- if (!strcasecmp (argv [1], "MMseries")) i = P_MM;
- if (!strcasecmp (argv [1], "Logitech")) i = P_LOGI;
- - if (!strcasecmp (argv [1], "BusMouse")) i = P_BM;
-
- dev = argv[2];
-
- switch (i) {
- case P_MS:
- --- 307,325 ----
- int i = 0;
- char *str, *dev;
-
-
- if (argc != 3) {
- ! fprintf (stderr, "Usage: %s [Microsoft|MouseSystem|MMseries|Logitech] device\n", argv [0]);
- exit (1);
- }
-
- i = P_MS;
- if (!strcasecmp (argv [1], "Microsoft")) i = P_MS;
- if (!strcasecmp (argv [1], "MouseSystem")) i = P_MSC;
- if (!strcasecmp (argv [1], "MMseries")) i = P_MM;
- if (!strcasecmp (argv [1], "Logitech")) i = P_LOGI;
-
- dev = argv[2];
-
- switch (i) {
- case P_MS:
- ***************
- *** 337,349 ****
- case P_MM:
- str= "MMseries";
- break;
- case P_LOGI:
- str = "Logitech";
- - break;
- - case P_BM:
- - str = "BusMouse";
- break;
- }
- fprintf (stderr, "You are testing %s on %s.\n", str, dev);
- x386MseConfig (dev, i);
-
- --- 331,340 ----
- --
- ----------==========[[[[[[[[[[]]]]]]]]]]==========----------
- John Rodkey, Director of Academic Computing,
- Westmont College, Santa Barbara, CA
- rodkey@westmont.EDU, uunet!westmx!rodkey
-