home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 16627 < prev    next >
Encoding:
Text File  |  1992-11-14  |  5.1 KB  |  194 lines

  1. Path: sparky!uunet!westmx!rodkey
  2. From: rodkey@westmont.EDU (John Rodkey)
  3. Newsgroups: comp.os.linux
  4. Subject: Slightly better mouse testing
  5. Summary: diffs for changing mouse.c included
  6. Keywords: mouse linux testing
  7. Message-ID: <320@westmx.westmont.edu>
  8. Date: 13 Nov 92 20:10:20 GMT
  9. Organization: Westmont College, Santa Barbara, CA
  10. Lines: 182
  11.  
  12. If you have a busmouse, you know how frustrating it is to try to get
  13. it going with linux/X .  Thus, the /usr/X386/lib/X11/tst/mouse/mouse.c
  14. program was created to allow one to see if the mouse is being recognized
  15. properly.  Unfortunately, this program floods the screen with extra information
  16. every time it polls (it does poll, doesn't it?) the mouse.  I made a slight
  17. mod to mouse.c which only outputs if dx, dy, or button changes. The
  18. difference is enormouse - I mean enormous :)  - you can actually see
  19. what's going on with your mouse.  Enjoy.
  20.  
  21. Contents below - mouse droppings + diffs for mouse.c
  22.  
  23. ----  mouse droppings - output of mouse after the modification ---
  24.  
  25. mouse BusMouse /dev/modem
  26.  
  27. You are testing BusMouse on /dev/mouse.
  28. Play with the mouse - hit ctrl-c to stop
  29. <Here I moved the mouse to the left>
  30. button: 0, dx: 0, dy: -1
  31. button: 0, dx: 0, dy: -2
  32. button: 0, dx: 0, dy: -3
  33. button: 0, dx: 0, dy: -4
  34. button: 0, dx: 0, dy: -5
  35. button: 0, dx: 0, dy: -4
  36. button: 0, dx: 0, dy: -3
  37. button: 0, dx: 0, dy: -2
  38. button: 0, dx: 0, dy: -1
  39. <Here I moved the mouse to the right>
  40. button: 0, dx: 0, dy: 0
  41. button: 0, dx: 0, dy: 1
  42. button: 0, dx: 0, dy: 1
  43. button: 0, dx: 0, dy: 2
  44. button: 0, dx: 0, dy: 8
  45. button: 0, dx: 0, dy: 12
  46. button: 0, dx: 0, dy: 10
  47. button: 0, dx: 0, dy: 11
  48. button: 0, dx: 0, dy: 10
  49. button: 0, dx: 0, dy: 8
  50. button: 0, dx: 0, dy: 5
  51. button: 0, dx: 0, dy: 1
  52. button: 0, dx: 0, dy: 0
  53. <Here I moved the mouse to the down>
  54. button: 0, dx: -3, dy: 0
  55. button: 0, dx: -5, dy: 0
  56. button: 0, dx: -6, dy: 0
  57. button: 0, dx: -7, dy: 0
  58. button: 0, dx: -8, dy: 0
  59. button: 0, dx: -6, dy: 0
  60. button: 0, dx: -4, dy: -1
  61. button: 0, dx: -5, dy: -1
  62. button: 0, dx: -3, dy: -1
  63. button: 0, dx: -1, dy: 0
  64. <Here I moved the mouse to the up>
  65. button: 0, dx: 0, dy: 0
  66. button: 0, dx: 3, dy: 0
  67. button: 0, dx: 6, dy: 0
  68. button: 0, dx: 4, dy: 0
  69. button: 0, dx: 1, dy: 0
  70. button: 0, dx: 0, dy: 0
  71. <clicking buttons - left >
  72. button: 4, dx: 0, dy: 0
  73. button: 0, dx: 0, dy: 0
  74. <clicking buttons - middle >
  75. button: 2, dx: 0, dy: 0
  76. button: 0, dx: 0, dy: 0
  77. <clicking buttons - right >
  78. button: 1, dx: 0, dy: 0
  79. button: 0, dx: 0, dy: 0
  80. <clicking buttons - left 2 >
  81. button: 4, dx: 0, dy: 0
  82. button: 6, dx: 0, dy: 0
  83. button: 0, dx: 0, dy: 0
  84. <clicking buttons - right 2 >
  85. button: 2, dx: 0, dy: 0
  86. button: 3, dx: 0, dy: 0
  87. button: 2, dx: 0, dy: 0
  88. button: 0, dx: 0, dy: 0
  89. <clicking buttons - all 3 >
  90. button: 5, dx: 0, dy: 0
  91. button: 7, dx: 0, dy: 0
  92. button: 0, dx: 0, dy: 0
  93. <clicking buttons - outside 2 >
  94. button: 4, dx: 0, dy: 0
  95. button: 5, dx: 0, dy: 0
  96. button: 0, dx: 0, dy: 0
  97. finished.
  98. ----  end of droppings ---
  99. ----  start of mousediffs ---
  100. # - mousediffs - mouse.c is the modified version.
  101. *** mouse.c    Thu Nov 12 22:26:28 1992
  102. --- mouse.old.c    Thu Nov 12 22:24:41 1992
  103. ***************
  104. *** 37,61 ****
  105.   #include "atKeynames.h"
  106.   #else
  107.   #include "mouse.h"
  108.   #endif
  109.   
  110. - static int           obutton, odx, ody;
  111.   static void
  112.   Error (const char *str)
  113.   {
  114.     fprintf (stderr, "%s\n", str);
  115.   }
  116.   
  117.   static void
  118.   x386PostMseEvent (int button, int dx, int dy)
  119.   {
  120. -   if ( odx != dx || ody != dy || obutton != button ) {
  121.     fprintf (stderr, "button: %d, dx: %d, dy: %d\n", button, dx, dy);
  122. -   odx = dx ; ody = dy ; obutton = button;
  123. -   }
  124.   }
  125.   
  126.   static void
  127.   x386SetSpeed(old, new, cflag)
  128.        int old, new;
  129. --- 37,56 ----
  130. ***************
  131. *** 312,331 ****
  132.     int i = 0;
  133.     char *str, *dev;
  134.   
  135.   
  136.     if (argc != 3) {
  137. !     fprintf (stderr, "Usage: %s [Microsoft|MouseSystem|MMseries|Logitech|BusMouse] device\n", argv [0]);
  138.       exit (1);
  139.     }
  140.   
  141.     i = P_MS;
  142.     if (!strcasecmp (argv [1], "Microsoft")) i = P_MS;
  143.     if (!strcasecmp (argv [1], "MouseSystem")) i = P_MSC;
  144.     if (!strcasecmp (argv [1], "MMseries")) i = P_MM;
  145.     if (!strcasecmp (argv [1], "Logitech")) i = P_LOGI;
  146. -   if (!strcasecmp (argv [1], "BusMouse")) i = P_BM;
  147.   
  148.     dev = argv[2];
  149.   
  150.     switch (i) {
  151.     case P_MS:
  152. --- 307,325 ----
  153.     int i = 0;
  154.     char *str, *dev;
  155.   
  156.   
  157.     if (argc != 3) {
  158. !     fprintf (stderr, "Usage: %s [Microsoft|MouseSystem|MMseries|Logitech] device\n", argv [0]);
  159.       exit (1);
  160.     }
  161.   
  162.     i = P_MS;
  163.     if (!strcasecmp (argv [1], "Microsoft")) i = P_MS;
  164.     if (!strcasecmp (argv [1], "MouseSystem")) i = P_MSC;
  165.     if (!strcasecmp (argv [1], "MMseries")) i = P_MM;
  166.     if (!strcasecmp (argv [1], "Logitech")) i = P_LOGI;
  167.   
  168.     dev = argv[2];
  169.   
  170.     switch (i) {
  171.     case P_MS:
  172. ***************
  173. *** 337,349 ****
  174.     case P_MM:
  175.       str= "MMseries";
  176.       break;
  177.     case P_LOGI:
  178.       str = "Logitech";
  179. -     break;
  180. -   case P_BM:
  181. -     str = "BusMouse";
  182.       break;
  183.     }
  184.     fprintf (stderr, "You are testing %s on %s.\n", str, dev);
  185.     x386MseConfig (dev, i);
  186.   
  187. --- 331,340 ----
  188. -- 
  189. ----------==========[[[[[[[[[[]]]]]]]]]]==========----------
  190.           John Rodkey, Director of Academic Computing, 
  191.             Westmont College, Santa Barbara, CA
  192.           rodkey@westmont.EDU, uunet!westmx!rodkey
  193.