yamt commented on pull request #4881:
URL: https://github.com/apache/incubator-nuttx/pull/4881#issuecomment-989552491


   > > > > it seems a bit awkward to have x11 stuff in libc. is there a 
precedent? (in nuttx or other systems)
   > > > 
   > > > 
   > > > The following item depends on x11 key symbols:
   > > > ```
   > > > 1. VNC server use it to encode the keyboard(mainlined)
   > > > 
   > > > 2. We are adding sim x11 keyboard driver(developing)
   > > > ```
   > > 
   > > 
   > > these use cases seem a bit low level. i'm not sure how wchar_t can be 
used there.
   > 
   > Here is the whole path:
   > 
   >     1. Keyboard driver report the event through x11 encoding
   > 
   >     2. Upper half call 
https://github.com/apache/incubator-nuttx/blob/master/include/nuttx/input/kbd_codec.h
 with x11 definition
   > 
   >     3. kdb convert x11->UTF32(xktowc) and UTF32->UTF8(wcrtomb) and save to 
the stream
   
   i feel it's still confusing to use wchar_t to mean utf32 even if we are 
going to define `__STDC_ISO_10646__`.
   
   how about following precedents like:
   
https://xkbcommon.org/doc/0.2.0/group__keysyms.html#ga5fdd795b5799f131866cb1c5315af81f
   
https://xkbcommon.org/doc/0.2.0/group__keysyms.html#ga198462d79271d614c43040595bbe2364
   
   > 
   > 
   > > > The whole X11 is too bigger to fix into NuttX, I think the current 
intention limit to only reuse X11 keyboard definition.
   > > 
   > > 
   > > to me, it still sounds a bit strange to make libc support the particular 
keyboard type. isn't it something which should be in a driver?
   > 
   > X11 is a keyboard independent definition and use in many system and 
protocol, it's reasonable to let's driver convert and report the key event 
through x11 encoding.
   
   i'm not sure if i agree. but i don't have a better alternative.


-- 
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