Run with occassionally connected keyboard?

Zephaniah E. Hull warp at aehallh.com
Tue Feb 21 20:09:02 PST 2006


On Tue, Feb 21, 2006 at 08:11:03AM +0100, MagicITX wrote:
> I have an xorg-x11 7.0 system that sometimes has a keyboard and
> sometimes not.  I'm using the evdev keyboard driver on
> /dev/input/event0.  (The 'keyboard' and 'kbd' drivers don't work.) 
> The problem is if the keyboard isn't present, the kernel doesn't
> create /dev/input/event0.  Thus the evdev driver doesn't load and xorg
> won't start.
> 
> I'm familiar with the "void" input device driver so I can run xorg
> without a keyboard.  The problem is sometimes I have a keyboad.  I
> don't want to have to change the configuration file each time.
> 
> I guess I'd really like an "AllowKeyboardOpenFail" option like
> "AllowMouseOpenFail" for the server section in xorg.conf.
> 
> Is there anything I can do with xorg or evdev to make this work?  If
> not is there any way I can fake /dev/input/event0 when there is no
> keyboard?  (I tried ln -s /dev/null /dev/input/event0 but the ioctrl
> was smart enough not to accept it.)

Yes, have the core keyboard be a void device (since you can't be sure it
will be there when the server starts, this is needed.  If you could be
sure that it was connected when the server started, and only then
unplugged it this would not be needed.), and use the new (in modular CVS)
evdev driver for the keyboard, specifying by name and/or phys[0].

The evdev driver handles hotplug just fine these days, and the only
catch is that if you're using it for a core keyboard/pointer you must
have the device plugged in when you start X.

That last bit is a pain, but we're talking some noticeable server
redesign to change it, at least as far as I can see, so we're probably
stuck with it for now.

Hope this helps.

Zephaniah E. Hull.
xf86-input-evdev maintainer.

0: Support for specification by abilities (keys, buttons, various axes,
etc) is in the works, I'm just trying to figure out a good way for the
user to specify them.

-- 
	  1024D/E65A7801 Zephaniah E. Hull <warp at aehallh.com>
	   92ED 94E4 B1E6 3624 226D  5727 4453 008B E65A 7801
	    CCs of replies from mailing lists are requested.

Has anyone got a reference cynic? I think I need to recalibrate myself.
  -- James Riden in the SDM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20060221/d266b054/attachment.pgp>


More information about the xorg mailing list