2004-06-20 12:53:48

by Vesa Halttunen

[permalink] [raw]
Subject: [Bluez-devel] Logitech Cordless Desktop Bluetooth (MX900 + Elite keyboard), bthid and a patch

Hi,

I have a Logitech Cordless Desktop Bluetooth (an MX900 mouse and an
Elite keyboard). I've been using them in HCI mode by using hid2hci, hcid
and bthid. This setup has been working somewhat OK but I had a
problem: if I typed specific character sequences very rapidly - the
word "sources", for example, some characters got repeated and so that
"sources" came out as "sourceces". The behaviour was consistent.

Today I took a look at what is causing the problem. By debugging
parser.c I found out that when I type "ces" rapidly the device reports
input events for "c down", "ce down", then 6 times "key 1 down", then
"ce down", then "ces down"... Because the "key 1 down" event got mapped
into "no keys down" it caused the repetition of "ce".

I have no idea what the "key 1 down" event is supposed to be but I wrote
a small hack to get the problem fixed. What I'm doing is use -1 as a
special value for keys_down so that if keys_down == -1 the input event
will be ignored. If a "key 1 down" event is received I ignore the event
by using keys_down = 1.

I don't know if this solution makes any sense with any other keyboard
than this but it seems to work for me - no more duplicate characters.
If anyone knows what the strange "key 1 down" event is and knows a
better way to fix this I'm happy to hear about it. However, a patch
that works for me is attached to this message.

Regards,

-Vesa
--
? Vesa Halttunen - http://www.jormas.com/~vesuri/ ?


Attachments:
bluez-utils2-hid-parser.c-vesuri-patch.diff (1.44 kB)

2004-06-20 13:52:48

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Logitech Cordless Desktop Bluetooth (MX900 + Elite keyboard), bthid and a patch

Hi Vesa,

> I have a Logitech Cordless Desktop Bluetooth (an MX900 mouse and an
> Elite keyboard). I've been using them in HCI mode by using hid2hci, hcid
> and bthid. This setup has been working somewhat OK but I had a
> problem: if I typed specific character sequences very rapidly - the
> word "sources", for example, some characters got repeated and so that
> "sources" came out as "sourceces". The behaviour was consistent.

may you wanna try the hidd from bluez-utils-2.7 and the hidp kernel
module from the -mh patches.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel