s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266
https://valencia.lbsfilm.at/midterm-presentation/
Other
919 stars 173 forks source link

TextInput and input of not printable characters #297

Open aiotech-pub opened 7 months ago

aiotech-pub commented 7 months ago

Describe the bug

  1. It is not possible to digit an escape sequence on a Text Input to insert a non printable character using an escape sequence (es. "\a")
  2. Also if I load a Text Input by code I have some problems if the character array contains some escape sequences (as \a \e \v).

I need to input a sequence of chars used as termination chars in a message to send, the most common sequence is "\x11\x13\x14\n" and I would like to input them in a Text Input control

This is what I want to have in my code (but does not work): strcpy(nodeCOM.eomString, "\x11\x13\x14\n"); // \a \e \v _serialEomStringId = ESPUI.addControl(ControlType::Text, "Serial EOM string", nodeCOM.eomString, color, serialTab, serialEomStringCB); and this is a qorking example: strcpy(nodeCOM.eomString, "\b\t\f\r\n"); // \a \e \v _serialEomStringId = ESPUI.addControl(ControlType::Text, "Serial EOM string", nodeCOM.eomString, color, serialTab, serialEomStringCB);