From 4f211f6d582dca971ec6089a92feff7a3f0f3211 Mon Sep 17 00:00:00 2001 From: Jorge Guzman Date: Fri, 31 Jul 2026 00:17:44 -0300 Subject: [PATCH] nshlib, graphics/microwindows: require the keyboard byte stream Both read a keyboard as a stream of characters: NSH uses a USB HID keyboard for stdin, and the raw mode of the Microwindows keyboard driver decodes the stream with the codec. That stream now comes from INPUT_KEYBOARD_BYTESTREAM rather than from the USB HID driver itself. Say so, so that Kconfig refuses a combination that cannot work instead of letting the application read events and treat them as text. No in-tree configuration selects either option. Signed-off-by: Jorge Guzman --- graphics/microwindows/Kconfig | 2 +- nshlib/Kconfig | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/graphics/microwindows/Kconfig b/graphics/microwindows/Kconfig index 8463d791f..9d5f0cb8c 100644 --- a/graphics/microwindows/Kconfig +++ b/graphics/microwindows/Kconfig @@ -33,7 +33,7 @@ config MICROWINDOWS_KBD_EVENT config MICROWINDOWS_KBD_RAW bool "Raw-mode keyboard driver" - depends on LIBC_KBDCODEC + depends on INPUT_KEYBOARD_BYTESTREAM ---help--- Reads raw byte stream from a character device (e.g., /dev/kbda) and decodes escape sequences via the kbd_codec library. Suitable diff --git a/nshlib/Kconfig b/nshlib/Kconfig index 8f0cd36ee..fbbb08d3b 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -1090,6 +1090,7 @@ config NSH_USBKBD bool "Use USB keyboard input" default n depends on NSH_CONSOLE && USBHOST_HIDKBD && !NSH_USBCONSOLE + depends on INPUT_KEYBOARD_BYTESTREAM ---help--- Normally NSH uses the same device for stdin, stdout, and stderr. By default, that device is /dev/console. If this option is selected, @@ -1098,6 +1099,9 @@ config NSH_USBKBD interface) and the data from the keyboard will drive NSH. NSH output (stdout and stderr) will still go to /dev/console. + NSH reads the keyboard as a stream of characters, which is what + INPUT_KEYBOARD_BYTESTREAM makes a keyboard device deliver. + if NSH_USBKBD config NSH_USBKBD_DEVNAME