IR Keycodes and X
- From: Malcolm V <farkit (at) iinet.net.au>
- Date: Fri, 12 May 2006 09:12:58 +1000
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.
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list