Replies: 4 comments
-
In few words, do you need display on Terminal what is received from serial port? Is this like when you set "USBSerial" in AnsiTerminal application? |
Beta Was this translation helpful? Give feedback.
-
Well, not really. Maybe I shouldn't mix in Terminal at all, let me explain. What I'm looking for is to interact with UI components (and with PC emulator for the same reasons) using input methods other than PS2 devices, since they really hard to come by these days. Obvious candidate is serial console attached to ESP device, in other words my normal USB keyboard connected via laptop to ESP. In that case I would like to have some virtual PS2 device that would read Serial and translate it to UI components as keypress events. Since Terminal already has capability to bridge PS2 device with Serial, i thought it would be natural to use it to connect Serial to virtual PS2 device same way. But really it doesn't has to. Another good example are physical buttons attached to ESP pins. Would be nice to bind physical buttons events to keypress events sent to UI as PS2 commands. |
Beta Was this translation helpful? Give feedback.
-
I have to convert to discussion, because it is not strictly an issue. |
Beta Was this translation helpful? Give feedback.
-
Agree, it is not an issue, rather an idea of improvement. I'd say this emulated approach would never replace real device fully, but if it would support simple UI navigation (arrows, space, enter, etc) and basic inputs (alphanumerics) ... well, would be quite usable I'd say. Also returning back to support of physical buttons on ESP pins - I think it will extend use cases for UI library dramatically, since you'd be able to use it in front panel kind of devices with simple controls: arrow buttons, enter and esc keys, etc. |
Beta Was this translation helpful? Give feedback.
-
If I understood right, currently
Terminal
is able to capture keys from connected PS2 keyboard and send it away toSerial
when it is attached to one viaTerminal.connectSerialPort(Serial)
. This is happening in asynchronously inTerminal::keyboardReaderTask()
routine.In my case I don't have PS2 keyboard, but instead i want to use connected Serial to send keystrokes to UI. So when
Terminal.pollSerialPort()
key is captured and propagated toTerminal::write()
it should check ifm_keyboard
is present and push a key event viam_keyboard->injectVirtualKey()
.If implemented it would be possible to run UI library with full keyboard support without PS2 port, using Serial to PC connection only.
Beta Was this translation helpful? Give feedback.
All reactions