Hey there Matteo :-)

What I found in current documentation:
* 
https://nuttx.apache.org/docs/latest/components/drivers/character/input/keypad-keyboard.html
* https://nuttx.apache.org/docs/latest/applications/graphics/input/getevent.html
* 
https://nuttx.apache.org/docs/latest/applications/graphics/nxwm/cnxconsole.html

But there is not much explanation to your question. Probably NXWM is
closest approach to X11/Xorg?

Do we need some update, maybe a layer or dedicated module, to match
X11/Xorg/Unix like input processing?

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

On Sun, May 31, 2026 at 2:31 PM Matteo Golin <[email protected]> wrote:
>
> Hello everyone,
>
> While working on porting DOOM to NuttX with keyboard input, I got confused
> by the keyboard codec NuttX uses.
>
> The entire codec is defined using an enum for just "special keys", like
> arrow keys and print-screen, etc. There are no definitions for
> letter/number keys, which leads me to believe that the ASCII code is just
> used for these (which tracks with my experimentation of `/dev/kbd` on sim).
> However, the entire enum itself starts at KEYCODE_NORMAL = 0.
>
> This means that the keyboard codec is in conflict with ASCII characters.
> When I went to extend it and add buttons like CTRL and ALT, I noticed that
> pressing the spacebar no longer worked due to conflict with the keyboard
> codec.
>
> As far as I can tell from the code, the keyboard codec translators I've
> seen don't rely on the enum starting at 0. I would like to change it to
> start at 128, so that it doesn't conflict with any ASCII characters, but I
> don't trust my understanding of the keyboard input system enough to
> guarantee I'm not breaking anything.
>
> Is there anyone more familiar with this part of NuttX who can tell me what
> the rationale for the keyboard codec starting at 0 is, and how it's
> supposed to work/be dealt with from userspace?
>
> Thanks,
> Matteo

Reply via email to