Skip to contentSkip to conversation

Input: add KEY_KBD_LAYOUT_NEXT

PATCH In review Dmitry Torokhov 2 participants 4 messages Apr 25, 2019 – Apr 26, 2019

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/2 Input: add KEY_KBD_LAYOUT_NEXT

The HID usage tables define a key to cycle through a set of keyboard layouts, let's add corresponding keycode.

---
 include/uapi/linux/input-event-codes.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/input-event-codes.h +1 -0
index 64cee116928e..85387c76c24f 100644
@@ -606,6 +606,7 @@
 #define KEY_SCREENSAVER		0x245	/* AL Screen Saver */
 #define KEY_VOICECOMMAND		0x246	/* Listening Voice Command */
 #define KEY_ASSISTANT		0x247	/* AL Context-aware desktop assistant */
+#define KEY_KBD_LAYOUT_NEXT	0x248	/* AC Next Keyboard Layout Select */
 
 #define KEY_BRIGHTNESS_MIN		0x250	/* Set Brightness to Minimum */
 #define KEY_BRIGHTNESS_MAX		0x251	/* Set Brightness to Maximum */
Signature · 1 line
2.21.0.593.g511ec345e18-goog
author maintainer
#1 lore raw

PATCH 2/2 HID: input: add mapping for KEY_KBD_LAYOUT_NEXT

HUTRR56 defined a new usage code on consumer page to cycle through set of keyboard layouts, let's add this mapping.

---
 drivers/hid/hid-input.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hid/hid-input.c +2 -0
index b607286a0bc8..0579b8d3f912 100644
@@ -1051,6 +1051,8 @@ 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;
 
+		case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT);	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;
Signature · 1 line
2.21.0.593.g511ec345e18-goog
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] HID: input: add mapping for KEY_KBD_LAYOUT_NEXT

Quoted 6 lines · Dmitry Torokhov

HUTRR56 defined a new usage code on consumer page to cycle through set of keyboard layouts, let's add this mapping.

---

I don't think this will collide with the HID tree, so IMO, you can take this through yours if you want.

Cheers,
Benjamin

Quoted 19 lines
 drivers/hid/hid-input.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hid/hid-input.c +2 -1
index b607286a0bc8..0579b8d3f912 100644
@@ -1051,6 +1051,8 @@ 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;
 
+               case 0x29d: map_key_clear(KEY_KBD_LAYOUT_NEXT); 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;
--

2.21.0.593.g511ec345e18-goog

author maintainer
#3 lore raw

Re: [PATCH 2/2] HID: input: add mapping for KEY_KBD_LAYOUT_NEXT

Quoted 6 lines · Benjamin Tissoires
Quoted 4 lines · Dmitry Torokhov

HUTRR56 defined a new usage code on consumer page to cycle through set of keyboard layouts, let's add this mapping.

Quoted 7 lines
Quoted 2 lines

---

I don't think this will collide with the HID tree, so IMO, you can take this through yours if you want.

OK, I will do that, thanks!

Signature · 1 line
Dmitry