I have run into another issue with yottadb IO, when ESCAPE option is enabled.
In the GUI world, when navigating menus of an application, typically UP/Down/Left/Right will move the selection around, ENTER will cause an action of the selected item, and ESCAPE will cause the menu to close.
In YottaDB, enabling escape processing, e.g. USE $P:ESCAPE, will cause yottadb to read the entire escape sequence and return it to the user in $ZB. This is a very nice feature. The only problem is that if the user types just ESCAPE, then any IO read hangs until some additional input is provided to satisfy the escape-sequence reader. And then the user's intended ESC is lost.
This is a problem because to provide the same interface in menus found in GUIs, as described above, the user should be able to enter both arrow keys, which are communicated from the terminal program to yottadb io as escape sequences, AND also to be able to enter an isolated ESC key.
As I have been poking around the IO code in yottadb, I have discovered why yottadb hangs after an isolated ESC, and i think I have a relatively straightforward fix. The code that reads the expected full escape sequence does not have any timeout ability built in. It should be fairly easy to add this. If the terminal sends an escape sequence (say, for transmitting an UP key), then there shouldn't be any delay between the starting ESC and the rest of the sequence. Thus if one just adds a timeout, then problem solved.
Can anyone see any problems with this approach? I.e. any unintended consequences on other programs?
Kevin