[comp.windows.x] Can I map a fcn key to a mouse button?

rembo@unisoft.UUCP (Tony Rems) (11/15/90)

Sender: 
Reply-To: rembo@unisoft.UUCP (Tony Rems)
Followup-To: rembo@unisoft.com
Distribution: 
Organization: UniSoft Corporation -- UNIX R Us.
Keywords: 

I'd like to map pointer 2 on my mouse so that I can
also use one of the function keys on my Sun-3 keyboard
to perform the fcn.  I looked at the man page for
xmodmap but it wasn't really clear how I would go
about mapping a key to perfrom the same fcn as a
mouse button without losing the mouse button functionality.

I appreciate any help.  Thanks in advance.

-Tony

mouse@LARRY.MCRCIM.MCGILL.EDU (11/16/90)

> I'd like to map pointer 2 on my mouse so that I can also use one of
> the function keys on my Sun-3 keyboard to perform the fcn.

This must be arranged with the client(s) you wish to do this for.

> I looked at the man page for xmodmap but it wasn't really clear how I
> would go about mapping a key to perfrom the same fcn as a mouse
> button without losing the mouse button functionality.

You can't do it at all.  Pointer buttons and keyboard keys are entirely
different worlds; you can't map either into the other, not in the
xmodmap sense.  There is a sense in which this may be possible; some
(most?) clients provide some way to specify what operations various
user actions (like pressing a mouse button or a keyboard key) should
perform; depending on the application, you may be able to persuade it
to interpret a keyboard key as a request to do something you would
"normally" use the mouse for.

If you are feeling really twisted you could hack on xscope to pervert
the event stream so as to make a key press appear to be a button press,
but let's not get too weird here....

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu