Skip to contentSkip to conversation

PS/2 port on USB Keyboard

DISCUSSION Emmanuele Bassi 2 participants 2 messages Dec 5, 2001

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I have an USB Keyboard from BTC[1], with an onboard PS/2 mouse port. When I use one of the mouse' buttons, the kernel complaints (with a .warn):

keyboard.c: can't emulate rawmode for keycode 27[2-4]

The keycode depends on which mouse button I press (272 for the left, 273 for the right and 274 for the middle one). While I'm using the mouse under X11, this warning goes straight into the logs, but while I'm under the console, this warning scramble up everything. A possible workaround is to disable every kernel.warn directed (via syslog) to the console, but, for obvious reasons, I'd like to keep this as a "last resort" option.

While looking inside the source code for the Keyboard HID driver, I've noticed that only the Mac driver enables mouse button emulation. Since I'm no kernel hacker, my question is: could someone work on a possible patch?

TIA & best regards,
Emmanuele.

+++

wolverine:~# cat /proc/bus/usb/devices
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=217/900 us (24%), #Int=  2, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI-alt Root Hub
S:  SerialNumber=6400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046e ProdID=6782 Rev=21.10
S:  Manufacturer=BTC
S:  Product=USB Keyboard and Mouse
wolverine:~# usbmodules --device /proc/bus/usb/001/002
hid
Signature · 2 lines
Emmanuele Bassi (Zefram)               [ http://digilander.iol.it/ebassi ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4
#1 lore raw
Quoted 16 lines · Emmanuele Bassi

Hi everyone,

I have an USB Keyboard from BTC[1], with an onboard PS/2 mouse port. When I use one of the mouse' buttons, the kernel complaints (with a .warn):

keyboard.c: can't emulate rawmode for keycode 27[2-4]

The keycode depends on which mouse button I press (272 for the left, 273 for the right and 274 for the middle one). While I'm using the mouse under X11, this warning goes straight into the logs, but while I'm under the console, this warning scramble up everything. A possible workaround is to disable every kernel.warn directed (via syslog) to the console, but, for obvious reasons, I'd like to keep this as a "last resort" option.

Quoted 4 lines

While looking inside the source code for the Keyboard HID driver, I've noticed that only the Mac driver enables mouse button emulation. Since I'm no kernel hacker, my question is: could someone work on a possible patch?

Comment the message out in drivers/input/keybdev.c ...

Quoted 29 lines

TIA & best regards,
Emmanuele.

+++

wolverine:~# cat /proc/bus/usb/devices
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=217/900 us (24%), #Int=  2, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI-alt Root Hub
S:  SerialNumber=6400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046e ProdID=6782 Rev=21.10
S:  Manufacturer=BTC
S:  Product=USB Keyboard and Mouse
wolverine:~# usbmodules --device /proc/bus/usb/001/002
hid
Signature · 2 lines
Emmanuele Bassi (Zefram)               [ http://digilander.iol.it/ebassi ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4
Signature · 2 lines
Vojtech Pavlik
SuSE Labs