IR Keycodes and X
- From: "Nickolay V. Shmyrev" <nshmyrev (at) yandex.ru>
- Date: Fri, 12 May 2006 03:30:22 +0400
Ð ÐÑÐ, 12/05/2006 Ð 09:12 +1000, Malcolm V ÐÐÑÐÑ:
> HI,
> I'm creating a patch for the Winfast DTV2000H, the remote it comes with has
> 49 keys with 48 keycodes (it has two stop buttons). I notice that current
> remotes use a lot of keycodes which return a value above 255 (eg KEY_RADIO,
> which is 0x181 (385)). Whilst this works fine for console apps, my version of
> X doesn't allow keyvalues over 255, so I can't use a simple xmodmap overlay
> to access these keypresses.
>
> So after initially creating the key_code table like so:
> ...,
> [ 55 ] = KEY_RADIO.
> ...,
>
> I am left with a "dead" key in X. Remapping this with:
>
> #define XKEY_RADIO = KEY_F14
> ...,
> [ 55 ] = XKEY_RADIO,
> ...,
>
> gives me an ugly hack which allows the keypress to be xmodmap'd. It also means
> that should X come to understand keypresses above 255, the #define can be
> removed from the code and the X removed from XKEY_RADIO and it will just
> work.
>
> Have I missed something in X which allows me to read keycodes above 255?
>
> My remote is the big brother of the current winfast remote already in the
> code, it has most of the keycodes for that remote plus more. Rather then
> create a new remote definition, it would make sense to just extend the
> current one. However, making the above mentioned changes would mean remapping
> codes for the existing remote for those keys return values above 255, which
> will probably break something for someone. Is that a good idea?
>
> There is so much redirection already involved in the process of going from
> gpio to keypress to X kbd mapping to X scancode, etc that I don't really want
> to involve lirc in the mix, but perhaps that is a mistake, thoughts?
>
> Cheers,
> Malcolm V.
That is very interesting problem, but sadly it's not v4l question. You
need to ask Xorg developers about that.
As I've understood, you just need to define xkb keyboard layout for all
v4l devices, there are some in newer Xorg that are located
at /usr/share/X11/xkb. It would be great if you'll be able to clarify
this question, please let us know, or better, write HOWTO at wiki.
Interesting link is located here:
http://marc.theaimsgroup.com/?l=linux-video&m=113975375907041&w=2
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list