Mouse sensitivity for DECWindows on a DS3100

Chuck Price price at chukls.ucs.dec.com
Sat Jul 21 10:38:49 AEST 1990


In article <1990Jul19.184903.8876 at wam.umd.edu>, rgc at wam.umd.edu (Ross Garrett Cutler) writes:

> Hello,
> 	We have a DS 3100 running Ultrix 3.1d and DECWindows.  I'm interested
> in changing the senitivity of the mouse.  For example, if you move the
> mouse 1" on the desk, and it moves 2" on the screen, can you change it
> so that it moves only .5" on the screen?  I'm familiar with the 
> acceleration parameters with the mouse (via xset), but I see no mouse
> scale factor.  I've called DEC about this, and after a week of investigation,
> they say it's impossible!  Can this be true?  This seems like a fundamental
> setting (even the MS mouse.com driver on the PC has it!).  Please help.
> Ross.
> --
> Ross Cutler
> University of Maryland, College Park
> Internet: rgc at wam.umd.edu
> 

The xset command doesn't accept the numerator *and* denominator value for the
XChangePointerControl() command. The following application will do what
you want. No
warranties or documentation included.  According to the
Scheifler,Gettys, and Newman
manual the server is free to round an acceleration to a convenient
value. In fact, in
playing with the following program, it "feels like" the DECwindows
server (on my
desk) doesn't actually go any lower than 1/1. I'd have to dig into the
code to verify. Maybe
Ken Lee or someone will save me the trouble ? :-)

Anyway, have fun with the following: (build with cc -o accel accel.c -lX11).
Feel free to embellish, and no apologies to those of you who *really*
know how to
write X applications, and know this for the kludge it is... :-)

-chuck
============================
#include <X11/Xlib.h>
#include <stdio.h>
Display *d;

main(argc, argv)
int argc;
char **argv;
{
  int cur_num, cur_den, cur_thresh;
  if (argc < 4) {
    printf("%s accel_numerator accel_denominator threshold\n",argv[0]);
    exit(0);
  }

  d= XOpenDisplay(0);
  if (d==NULL) {
    printf("Couldn't open display.\n");
  }
  XGetPointerControl(d,&cur_num,&cur_den,&cur_thresh);
  printf("%s: Current Accellerator %i / %i with threshold at %i
pixels.\n",argv[0],cur_num,
          cur_den,cur_thresh);
  XChangePointerControl(d,True,True,atoi(argv[1]), atoi(argv[2]),
atoi(argv[3]));
  XGetPointerControl(d,&cur_num,&cur_den,&cur_thresh);
  printf("%s: New Accellerator %i / %i with threshold at %i
pixels.\n",argv[0],cur_num,
          cur_den,cur_thresh);

}



More information about the Comp.unix.ultrix mailing list