All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] fixing hidp keycodes
Date: Fri, 22 Apr 2005 13:10:06 +0200	[thread overview]
Message-ID: <1114168206.32265.62.camel@pegasus> (raw)
In-Reply-To: <20050422105609.GA16313@externe.net>

Hi Guylhem,

> Yes I did apply mh patches. I can put a copy of the kernel online if
> you want to see it.
> 
> I'm not sure I understand the "report mode". Pressing on a keyboard
> key after hidd --connect make the key work in applications. It's not
> simply reporting.

a HID device can work in two modes, boot mode and report mode. The boot
mode is a limited mode with a predefined descriptor and thus it needs a
keycode mapping table. In report mode the HID parser decodes the HID
report according to his descriptor and then generates the keycode. In
the latter case the hidp_keycodes[] table is not used, but it is a boot
mode only thing.

> hidp_keycode is declared locally in core.c and never used elsewhere.
> input_report_key seems to send hidp_keycode[keys[i]] to the input
> layer. If I printk this, I only see 0. 
> 
> What I want to do on my strange keyboard is :
> swap tab and capslock
> swap capslock and esc
> 
> So I swapped 15 and 58, then 58 and 1 in the hidp_keycodes, but this
> only gets me multiple esc. However, replacing keycodes 65 and 66 by 0
> which where incorrectly send when pressing on a special keyboard
> modifier key worked, as did swapping keycode 30 and 125 (some library
> has keycode 30=modfier hardcoded in, so I had to do a workaround and
> remap the a key to 125 and change the keyboard map accordingly)
> 
> This suggest that my approach should work. I don't understand why it's
> not working with tab/capslock/esc.

To make this working in report mode, you must replace the HID descriptor
or tell hidd to use the boot mode only. Speaking of which, I just saw
that I never added support for pushing a device into boot mode. However
the --nosdp option should do the trick.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2005-04-22 11:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-22 10:56 [Bluez-devel] fixing hidp keycodes Guylhem Aznar
2005-04-22 11:10 ` Marcel Holtmann [this message]
2005-05-05 20:32   ` Guylhem Aznar
  -- strict thread matches above, loose matches on Subject: below --
2005-04-21 22:03 Guylhem Aznar
2005-04-22 10:16 ` Marcel Holtmann

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=1114168206.32265.62.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.