public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Micah Parrish <micah.parrish@hp.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>,
	"Chiang, Alexander" <achiang@hp.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH RFC] Input: tell mousedev to handle remote console virtual mice using absolute coordinates
Date: Thu, 20 Dec 2007 15:02:44 -0700	[thread overview]
Message-ID: <1198188164.7371.40.camel@strongbad> (raw)

Devices like the HP Integrated Remote Console Virtual Mouse, which are
standard equipment on all Proliant and Integrity servers, produce
absolute coordinates instead of relative coordinates.  This is done to
synchronize the position of the mouse cursor on the client desktop
with the mouse cursor position on the server.  Mousedev is not
designed to pass those absolute events directly to X, but it can
translate them into relative movements.  It currently does this for
tablet like devices and touchpads.  This patch merely tells it to also
include a device with ABS_X, ABS_Y, and mouse buttons in its list of
devices to process input for.

This patch enables the mouse pointer to move when using the remote
console.  Without this patch, the cursor will not move.

Signed-off-by: Micah Parrish <micah.parrish@hp.com>

---
I understand that Dell DRAC and Sun Andromeda are or contain a similar
device, one which produces absolute X,Y coordinates and ordinary mouse
clicks.  This patch may also enable these but I have no access to
these systems.

 mousedev.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index e1c1da0..2dc1b12 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -1028,7 +1028,12 @@ static const struct input_device_id mousedev_ids[] = {
                                BIT_MASK(ABS_PRESSURE) |
                                BIT_MASK(ABS_TOOL_WIDTH) },
        },      /* A touchpad */
-
+       {
+               .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+                        INPUT_DEVICE_ID_MATCH_KEYBIT |
+                        INPUT_DEVICE_ID_MATCH_ABSBIT,
+               .evbit = { BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_SYN) },
+               .keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) },
+               .absbit = { BIT(ABS_X) | BIT(ABS_Y) },
+       },      /* Mouselike device with absolute X and Y but ordinary clicks */
        { },    /* Terminating entry */
 };



             reply	other threads:[~2007-12-20 22:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 22:02 Micah Parrish [this message]
2008-01-09 16:26 ` [PATCH RFC] Input: tell mousedev to handle remote console virtual mice using absolute coordinates Alex Chiang

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=1198188164.7371.40.camel@strongbad \
    --to=micah.parrish@hp.com \
    --cc=achiang@hp.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /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