Linux Input/HID development
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@gmail.com>
To: linux-input@vger.kernel.org
Subject: [RFC][PATCH] Add support for mouse logitech m560
Date: Sat, 23 Aug 2014 14:40:26 +0200	[thread overview]
Message-ID: <1408797629-3474-1-git-send-email-kreijack@inwind.it> (raw)


Hi all,

I bought the mouse in subject. This is a mouse designed for windows 
8. Comparing to a standard one, some buttons (the middle one and the 
two ones placed on the side) are bounded to a key combination 
instead of a button.

Think this mouse as a pair of mouse and keyboard. When the middle
button is pressed the first time it sends a key (as keyboard) 
combination, the same for the other two side button.
Instead the left/right/wheel work correctly.
To complicate further the things, the middle button send a
key combination the odd press, and another one for the even press;
in the latter case it sends also a left click. No event is
generated when the middle button is released.

It is very frustrating to use this mouse in Linux.

Moreover this device is a wireless mouse which uses the unifying 
receiver.

I modified the driver hid-logitech-dj.c to support this, and now
it behaves like an ordinary mouse. I added some hooks to the
standard driver, which translate the "keyboard" event into the
appropriate mouse event.

These hooks call the "right" handler on the basis of the name of
the device (the USB id are the one of the receiver).

Below the patch. This is an RFC because I am not sure if this is 
the right thing to do. I would prefer implements these handler in
other kernel module (to simplify the developing), bu the logic of
the plug-and-play (call the right driver when the device is 
discovered and/or the driver is available), fights when exists
a "default driver" (i.e the one provided today by 
hid-logitech-dj.c.

BR
G.Baroncelli

P.S.
Please put me in CC in case of reply because I am not subscribed
to the mailing list. Thank

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5

             reply	other threads:[~2014-08-23 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-23 12:40 Goffredo Baroncelli [this message]
2014-08-23 12:40 ` [PATCH 1/3] Don't copy more than 'count' byte Goffredo Baroncelli
2014-08-26 21:23   ` Benjamin Tissoires
2014-08-23 12:40 ` [PATCH 2/3] Add support for specific device methods Goffredo Baroncelli
2014-08-26 22:27   ` Benjamin Tissoires
2014-08-23 12:40 ` [PATCH 3/3] Add logitech m560 driver Goffredo Baroncelli
2014-08-25  8:38   ` Nestor Lopez Casado
2014-08-26 21:22     ` Benjamin Tissoires
     [not found]       ` <53FD14F3.2090905@inwind.it>
2014-08-27 17:18         ` Nestor Lopez Casado

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=1408797629-3474-1-git-send-email-kreijack@inwind.it \
    --to=kreijack@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