All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@suse.de>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Xen devel list <xen-devel@lists.xensource.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: Re: [patch] pvfb: Split mouse and keyboard into separate devices.
Date: Fri, 02 Feb 2007 09:39:12 +0100	[thread overview]
Message-ID: <45C2F8B0.8060501@suse.de> (raw)
In-Reply-To: <20070201180508.GD25856@redhat.com>

Daniel P. Berrange wrote:
> Is there some way we can keep the original device supplying both keyboard
> and mouse events as before, and just have this second device as an opt-in
> 'absolute pointer' event device. That way existing Xorg setups will still
> work correctly without needing any config changes, while providing the 
> ability to opt-in to getting absolute events by adding the extra config.

Should be possible.  Some linux input layer background:

You'll get one /dev/input/event<nr> file per input device.

Applications can open it, they can ask for exclusive access to it (what
usually is a good idea), and if they do so nobody else gets events from
that device.

Input events which are not grabbed that way go the usual route through
the linux input layer and end up as normal key presses in the keyboard
driver or as mouse events in the ps/2 mouse emulation (aka /dev/input/mice).

Splitting keyboard and mouse into two devices makes it possible to
handle the mouse events via /dev/input/event<nr> and let the keyboard
events still go the usual route.

> Ideally Xorg hardware probing could then be modified, so that future Xorg
> releases would automatically utilize the extra device (if present) for 
> absolute co-ords without needing the extra config at all.

Xorg 7.2 comes with a manpage for evdev ;)

Have played only with sles10 guests so far, which unfortunaly has an
older Xorg version, where the evdev driver has much less features, thus
the stuff below is untested ...

Xorg 7.2 evdev can match input devices by name and by id, so you can add
a sections like this:

  Section "InputDevice"
    Driver       "evdev"
    Identifier   "Mouse[1]"
    Option       "Name" "Xen Virtual Pointer"
  EndSection

and be done with it.  The /dev/input/mice section can stay.  It doesn't
hurt, there are no mouse events coming due to evdev asking for exclusive
access.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>

  reply	other threads:[~2007-02-02  8:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 10:59 [patch] pvfb: Split mouse and keyboard into separate devices Gerd Hoffmann
2007-02-01 13:15 ` Markus Armbruster
2007-02-01 13:47   ` Gerd Hoffmann
2007-02-01 17:37 ` Markus Armbruster
2007-02-01 18:05   ` Daniel P. Berrange
2007-02-02  8:39     ` Gerd Hoffmann [this message]
2007-02-02 15:25       ` Keir Fraser
2007-02-02 16:29         ` Gerd Hoffmann
2007-02-02 18:11           ` Keir Fraser
2007-02-03  0:28             ` Daniel P. Berrange
2007-02-03  3:51               ` Daniel P. Berrange
2007-02-05  9:20                 ` Gerd Hoffmann
2007-02-05 14:19                 ` Gerd Hoffmann
2007-02-05  9:10               ` Gerd Hoffmann
2007-02-05 20:55                 ` Daniel P. Berrange
2007-02-06  8:48                   ` Gerd Hoffmann
2007-02-06 13:45                     ` Daniel P. Berrange
2007-02-06 15:05                       ` Gerd Hoffmann
2007-02-06 18:40                     ` Markus Armbruster
2007-02-07  9:35                       ` Gerd Hoffmann

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=45C2F8B0.8060501@suse.de \
    --to=kraxel@suse.de \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.