From a6dd7e5ce089ab9ff26b6bd0bbec9d035dfaa080 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 4 Apr 2020 16:35:06 +0200 Subject: [PATCH] fixed get_key save timeout --- bashtop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashtop b/bashtop index 687ca4f..ae08c39 100755 --- a/bashtop +++ b/bashtop @@ -2883,7 +2883,7 @@ get_key() { #? Get one key from standard input and translate key code to readabl if [[ -z $save && -n ${saved_key[0]} ]]; then key="${saved_key[0]}"; unset 'saved_key[0]'; saved_key=("${saved_key[@]}") else - if ! IFS= read -rst ${wait_time:-0.001} -n 1 key >/dev/null 2>&1; then key_out=""; return; fi + if ! IFS= read -rst ${wait_time:-0.0001} -n 1 key >/dev/null 2>&1; then key_out=""; return; fi #* Read 3 more characters if a leading escape character is detected @@ -2922,7 +2922,7 @@ get_key() { #? Get one key from standard input and translate key code to readabl esac fi - read -srd '' -t 0.0001 -n 10000 || true + read -srd '' -t 0.00001 -n 10000 || true if [[ -n $save ]]; then saved_key+=("${key}"); return; fi