]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
OS X: fix handling of Ctrl-Space.
authorSimon Tatham <anakin@pobox.com>
Tue, 1 Sep 2015 18:18:26 +0000 (19:18 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 1 Sep 2015 18:18:26 +0000 (19:18 +0100)
I'd left it out of my simulated Ctrl processing. It should have been
treated as \0, the same as ^2 and ^@.

unix/gtkwin.c

index e75afb755a1f602908da54b45dae1f0325f2ae60..47251ff04aebec489a725424864180515bf28378 100644 (file)
@@ -1102,8 +1102,8 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
             if (output[1] >= '3' && output[1] <= '7') {
                 /* ^3,...,^7 map to 0x1B,...,0x1F */
                 output[1] += '\x1B' - '3';
-            } else if (output[1] == '2') {
-                /* ^2 is ^@, i.e. \0 */
+            } else if (output[1] == '2' || output[1] == ' ') {
+                /* ^2 and ^Space are both ^@, i.e. \0 */
                 output[1] = '\0';
             } else if (output[1] == '8') {
                 /* ^8 is DEL */