From: Alastair M. <mck...@de...> - 2002-12-06 19:19:32
|
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?) This is the nearest thing I find to a console-experts list, so does anyone know how to do it ? (The point being, if I'm at, eg. a PC, and there is are USB & PS2 connectors, and I can detect a keyboard on USB, is that the only keyboard attached ?) - Alastair --=20 Alastair McKinstry <mck...@de...> GPG Key fingerprint =3D 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 |
From: Brad H. <bh...@bi...> - 2002-12-07 04:21:35
|
-----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----- |
From: Alastair M. <mck...@de...> - 2002-12-07 08:45:13
|
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 ? 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 >=20 > 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=20 > EVIOCGBIT to test for a partcular event interface. >=20 > What are you actually trying to accomplish? >=20 > Brad >=20 > - --=20 > 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 >=20 > iD8DBQE98XSfW6pHgIdAuOMRAqiMAJ4qw+Cn1FxmUfZWhEdLbszVHhicUQCcDMRy > uB37rMfI4+4XCp/iRLRFEhE=3D > =3DAuHg > -----END PGP SIGNATURE----- >=20 >=20 --=20 Alastair McKinstry <mck...@de...> GPG Key fingerprint =3D 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 |
From: Brad H. <bh...@bi...> - 2002-12-07 09:08:57
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 7 Dec 2002 19:26, 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 ? You shouldn't care. They will always be mixed together. > 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) USB keyboards don't support variable mappings. - -- 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 iD8DBQE98bf8W6pHgIdAuOMRAmeKAJwIVb5ssikwRD5Kicqbmi3vpXZLHgCfcGhb Q5NTXhWCZ2LY5bZ7JGpUsm0= =b9MT -----END PGP SIGNATURE----- |
From: Vojtech P. <vo...@su...> - 2002-12-09 10:33:38
|
On Sat, Dec 07, 2002 at 07:57:32PM +1100, Brad Hards wrote: > On Sat, 7 Dec 2002 19:26, 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 ? > You shouldn't care. They will always be mixed together. Unless you use the event output, of course, or have a multihead patched kernel. > > 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) > USB keyboards don't support variable mappings. It is planned to have per-keyboard keymaps (keycode->keysym), though no scancode->keycode maps for USB. -- Vojtech Pavlik SuSE Labs |
From: Arndt S. <ab...@sr...> - 2002-12-10 17:59:47
|
On Mon, Dec 09, 2002 at 11:30:39AM +0100, Vojtech Pavlik wrote: > > > > 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) > > USB keyboards don't support variable mappings. > > It is planned to have per-keyboard keymaps (keycode->keysym), though no > scancode->keycode maps for USB. Just curious: For what reasons do you plan to introduce per-keyboard keycode->keysym maps, but not scancode->keycode maps? Is it because the keycode->keysym map is the more general case? Will these per-keyboard keymaps go into 2.6, or is this a feature to be implemented later? Thank you, Arndt |
From: Vojtech P. <vo...@su...> - 2002-12-16 09:31:37
|
On Tue, Dec 10, 2002 at 06:59:37PM +0100, Arndt Schoenewald wrote: > On Mon, Dec 09, 2002 at 11:30:39AM +0100, Vojtech Pavlik wrote: > > > > > > 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) > > > USB keyboards don't support variable mappings. > > > > It is planned to have per-keyboard keymaps (keycode->keysym), though no > > scancode->keycode maps for USB. > > Just curious: For what reasons do you plan to introduce per-keyboard > keycode->keysym maps, but not scancode->keycode maps? Scancode->keycode are already per-keyboard for AT keyboards and other keyboards that need them. But for example on USB, there is no scancode->keycode map, because all the information about the keyboard is retrieved from the keyboard's USB descriptor. > Is it because the keycode->keysym map is the more general case? Basically yes. The plan is to have every keyboard supply the same events to the input subsystem. Then to map them using a keymap to what the user wants. Basically, the scancode->keycode map should reflect the hardware layout of the keyboard, and keycode->keysym the preferences of the user (language layout, etc). > Will these per-keyboard keymaps go into 2.6, or is this a feature to > be implemented later? Probably for later. Ask James, these are already beyond my realm of input core. ;) -- Vojtech Pavlik SuSE Labs |
From: James S. <jsi...@in...> - 2002-12-20 19:29:07
|
> > Will these per-keyboard keymaps go into 2.6, or is this a feature to > > be implemented later? > > Probably for later. Ask James, these are already beyond my realm of > input core. ;) It will have to wait until the next developement kernel to go in. The fact we managed to rework all the fbdev drivers to the ruby api and make the console system rely on the input subsystem is amazing. Unfortunely we have alot of drivers to work on. When the core console changes go in in the next developement cycle it will be easy as we will not have to mess with all the input and fbdev drivers next time around. |
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 |