ppisa commented on code in PR #19579:
URL: https://github.com/apache/nuttx/pull/19579#discussion_r3683159230


##########
include/nuttx/input/kbd_codec.h:
##########
@@ -166,7 +166,24 @@ enum kbd_keycode_e
   KEYCODE_F21,                 /* Function key 21 */
   KEYCODE_F22,                 /* Function key 22 */
   KEYCODE_F23,                 /* Function key 23 */
-  KEYCODE_F24                  /* Function key 24 */
+  KEYCODE_F24,                 /* Function key 24 */
+
+  /* Modifier keys.  Drivers that are able to track modifier state (a USB
+   * HID keyboard, for example) may report these as key press and key
+   * release events in their own right.  That allows an application to bind
+   * an action to a modifier, or to know that a modifier is being held down,
+   * which cannot be expressed by folding the modifier into the character
+   * that it produces.
+   */
+
+  KEYCODE_LCTRL,               /* Left Ctrl */
+  KEYCODE_RCTRL,               /* Right Ctrl */
+  KEYCODE_LSHIFT,              /* Left Shift */
+  KEYCODE_RSHIFT,              /* Right Shift */
+  KEYCODE_LALT,                /* Left Alt */
+  KEYCODE_RALT,                /* Right Alt */
+  KEYCODE_LGUI,                /* Left GUI (Windows/Command) */
+  KEYCODE_RGUI                 /* Right GUI (Windows/Command) */
 };

Review Comment:
   ACK, this would help Microwindows as well, note to @Acfboy
   
   Then when modifiers are delivered then they can be applied even in 
Microwindows event keyboard alternative handling.
   
   Translation to modifiers keys should be added to 
https://github.com/apache/nuttx/blob/master/drivers/input/virtio_key_decode.c 
which solves this for VirtIO KBD and Goldfish one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to