* ir-keytable: Bug in gen_keytables.pl script
@ 2012-10-07 17:24 Gregor Jasny
2012-10-08 1:24 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 2+ messages in thread
From: Gregor Jasny @ 2012-10-07 17:24 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Linux Media Mailing List
Hello,
I recently received this launchpad bug:
https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1054122
It seems that the mentioned key mappings are missing.
If you check the generated mapping file
http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/utils/keytable/rc_keymaps/imon_pad
and compare it to the driver file
http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/drivers/media/rc/keymaps/rc-imon-pad.c#l111
you'll notice that the parsing stopped at the BTN_xyz table entries:
> { 0x299115b7, KEY_KEYBOARD },
> { 0x299135b7, KEY_KEYBOARD },
processing stopped here
> { 0x01010000, BTN_LEFT },
> { 0x01020000, BTN_RIGHT },
> { 0x01010080, BTN_LEFT },
> { 0x01020080, BTN_RIGHT },
> { 0x688301b7, BTN_LEFT },
> { 0x688481b7, BTN_RIGHT },
>
> { 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
> { 0x2b8395b7, KEY_TIME }, /* Timer */
Mauro, could you please take a look? I guess the BTN_xyz entries should
be also added to the keytable files. Unfortunately my Perl skills are
horrible.
Thanks,
Gregor
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ir-keytable: Bug in gen_keytables.pl script
2012-10-07 17:24 ir-keytable: Bug in gen_keytables.pl script Gregor Jasny
@ 2012-10-08 1:24 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-08 1:24 UTC (permalink / raw)
To: Gregor Jasny; +Cc: Linux Media Mailing List
Em Sun, 07 Oct 2012 19:24:26 +0200
Gregor Jasny <gjasny@googlemail.com> escreveu:
> Hello,
>
> I recently received this launchpad bug:
> https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1054122
> It seems that the mentioned key mappings are missing.
>
> If you check the generated mapping file
>
> http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/utils/keytable/rc_keymaps/imon_pad
>
> and compare it to the driver file
>
> http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/drivers/media/rc/keymaps/rc-imon-pad.c#l111
>
> you'll notice that the parsing stopped at the BTN_xyz table entries:
>
> > { 0x299115b7, KEY_KEYBOARD },
> > { 0x299135b7, KEY_KEYBOARD },
>
> processing stopped here
>
> > { 0x01010000, BTN_LEFT },
> > { 0x01020000, BTN_RIGHT },
> > { 0x01010080, BTN_LEFT },
> > { 0x01020080, BTN_RIGHT },
> > { 0x688301b7, BTN_LEFT },
> > { 0x688481b7, BTN_RIGHT },
> >
> > { 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
> > { 0x2b8395b7, KEY_TIME }, /* Timer */
>
> Mauro, could you please take a look? I guess the BTN_xyz entries should
> be also added to the keytable files. Unfortunately my Perl skills are
> horrible.
Thanks for noticing!
Fixed. The fix for it was quick and simple:
- if (m/(0x[\dA-Fa-f]+)[\s\,]+(KEY_[^\s\,\}]+)/) {
- $out .= "$1 $2\n";
+ if (m/(0x[\dA-Fa-f]+)[\s\,]+(KEY|BTN)(\_[^\s\,\}]+)/) {
+ $out .= "$1 $2$3\n";
Basically, the regex there weren't expecting mouse buttons. Some MCE remotes
have it.
I also updated the keytables, syncing it with the very latest git tree.
Regards,
Mauro
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-08 1:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07 17:24 ir-keytable: Bug in gen_keytables.pl script Gregor Jasny
2012-10-08 1:24 ` Mauro Carvalho Chehab
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).