Subject: Re: Remap Mouse-Buttons in X
To: John P. Wittkoski <jpw@insoft.com>
From: Brad Salai <bsalai@servtech.com>
List: port-mac68k
Date: 10/13/1995 13:55:34
>[ Stephen B. "Brad" Salai said: ]
>
>> I wonder if X is messing up the mapping? Having said this, I realize that
>> it shouldn't be possible if the keyboard has been reinited, since in that
>> case, the left and right hand keys would send the same code. Since they are
>> clearly sending different key codes, either ADBReInit wasn't called, it was
>> called but wasn't successful, or the keyboard was subsequently told to go
>> back to different codes for left and right hand keys. If I understand you
>> correctly, it would not be possible for xmodmap to mess up the left and
>> right hand keys if they were sending the identical codes. Therefor at least
>> in my case the codes MUST be different, and something must have told the
>> keyboard to do this.
>
>I think you are correct. X is probably NOT causing the problem. If the keyboard
>sends left and right code as the same keycode, then X has no idea which side
>they are from and really does not care. But if the keyboard is sending
>different codes for left and right, then the X server may not recognize the
>right keycodes if they are not set up in X properly.
>
>However, I don't think using xmodmap will help. This is because I don't think
>there is any way (at the X level) to xmodmap a key sequence into a mouse
>button press. In order to get around this, the code that does this is in the
>ADB driver itself. If it catches a certain input from the keyboard, it
>sends a mouse "keycode" instead. That is why the kernel needs to be recompiled
>in order to provide this function. In the future, it may be possible to switch
>which mode the keyboard is in by using an ioctl call, but it's not there quite
>yet.
>
>Xmodmap lets you do some neat things, like changing keys on a keyboard
>for different locales or nationalities, but can't (to my knowledge) map
>keyboard keycodes to mouse "keycodes" at the X level. If anyone knows of
>a way to do this, then it would be much easier.
>

That is both reasonable, and consistant with my experience. I have tried
some things with xmodmap and they do not work. I even went so far as to buy
a 3 button mouse, but it doesn't work either. I expect that the same things
you would do to make the right hand keys work would have to be done with
the mouse.

Thnaks for the information, I am satisfied that there is nothing I can do,
but frustrated at the same time.

Have a good weekend.

Brad

Stephen B. "Brad" Salai                       bsalai@cyber1.servtech.com
Cumpston & Shaw                               Office (716) 325-5553
Two State Street                              Home   (716) 377-4624
Rochester, NY 14614