From c999c47f4b6aab3d560a84dbac38ef40148ec1a0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Jan 2011 04:05:46 -0200 Subject: [PATCH] gen_keytables.pl: Fix a parsing bug that were generating wrong entries There's a parsing bug that were generating wrong entries, in cases where there were some commented possible values for KEY_ Signed-off-by: Mauro Carvalho Chehab --- utils/keytable/gen_keytables.pl | 2 +- utils/keytable/rc_keymaps/behold | 10 +++++----- utils/keytable/rc_keymaps/behold_columbus | 2 +- utils/keytable/rc_keymaps/dib0700_nec | 2 +- utils/keytable/rc_keymaps/imon_mce | 6 ------ utils/keytable/rc_keymaps/manli | 6 +++--- utils/keytable/rc_keymaps/pinnacle310e | 2 +- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/utils/keytable/gen_keytables.pl b/utils/keytable/gen_keytables.pl index cf47183..644b84c 100755 --- a/utils/keytable/gen_keytables.pl +++ b/utils/keytable/gen_keytables.pl @@ -113,7 +113,7 @@ sub parse_file($) } if ($read) { - if (m/(0x[\dA-Fa-f]+).*(KEY_[^\s\,\}]+)/) { + if (m/(0x[\dA-Fa-f]+)[\s\,]+(KEY_[^\s\,\}]+)/) { $out .= "$1 $2\n"; next; } diff --git a/utils/keytable/rc_keymaps/behold b/utils/keytable/rc_keymaps/behold index 1aeedc4..23d349d 100644 --- a/utils/keytable/rc_keymaps/behold +++ b/utils/keytable/rc_keymaps/behold @@ -1,5 +1,5 @@ # table behold, type: NEC -0x6b861c KEY_RADIO +0x6b861c KEY_TUNER 0x6b8612 KEY_POWER 0x6b8601 KEY_1 0x6b8602 KEY_2 @@ -17,7 +17,7 @@ 0x6b8610 KEY_ZOOM 0x6b860b KEY_CHANNELUP 0x6b8618 KEY_VOLUMEDOWN -0x6b8616 KEY_ENTER +0x6b8616 KEY_OK 0x6b860c KEY_VOLUMEUP 0x6b8615 KEY_CHANNELDOWN 0x6b8611 KEY_MUTE @@ -26,10 +26,10 @@ 0x6b861b KEY_PLAYPAUSE 0x6b861a KEY_STOP 0x6b860e KEY_TEXT -0x6b861f KEY_AUDIO -0x6b861e KEY_SOURCE +0x6b861f KEY_RED +0x6b861e KEY_YELLOW 0x6b861d KEY_SLEEP 0x6b8613 KEY_GREEN -0x6b8619 KEY_SAT +0x6b8619 KEY_BLUE 0x6b8658 KEY_SLOW 0x6b865c KEY_CAMERA diff --git a/utils/keytable/rc_keymaps/behold_columbus b/utils/keytable/rc_keymaps/behold_columbus index 25bcd4b..c8bf92b 100644 --- a/utils/keytable/rc_keymaps/behold_columbus +++ b/utils/keytable/rc_keymaps/behold_columbus @@ -1,7 +1,7 @@ # table behold_columbus, type: UNKNOWN 0x13 KEY_MUTE 0x11 KEY_PROPS -0x1C KEY_RADIO +0x1C KEY_TUNER 0x12 KEY_POWER 0x01 KEY_1 0x02 KEY_2 diff --git a/utils/keytable/rc_keymaps/dib0700_nec b/utils/keytable/rc_keymaps/dib0700_nec index a1daa9c..55cd2cf 100644 --- a/utils/keytable/rc_keymaps/dib0700_nec +++ b/utils/keytable/rc_keymaps/dib0700_nec @@ -65,7 +65,7 @@ 0x451c KEY_L 0x451d KEY_FASTFORWARD 0x451e KEY_STOP -0x451f KEY_TEXT +0x451f KEY_MENU 0x4540 KEY_RECORD 0x4541 KEY_SCREEN 0x4542 KEY_SELECT diff --git a/utils/keytable/rc_keymaps/imon_mce b/utils/keytable/rc_keymaps/imon_mce index 6ba2ee8..a1cc979 100644 --- a/utils/keytable/rc_keymaps/imon_mce +++ b/utils/keytable/rc_keymaps/imon_mce @@ -15,7 +15,6 @@ 0x800ff41f KEY_DOWN 0x800ff420 KEY_LEFT 0x800ff421 KEY_RIGHT -0x800ff40b KEY_NUMERIC_POUND 0x800ff40b KEY_ENTER 0x02000028 KEY_ENTER 0x02000028 KEY_OK @@ -23,7 +22,6 @@ 0x0200002a KEY_EXIT 0x800ff423 KEY_EXIT 0x02000029 KEY_DELETE -0x800ff40a KEY_NUMERIC_STAR 0x800ff40a KEY_DELETE 0x800ff40e KEY_MUTE 0x800ff410 KEY_VOLUMEUP @@ -52,18 +50,14 @@ 0x800ff400 KEY_NUMERIC_0 0x02200025 KEY_NUMERIC_STAR 0x02200020 KEY_NUMERIC_POUND -0x800ff41d KEY_BLUE 0x800ff41d KEY_NUMERIC_STAR -0x800ff41c KEY_PREVIOUS 0x800ff41c KEY_NUMERIC_POUND 0x800ff446 KEY_TV 0x800ff447 KEY_AUDIO 0x800ff448 KEY_PVR 0x800ff449 KEY_CAMERA 0x800ff44a KEY_VIDEO -0x800ff424 KEY_MENU 0x800ff424 KEY_DVD -0x800ff425 KEY_GREEN 0x800ff425 KEY_TUNER 0x800ff450 KEY_RADIO 0x800ff44c KEY_LANGUAGE diff --git a/utils/keytable/rc_keymaps/manli b/utils/keytable/rc_keymaps/manli index 85d3779..ab18554 100644 --- a/utils/keytable/rc_keymaps/manli +++ b/utils/keytable/rc_keymaps/manli @@ -10,18 +10,18 @@ 0x07 KEY_7 0x08 KEY_8 0x09 KEY_9 -0x0a KEY_REWIND? +0x0a KEY_AGAIN 0x00 KEY_0 0x17 KEY_DIGITS 0x14 KEY_MENU 0x10 KEY_INFO 0x0b KEY_UP 0x18 KEY_LEFT -0x16 KEY_ENTER? +0x16 KEY_OK 0x0c KEY_RIGHT 0x15 KEY_DOWN 0x11 KEY_TV -0x0d KEY_STEREO +0x0d KEY_MODE 0x0f KEY_AUDIO 0x1b KEY_VOLUMEUP 0x1a KEY_CHANNELUP diff --git a/utils/keytable/rc_keymaps/pinnacle310e b/utils/keytable/rc_keymaps/pinnacle310e index 55ead8c..b93e05c 100644 --- a/utils/keytable/rc_keymaps/pinnacle310e +++ b/utils/keytable/rc_keymaps/pinnacle310e @@ -23,7 +23,7 @@ 0x4e KEY_LEFT 0x52 KEY_RIGHT 0x51 KEY_DOWN -0x4f KEY_OK +0x4f KEY_ENTER 0x1e KEY_VOLUMEUP 0x0a KEY_VOLUMEDOWN 0x05 KEY_CHANNELUP -- 2.7.4