diff --git a/termemu.cpp b/termemu.cpp index cf0d292..8b9e1ad 100644 --- a/termemu.cpp +++ b/termemu.cpp @@ -184,7 +184,7 @@ int termemu( int host_fd, int src_fd, bool user, int debug_fd, act->act_on_terminal( terminal ); /* print out action for debugging */ - if ( (debug_fd > 0) ) { + if ( (debug_fd > 0) && (!act->handled) ) { char actsum[ 64 ]; snprintf( actsum, 64, "%s ", act->str().c_str() ); swrite( debug_fd, actsum ); diff --git a/terminaluserinput.cpp b/terminaluserinput.cpp index f279989..a858f93 100644 --- a/terminaluserinput.cpp +++ b/terminaluserinput.cpp @@ -21,5 +21,7 @@ std::string UserInput::input( Parser::UserByte *act ) /* This doesn't handle the 8-bit SS3 C1 control, which would be two octets in UTF-8. Fortunately nobody seems to send this. */ + act->handled = true; + return std::string( translated_str ); }