Linux Input/HID development
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Eric Paris <eparis@parisplace.org>
Cc: "jonsmirl@gmail.com" <jonsmirl@gmail.com>, linux-input@vger.kernel.org
Subject: Re: Logitech MX5500 Bluetooth mouse middle 'button' does not work
Date: Thu, 01 Mar 2012 13:47:54 +0000	[thread overview]
Message-ID: <1330609674.2398.18.camel@novo.hadess.net> (raw)
In-Reply-To: <CACLa4pvuSqorMzdNE8nPvHVyayufUoL95AXNh9-8_M5oLONhWg@mail.gmail.com>

On Thu, 2012-03-01 at 08:39 -0500, Eric Paris wrote:
> On Wed, Feb 29, 2012 at 4:37 PM, jonsmirl@gmail.com <jonsmirl@gmail.com> wrote:
> > On Wed, Feb 29, 2012 at 4:00 PM, Eric Paris <eparis@parisplace.org> wrote:
> 
> >> I just got a new Logitech MX5500 bluetooth keyboard mouse combo.  I
> >> had no problem at all getting them recognized and connected using the
> >> built in bluetooth on my Lenovo X200 laptop.  My problem is with the
> >> middle mouse 'button.'  On all of my other mice clicking the scroll
> >> wheel acted as a middle button.  On this new mouse it makes a noise
> >> like a 'click' but it doesn't do anything.  I launched evtest and see
> >> events for everything on the mouse (it has a thumb scroll whell, extra
> >> buttons, all sorts of stuff) but it gives no event for 'click'ing the
> >> scroll wheel. (I do see events for scrolling the scroll wheel)
> ...
> > It has never worked as far as I know. The middle button on the mouse
> > reports as device 0 which the input layer is not expecting. I gave up
> > trying to get it to work.
> >
> > This makes the back button near your thumb work as the middle button:
> > /usr/bin/xinput set-button-map "Logitech MX Revolution Mouse" 1 2 3 4 5 6 2 2
> >
> > I have it in .bashrc but it really should be in a udev script. The
> > mouse occasionally disconnects/reconnect. In udev the command would
> > get automatically reapplied.
> 
> If I run your command by hand it works.  I created a udev rule to try
> to auto-run the command and it does not work.
> 
> ATTR{address}=="00:1F:20:3A:C8:BD", ACTION=="add",
> RUN+="/usr/bin/xinput set-button-map "Logitech MX Revolution Mouse" 1
> 2 3 4 5 6 2 2"
> 
> I know the udev rule is triggered, because when I replaced it with
> /bin/touch /tmp/logitech the file was created in /tmp every time the
> mouse turned on.  Now I'm trying to figure out why it doesn't work as
> a udev rule.  Anyone thoughts?  If not, at least I have one way to get
> it mostly working.  Thanks so much everyone!

I think working on the kernel's fried your brain Eric ;)

xinput needs an X display. udev doesn't know that display. You can
instead use Jon's script with this, if you use GNOME 3:
http://who-t.blogspot.com/2011/03/custom-input-device-configuration-in.html

More examples at:
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/input-device-example.sh

Cheers


  parent reply	other threads:[~2012-03-01 13:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 21:00 Logitech MX5500 Bluetooth mouse middle 'button' does not work Eric Paris
2012-02-29 21:28 ` H Hartley Sweeten
2012-02-29 21:37 ` jonsmirl
2012-03-01 13:39   ` Eric Paris
2012-03-01 13:45     ` Eric Paris
2012-03-01 13:47     ` Bastien Nocera [this message]
2012-03-01 13:55       ` jonsmirl
2012-03-01 15:15       ` Eric Paris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330609674.2398.18.camel@novo.hadess.net \
    --to=hadess@hadess.net \
    --cc=eparis@parisplace.org \
    --cc=jonsmirl@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox