From 08cfde7678abc4cdece165699d8c4d9c8c51a248 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 23 Aug 2015 16:10:51 -0700 Subject: [PATCH] GUAC-1296: Stub Pause / Break / Ctrl+0 key handling within telnet client. --- src/protocols/telnet/guac_handlers.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/protocols/telnet/guac_handlers.c b/src/protocols/telnet/guac_handlers.c index e50c58d7..f8b57165 100644 --- a/src/protocols/telnet/guac_handlers.c +++ b/src/protocols/telnet/guac_handlers.c @@ -84,6 +84,19 @@ int guac_telnet_client_key_handler(guac_client* client, int keysym, int pressed) } + /* Intercept and handle Pause / Break / Ctrl+0 as "IAC BRK" */ + if (pressed && ( + keysym == 0xFF13 /* Pause */ + || keysym == 0xFF6B /* Break */ + || (term->mod_ctrl && keysym == '0') /* Ctrl + 0 */ + )) { + + /* Send IAC BRK */ + guac_client_log(client, GUAC_LOG_DEBUG, "STUB"); + + return 0; + } + /* Send key */ guac_terminal_send_key(term, keysym, pressed);