diff --git a/terminal.cpp b/terminal.cpp index 5ea2b93..8953f9f 100644 --- a/terminal.cpp +++ b/terminal.cpp @@ -108,7 +108,16 @@ void Emulator::CSI_dispatch( Parser::CSI_Dispatch *act ) void Emulator::Esc_dispatch( Parser::Esc_Dispatch *act ) { - dispatch.dispatch( ESCAPE, act, &fb ); + /* handle 7-bit ESC-encoding of C1 control characters */ + if ( (dispatch.get_dispatch_chars().size() == 0) + && (0x40 <= act->ch) + && (act->ch <= 0x5F) ) { + act->ch += 0x40; + dispatch.dispatch( CONTROL, act, &fb ); + act->ch -= 0x40; + } else { + dispatch.dispatch( ESCAPE, act, &fb ); + } } void Emulator::debug_printout( int fd ) diff --git a/terminalfunctions.cpp b/terminalfunctions.cpp index 7f387fb..a7abec9 100644 --- a/terminalfunctions.cpp +++ b/terminalfunctions.cpp @@ -111,6 +111,7 @@ void Ctrl_LF( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) ) } static Function func_Ctrl_LF( CONTROL, "\x0a", Ctrl_LF ); +static Function func_Ctrl_IND( CONTROL, "\x84", Ctrl_LF ); void Ctrl_CR( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) ) { @@ -125,3 +126,4 @@ void Ctrl_BS( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) ) } static Function func_Ctrl_BS( CONTROL, "\x08", Ctrl_BS ); +