linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Langdale <philipl@mail.utexas.edu>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: bluez-devel@lists.sourceforge.net
Subject: Re: Observations from mx-5000 bluetooth keyboard + mouse combo
Date: Tue, 20 Jun 2006 19:17:57 -0700	[thread overview]
Message-ID: <4498AC55.2020700@mail.utexas.edu> (raw)
In-Reply-To: <1150540883.17539.38.camel@aeonflux.holtmann.net>

Marcel Holtmann wrote:
 >> 4) In HID report mode, the HWHEEL is mangled at some point. Instead of
>>    reporting a usage of 0x10036, it reports 0xC0238, causing it to be
>>    marked as an unknown button. I put a hack into hidp's hid.c to catch
>>    this case and rewrite the usage. The rest of the characteristics seem
>>    to be correct and the horizontal scrolling works correctly.
>>
>>    I don't know if the mouse is just reporting the wrong value or if the
>>    usage is getting mangled somewhere in the stack.
> 
> If you think the HID report descriptor is wrong, then I prefer to fix it
> instead of adding workarounds to kernel code. We did the same for the
> EPoX presenter. Please check if a modified HID report descriptor can
> solve your problem.

Heh. I looked at the USB HID code and they handle Consumer 0x238 by
mapping it to HWHEEL. So this is more common than just this mouse.

So, that's one argument in favour of resync'ing.

>> 5) The keyboard also sees modified usages, but this is definitely in the
>>    hidp driver:
>>
>>    This step is in hidinput_configure_usage:
>>
>>    while (usage->code <= max && test_and_set_bit(usage->code, bit)) {
>>        usage->code = find_next_zero_bit(bit, max + 1, usage->code);
>>    }
>>
>>    eg: It mangles KEY_UNDO (131) into KEY_SENDFILE (145) which doesn't
>>    seem very useful.
>>
>>    It's not the end of the world if the desktop environment/application
>>    supports configurable keybindings, but it's still not correct.
> 
> Can't tell you the reason for it. Maybe it is a bug or maybe this has
> been done on purpose. Please check with the USB HID driver.

This sequence is the same in the usb hid driver. It's also worth
pointing out that it does useful stuff for other types of events, but
for these consumer keys, it does that mangling. Maybe resync'ing will
fix it by another change in some other part of the code.

>> 6) The keyboard has HID consumer reports that hidp doesn't know about.
>>    So, I added entries for them in hidinput_configure_usage and now they
>>    work fine.
> 
> Please check with the USB HID driver from latest vanilla kernel. Maybe
> we need to sync these two drivers again.

Some of the new codes are now covered, but others are not. I guess I
should talk to the USB HID maintainer about that.

Thanks,

--phil

      parent reply	other threads:[~2006-06-21  2:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 15:31 Observations from mx-5000 bluetooth keyboard + mouse combo Philip Langdale
2006-06-17 10:41 ` [Bluez-devel] " Marcel Holtmann
2006-06-21  2:10   ` Philip Langdale
2006-06-21  7:15     ` [Bluez-devel] " Marcel Holtmann
2006-06-21 14:49       ` Philip Langdale
2006-06-21 17:56         ` [Bluez-devel] Observations from mx-5000 bluetooth keyboard +mouse combo douglas ward
2006-06-21  2:17   ` Philip Langdale [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4498AC55.2020700@mail.utexas.edu \
    --to=philipl@mail.utexas.edu \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).