Hello guys,First of all, this is my first post here, so if it doesn't follow any rules - I apologize.I need your help with something, as I can't seem to find anything nor make it work as I would want to.I want to create a selectable menu in the terminal (something like this or this).I also want to make it without any dependencies, only the Node API.I was thinking of using Readline and prompt. Then use keypress event and move the cursor up and down with moveCursor, but if I move upwards - the lines below get deleted.There is also a problem with backspace triggering prompt and being unable to restrict the user from typing while selecting (blocking all characters but the controls, from what I see the data event is triggered while typing).I understand that maybe creating a custom Writeable could be the solution, but still can't make it work, as I haven't dealt with this API before.Any help would be appreciated and if there is an example - even better.Thanks in advance, let me know if anythings unclear - would love to clarify.
Submitted January 17, 2020 at 11:32PM by WuTang-Clan
No comments:
Post a Comment