Replies: 2 comments 1 reply
|
Hi @elbrandt Supposing you're on a Linux machine, you can try something like this: I've tested the code and everything works. |
1 reply
|
I've just committed a fix that should enable user keyboard handling on Linux platform as well (commit 17dafd8). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Fantastic library, well written and feature packed. Thanks for your work.
We're using CliLocalTerminalSession with a LoopScheduler. One of the commands we've implemented, we'd like the command to run in a loop 'until the user presses a key' to end the command and return to the menu.
When we implement this in our command's lambda using the
select()function, they way we typically would in a regular command line app, I find that we're in a race condition with a thread running the sameselect()command in an instance of the LinuxKeyboard class. So, I think either we're doing it wrong, or this "run command until key is pressed" use case isn't supported in this library.Is there a relatively pain-free way to do what we want? Can we somehow temporarily pause the scheduler within our command?
I can elaborate more on the use case if this question is unclear.
Thanks again for an excellent library.
-Eric.
All reactions