Mapping buttons differently for each mouse device in X - X

This is a discussion on Mapping buttons differently for each mouse device in X - X ; Hi, At work I have a trackball that sits on my right side, and a mouse on my left side, as well as the laptop touchpad. I would like to reverse the mouse buttons only for the mouse on my ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Mapping buttons differently for each mouse device in X

  1. Mapping buttons differently for each mouse device in X

    Hi,

    At work I have a trackball that sits on my right side, and a mouse on
    my left side, as well as the laptop touchpad. I would like to reverse
    the mouse buttons only for the mouse on my left side. How would I do
    this? I looked into xmodmap and can remap the buttons on all the
    devices, but how would I do just one?

    Thanks,

    Adam


  2. Re: Mapping buttons differently for each mouse device in X

    On 14 Dec 2004 14:23:35 -0800, Adam staggered into the Black Sun and
    said:
    > At work I have a trackball that sits on my right side, and a mouse on
    > my left side, as well as the laptop touchpad. I would like to reverse
    > the mouse buttons only for the mouse on my left side. How would I do
    > this? I looked into xmodmap and can remap the buttons on all the
    > devices, but how would I do just one?


    There is no way to tell which mouse device a button event came from
    under X. This is apparently an old, old design decision, and it makes
    what you want impossible. Sorry,

    --
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
    Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
    http://www.brainbench.com / Hire me!
    -----------------------------/ http://crow202.dyndns.org/~mhgraham/resume

  3. Re: Mapping buttons differently for each mouse device in X

    Dances With Crows wrote in
    news:slrncruqvf.hne.danSPANceswitTRAPhcrows@samant ha.crow202.dyndns.org:

    > On 14 Dec 2004 14:23:35 -0800, Adam staggered into the Black Sun and
    > said:
    >> At work I have a trackball that sits on my right side, and a mouse on
    >> my left side, as well as the laptop touchpad. I would like to reverse
    >> the mouse buttons only for the mouse on my left side. How would I do
    >> this? I looked into xmodmap and can remap the buttons on all the
    >> devices, but how would I do just one?

    >
    > There is no way to tell which mouse device a button event came from
    > under X. This is apparently an old, old design decision, and it makes
    > what you want impossible. Sorry,
    >


    Hi!

    Reading this, I wondered, wouldn't it be possible? You know, when Intel
    first began trying to do multitasking, the geometry of their 80XX chips
    wouldn't allow it - so, they came up with the memory mapping & paging
    system to compensate for the shortcomings of the 80XX series design. Linux
    and X are so very modular, that perhaps some talented programmer could
    create something along those lines as a multi-pointer manager program;
    i.e., the pointer devices would plug into the multi-pointer manager/server
    program, and the data massaged there before being sent to / retrieved by
    the client app's using the various pointers.

    Please note, I only know barely enough about Linux & X to suggest that this
    *might* be possible - but, nowhere near enough to even begin to do it.

    Scruffy
    http://scruffyeagle.com

  4. Re: Mapping buttons differently for each mouse device in X

    On Thu, 16 Dec 2004 08:12:29 -0000, Scruffy Eagle staggered into the
    Black Sun and said:
    > Dances With Crows wrote in
    >> On 14 Dec 2004 14:23:35 -0800, Adam staggered into the Black Sun and
    >> said:
    >>> At work I have a trackball that sits on my right side, and a mouse
    >>> on my left side, as well as the laptop touchpad. I would like to
    >>> reverse the mouse buttons only for the mouse on my left side. How
    >>> would I do this?

    >> There is no way to tell which mouse device a button event came from
    >> under X. This is apparently an old, old design decision, and

    > Reading this, I wondered, wouldn't it be possible?


    Most things are possible, it's just a question of how much work
    someone's willing to put into it. The X server knows which device
    triggered a ButtonPress or MotionNotify event; it just doesn't really
    export that knowledge to X clients at the moment.

    > Linux and X are so very modular, that perhaps some talented programmer
    > could create something along those lines as a multi-pointer manager
    > program; i.e., the pointer devices would plug into the multi-pointer
    > manager/server program, and the data massaged there before being sent
    > to / retrieved by the client app's using the various pointers.


    I think this isn't the best way to do things. It'd probably be better
    to write an X extension or modify the XInput extension so that it
    reports which device an event came from (if it doesn't already do
    that... the man pages for XInput functions are pretty damned abstract
    and they lack examples.)

    --
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
    Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
    http://www.brainbench.com / Hire me!
    -----------------------------/ http://crow202.dyndns.org/~mhgraham/resume

+ Reply to Thread