Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since I went through that effort to analyze the keyboard path, I decided that I should publish this as a Wiki page. If for no other reason so that I won't have to do this analysis again in the future.

Related article:  NxTerm Example.

Players

Let's look at the major players in the keyboard data transfer. This is much more complex than you might initially think:

...

  • NxWidgets/libnxwidgets/src/ccallback.cxx. For normal keyboard input, CCallback::newKeyboardEvent() directs the Keyboard to the widget with focus via the CWidgetControl::newKeyboardEvent() method. But the story is different for the NxConsole window. This case, CCallback::newKeyboardEvent(), calls {{ nxcon_kbdin()}}.
  • nuttx/graphics/nxconsole/nxcon_kbdin.c. nxcon_kbdin() adds the keyboard data to a circular buffer and wakes up any reads on the /dev/nxcon0 input device.

...