diff --git a/protocols/ssh/include/terminal_handlers.h b/protocols/ssh/include/terminal_handlers.h index 0a5a1e87..ec796085 100644 --- a/protocols/ssh/include/terminal_handlers.h +++ b/protocols/ssh/include/terminal_handlers.h @@ -45,6 +45,7 @@ int guac_terminal_escape(guac_terminal* term, char c); int guac_terminal_charset(guac_terminal* term, char c); int guac_terminal_csi(guac_terminal* term, char c); int guac_terminal_osc(guac_terminal* term, char c); +int guac_terminal_ctrl_func(guac_terminal* term, char c); #endif diff --git a/protocols/ssh/src/terminal_handlers.c b/protocols/ssh/src/terminal_handlers.c index d626b696..686fc975 100644 --- a/protocols/ssh/src/terminal_handlers.c +++ b/protocols/ssh/src/terminal_handlers.c @@ -184,6 +184,10 @@ int guac_terminal_escape(guac_terminal* term, char c) { term->char_handler = guac_terminal_csi; break; + case '#': + term->char_handler = guac_terminal_ctrl_func; + break; + /* Save Cursor (DECSC) */ case '7': term->saved_cursor_row = term->cursor_row; @@ -672,3 +676,30 @@ int guac_terminal_osc(guac_terminal* term, char c) { return 0; } +int guac_terminal_ctrl_func(guac_terminal* term, char c) { + + int row; + + /* Build character with current attributes */ + guac_terminal_char guac_char; + guac_char.value = 'E'; + guac_char.attributes = term->current_attributes; + + switch (c) { + + /* Alignment test (fill screen with E's) */ + case '8': + + for (row=0; rowterm_height; row++) + guac_terminal_set_columns(term, row, 0, term->term_width-1, &guac_char); + + break; + + } + + term->char_handler = guac_terminal_echo; + + return 0; + +} +