From 42bf6b2b6aa5da590f30197547303c6f9353b1b9 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 6 Jul 2017 20:57:38 +0200 Subject: [PATCH] improved display of password request --- retroshare-nogui/src/TerminalApiClient.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/retroshare-nogui/src/TerminalApiClient.cpp b/retroshare-nogui/src/TerminalApiClient.cpp index 1e4a6f1c6..7a7762b07 100644 --- a/retroshare-nogui/src/TerminalApiClient.cpp +++ b/retroshare-nogui/src/TerminalApiClient.cpp @@ -159,9 +159,15 @@ void TerminalApiClient::data_tick() enter_was_pressed = false; // send echo if(ask_for_password) + { std::cout << "*"; + std::cout.flush(); + } else + { std::cout << (char) last_char; + std::cout.flush(); + } //std::cout << "you pressed key " << (char) last_char << " as integer: " << last_char << std::endl; } @@ -317,7 +323,10 @@ void TerminalApiClient::data_tick() if(edge && ask_for_password) { - std::cout << "Enter the password for key " << key_name << std::endl; + std::cout << std::endl; + std::cout << std::endl; + std::cout << "Enter the password for key " << key_name << " : " ; + std::cout.flush() ; } if(ask_for_password && enter_was_pressed && !inbuf.empty())