ppisa commented on PR #3624:
URL: https://github.com/apache/nuttx-apps/pull/3624#issuecomment-5064554202

   > Hi @ppisa I don't know the right approach to keyboard input keys symbols. 
Actually @linguini1 faced similar issue when porting Doom to NuttX. 
Unfortunately NuttX doesn't have a standard keyboard symbols
   
   @linguini1 and @acassis, I propose simple fix 
[include/nuttx/input/kbd_codec.h](https://github.com/apache/nuttx/blob/master/include/nuttx/input/kbd_codec.h#L44)
   
   ```diff
   -  KEYCODE_FWDDEL,
   +  KEYCODE_FWDDEL = 128,     
   ```
   
   Or even larger shift to something like 0xF800 as used on Microwindows.
   
   This would solve problem with overlap of letters and other ASCII codes with 
special keys.
   
   I can open issue for this. The question is if there is something, some other 
keyboard driver or application, which breaks by this shift of `KEYCODE_xxx`. It 
would be problem if somebody uses the codes as index into some array etc... 128 
or 129 shift is not so big so it less expensive if somebody uses arrays for 
some key code transformation.
   
   I think that that this is reasonable solution for NuttX and current model.
   


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