marlof / ScORCH

DevOps Orchestration for Obrar deploy and Ansible playbooks
http://www.autoscorch.com
Apache License 2.0
5 stars 1 forks source link

Flush the keyboard buffer between screen refreshes #123

Closed marlof closed 5 years ago

marlof commented 5 years ago

Is your feature request related to a problem? Please describe. Sometimes between screen refreshes, the keyboard buffer maybe active but not shown

Describe the solution you'd like Clear the keyboard buffer

Example of how to do it it to discard input within 1 second of refresh read -e t1

marlof commented 5 years ago

Try a read -t -n 265 discard or while read -r -t 0 ; do read -r; done

marlof commented 5 years ago

Test with Run scorch Press 1 (not not press enter) wait for a screen refresh Press Result should be another refresh Failed if foes to process context menu for first job.

marlof commented 5 years ago

read -t 0 -n 256 discard FAILED

marlof commented 5 years ago

Clear buffer doesnt seem to work in several ways of testing.