up to the server. Currently only Telnet, SSH, and serial connections
have special commands.
+The \q{break} signal can also be invoked from the keyboard with
+\i{Ctrl-Break}.
+
The following \I{Telnet special commands}special commands are
available in Telnet:
end = 2;
}
- /* Control-Break is the same as Control-C */
+ /* Control-Break sends a Break special to the backend */
if (event->keyval == GDK_Break &&
(event->state & GDK_CONTROL_MASK)) {
- output[1] = '\003';
- use_ucsoutput = FALSE;
- end = 2;
- special = TRUE;
+ if (inst->back)
+ inst->back->special(inst->backhandle, TS_BRK);
+ return TRUE;
}
/* We handle Return ourselves, because it needs to be flagged as
/*
* Translate a WM_(SYS)?KEY(UP|DOWN) message into a string of ASCII
- * codes. Returns number of bytes used or zero to drop the message
- * or -1 to forward the message to windows.
+ * codes. Returns number of bytes used, zero to drop the message,
+ * -1 to forward the message to Windows, or another negative number
+ * to indicate a NUL-terminated "special" string.
*/
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
unsigned char *output)
return p - output;
}
if (wParam == VK_CANCEL && shift_state == 2) { /* Ctrl-Break */
- *p++ = 3;
- *p++ = 0;
- return -2;
+ if (back)
+ back->special(backhandle, TS_BRK);
+ return 0;
}
if (wParam == VK_PAUSE) { /* Break/Pause */
*p++ = 26;