From: Vojtech P. <vo...@su...> - 2002-12-09 10:34:10
|
On Sat, Dec 07, 2002 at 08:26:59AM +0000, Alastair McKinstry wrote: > Thanks. > I'm working on the new debian-installer. I'm looking at the case of > having multiple potential keyboards in a computer, eg. USB & PS/2. > I want to be able to tell, if possible, what keyboards are attached > (possible in the USB case), and failing that (eg in the PS2 case) > if there is a keyboard attached; so that if, eg we spot a keyboard on > the USB port, we configure that, but is there also a keyboard on the > PS/2 port ? On 2.5, there is a complete list of attached input devices in /proc/bus/input/devices. The list is correct only after you load all the needed modules, of course, which shouldn't pose a problem. On 2.4, the only way to check for a PS/2 keyboard is to grep 'dmesg' for 'AT keyboard not present' ... > We may need different keymaps on the different keyboards (indeed, this > might be essential ; one of the few reasons a normal user might have > multiple keyboards is to have different types) > > Alastair > > > On Sat, 2002-12-07 at 04:10, Brad Hards wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On Sat, 7 Dec 2002 06:20, Alastair McKinstry wrote: > > > Hello, > > > > > > I am trying to detect, under Linux (2.4 or 2.5) if a keyboard is > > > _present_ (attached to a PS/2 or other connector). (Similarly, same ges > > > for any non-PC architecture. I know about USB, but PPC? Sparc? > > > Acorn/Amiga/Atari?) > > Easy on 2.5, you could just parse the /proc/bus/input/devices list. Or do an > > EVIOCGBIT to test for a partcular event interface. > > > > What are you actually trying to accomplish? > > > > Brad > > > > - -- > > http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you? > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.6 (GNU/Linux) > > Comment: For info see http://www.gnupg.org > > > > iD8DBQE98XSfW6pHgIdAuOMRAqiMAJ4qw+Cn1FxmUfZWhEdLbszVHhicUQCcDMRy > > uB37rMfI4+4XCp/iRLRFEhE= > > =AuHg > > -----END PGP SIGNATURE----- > > > > > -- > Alastair McKinstry <mck...@de...> > GPG Key fingerprint = 9E64 E714 8E08 81F9 F3DC 1020 FA8E 3790 9051 38F4 > > He that would make his own liberty secure must guard even his enemy from > oppression; for if he violates this duty he establishes a precedent that > will reach to himself. > > - --Thomas Paine -- Vojtech Pavlik SuSE Labs |