diff mbox series

[v2] HID: Add mapping for KEY_ALL_APPLICATIONS

Message ID 20220218233350.1.I3a7746ad05d270161a18334ae06e3b6db1a1d339@changeid (mailing list archive)
State Superseded
Headers show
Series [v2] HID: Add mapping for KEY_ALL_APPLICATIONS | expand

Commit Message

William Mahon Feb. 18, 2022, 11:35 p.m. UTC
This patch adds a new key definition for KEY_ALL_APPLICATIONS
which is an alias of KEY_DASHBOARD.

It also maps the 0x0c/0x2a2 usage code to KEY_ALL_APPLICATIONS.

Signed-off-by: William Mahon <wmahon@google.com>
---

 drivers/hid/hid-input.c                | 2 ++
 include/uapi/linux/input-event-codes.h | 1 +
 2 files changed, 3 insertions(+)

Comments

Dmitry Torokhov March 1, 2022, 7:28 a.m. UTC | #1
On Fri, Feb 18, 2022 at 11:35:49PM +0000, William Mahon wrote:
> This patch adds a new key definition for KEY_ALL_APPLICATIONS
> which is an alias of KEY_DASHBOARD.
> 
> It also maps the 0x0c/0x2a2 usage code to KEY_ALL_APPLICATIONS.

Jiri, Benjamin, OK for me to pick it up?

> 
> Signed-off-by: William Mahon <wmahon@google.com>
> ---
> 
>  drivers/hid/hid-input.c                | 2 ++
>  include/uapi/linux/input-event-codes.h | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index eccd89b5ea9f..c3e303c1d8d1 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1162,6 +1162,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>  
>  		case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT);	break;
>  
> +		case 0x2a2: map_key_clear(KEY_ALL_APPLICATIONS);	break;
> +
>  		case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV);		break;
>  		case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT);		break;
>  		case 0x2c9: map_key_clear(KEY_KBDINPUTASSIST_PREVGROUP);		break;
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 311a57f3e01a..e520f22c1b8d 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -279,6 +279,7 @@
>  #define KEY_PROG3		202
>  #define KEY_PROG4		203
>  #define KEY_DASHBOARD		204	/* AL Dashboard */
> +#define KEY_ALL_APPLICATIONS KEY_DASHBOARD
>  #define KEY_SUSPEND		205
>  #define KEY_CLOSE		206	/* AC Close */
>  #define KEY_PLAY		207
> -- 
> 2.35.1.473.g83b2b277ed-goog
>
Benjamin Tissoires March 1, 2022, 10:24 a.m. UTC | #2
On Tue, Mar 1, 2022 at 8:28 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Fri, Feb 18, 2022 at 11:35:49PM +0000, William Mahon wrote:
> > This patch adds a new key definition for KEY_ALL_APPLICATIONS
> > which is an alias of KEY_DASHBOARD.
> >
> > It also maps the 0x0c/0x2a2 usage code to KEY_ALL_APPLICATIONS.
>
> Jiri, Benjamin, OK for me to pick it up?

Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>
> >
> > Signed-off-by: William Mahon <wmahon@google.com>
> > ---
> >
> >  drivers/hid/hid-input.c                | 2 ++
> >  include/uapi/linux/input-event-codes.h | 1 +
> >  2 files changed, 3 insertions(+)
> >
> > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> > index eccd89b5ea9f..c3e303c1d8d1 100644
> > --- a/drivers/hid/hid-input.c
> > +++ b/drivers/hid/hid-input.c
> > @@ -1162,6 +1162,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> >
> >               case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT); break;
> >
> > +             case 0x2a2: map_key_clear(KEY_ALL_APPLICATIONS);        break;
> > +
> >               case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV);             break;
> >               case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT);             break;
> >               case 0x2c9: map_key_clear(KEY_KBDINPUTASSIST_PREVGROUP);                break;
> > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> > index 311a57f3e01a..e520f22c1b8d 100644
> > --- a/include/uapi/linux/input-event-codes.h
> > +++ b/include/uapi/linux/input-event-codes.h
> > @@ -279,6 +279,7 @@
> >  #define KEY_PROG3            202
> >  #define KEY_PROG4            203
> >  #define KEY_DASHBOARD                204     /* AL Dashboard */
> > +#define KEY_ALL_APPLICATIONS KEY_DASHBOARD
> >  #define KEY_SUSPEND          205
> >  #define KEY_CLOSE            206     /* AC Close */
> >  #define KEY_PLAY             207
> > --
> > 2.35.1.473.g83b2b277ed-goog
> >
>
> --
> Dmitry
>
Dmitry Torokhov March 2, 2022, 10:05 p.m. UTC | #3
On Fri, Feb 18, 2022 at 11:35:49PM +0000, William Mahon wrote:
> This patch adds a new key definition for KEY_ALL_APPLICATIONS
> which is an alias of KEY_DASHBOARD.
> 
> It also maps the 0x0c/0x2a2 usage code to KEY_ALL_APPLICATIONS.
> 
> Signed-off-by: William Mahon <wmahon@google.com>
> ---
> 
>  drivers/hid/hid-input.c                | 2 ++
>  include/uapi/linux/input-event-codes.h | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index eccd89b5ea9f..c3e303c1d8d1 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1162,6 +1162,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>  
>  		case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT);	break;
>  
> +		case 0x2a2: map_key_clear(KEY_ALL_APPLICATIONS);	break;
> +
>  		case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV);		break;
>  		case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT);		break;
>  		case 0x2c9: map_key_clear(KEY_KBDINPUTASSIST_PREVGROUP);		break;
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 311a57f3e01a..e520f22c1b8d 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -279,6 +279,7 @@
>  #define KEY_PROG3		202
>  #define KEY_PROG4		203
>  #define KEY_DASHBOARD		204	/* AL Dashboard */
> +#define KEY_ALL_APPLICATIONS KEY_DASHBOARD

Could you please make KEY_ALL_APPLICATIONS primary definition and
KEY_DASHBOARD an alias and update hid-debug?

>  #define KEY_SUSPEND		205
>  #define KEY_CLOSE		206	/* AC Close */
>  #define KEY_PLAY		207
> -- 
> 2.35.1.473.g83b2b277ed-goog
> 

Thanks.
diff mbox series

Patch

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index eccd89b5ea9f..c3e303c1d8d1 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1162,6 +1162,8 @@  static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 
 		case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT);	break;
 
+		case 0x2a2: map_key_clear(KEY_ALL_APPLICATIONS);	break;
+
 		case 0x2c7: map_key_clear(KEY_KBDINPUTASSIST_PREV);		break;
 		case 0x2c8: map_key_clear(KEY_KBDINPUTASSIST_NEXT);		break;
 		case 0x2c9: map_key_clear(KEY_KBDINPUTASSIST_PREVGROUP);		break;
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 311a57f3e01a..e520f22c1b8d 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -279,6 +279,7 @@ 
 #define KEY_PROG3		202
 #define KEY_PROG4		203
 #define KEY_DASHBOARD		204	/* AL Dashboard */
+#define KEY_ALL_APPLICATIONS KEY_DASHBOARD
 #define KEY_SUSPEND		205
 #define KEY_CLOSE		206	/* AC Close */
 #define KEY_PLAY		207