* [PATCH v2] hid-input: Map unknown consumer page codes to KEY_UNKNOWN
@ 2014-10-21 21:11 Hans de Goede
2014-10-21 21:55 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2014-10-21 21:11 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, Hans de Goede
Currently unknown consumer page codes are ignored, which means that they
cannot later be mapped from userspace using udev / hwdb. Map them to
KEY_UNKNOWN, so that userspace can remap them for keyboards which
make up their own consumer page codes.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
--
Changes in v2: Use key_map_clear rather then key_map
---
drivers/hid/hid-input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 2619f7f..a6e33d3 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -856,7 +856,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x28b: map_key_clear(KEY_FORWARDMAIL); break;
case 0x28c: map_key_clear(KEY_SEND); break;
- default: goto ignore;
+ default: map_key_clear(KEY_UNKNOWN);
}
break;
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] hid-input: Map unknown consumer page codes to KEY_UNKNOWN
2014-10-21 21:11 [PATCH v2] hid-input: Map unknown consumer page codes to KEY_UNKNOWN Hans de Goede
@ 2014-10-21 21:55 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-10-21 21:55 UTC (permalink / raw)
To: Hans de Goede; +Cc: linux-input
On Tue, Oct 21, 2014 at 11:11:00PM +0200, Hans de Goede wrote:
> Currently unknown consumer page codes are ignored, which means that they
> cannot later be mapped from userspace using udev / hwdb. Map them to
> KEY_UNKNOWN, so that userspace can remap them for keyboards which
> make up their own consumer page codes.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
I think this makes sense. Thanks Hans.
>
> --
> Changes in v2: Use key_map_clear rather then key_map
> ---
> drivers/hid/hid-input.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 2619f7f..a6e33d3 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -856,7 +856,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> case 0x28b: map_key_clear(KEY_FORWARDMAIL); break;
> case 0x28c: map_key_clear(KEY_SEND); break;
>
> - default: goto ignore;
> + default: map_key_clear(KEY_UNKNOWN);
> }
> break;
>
> --
> 2.1.0
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-21 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21 21:11 [PATCH v2] hid-input: Map unknown consumer page codes to KEY_UNKNOWN Hans de Goede
2014-10-21 21:55 ` Dmitry Torokhov
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).