]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Pass keyboard events to the terminal front-end.
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 7 Mar 1999 23:20:20 +0000 (23:20 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 7 Mar 1999 23:20:20 +0000 (23:20 +0000)
[originally from svn r75]

mac.c

diff --git a/mac.c b/mac.c
index 19636019a6c403f62afda6a96fdf9b8f35c1a6ec..721e007c26bb25463d5f1e5bc6e7774e43355eb3 100644 (file)
--- a/mac.c
+++ b/mac.c
@@ -1,4 +1,4 @@
-/* $Id: mac.c,v 1.1.2.11 1999/03/03 22:03:54 ben Exp $ */
+/* $Id: mac.c,v 1.1.2.12 1999/03/07 23:20:20 ben Exp $ */
 /*
  * Copyright (c) 1999 Ben Harris
  * All rights reserved.
@@ -44,6 +44,7 @@
 #include <limits.h>
 #include <stdarg.h>
 #include <stdlib.h>            /* putty.h needs size_t */
+#include <stdio.h>             /* for vsprintf */
 
 #define PUTTY_DO_GLOBALS
 
@@ -273,11 +274,19 @@ static int mac_windowtype(WindowPtr window) {
  */
 static void mac_keypress(EventRecord *event) {
     char key;
+    WindowPtr window;
 
     if (event->what == keyDown && (event->modifiers & cmdKey)) {
        mac_adjustmenus();
        mac_menucommand(MenuKey(event->message & charCodeMask));
-    }
+    } else {
+       window = FrontWindow();
+       switch (mac_windowtype(window)) {
+         case wTerminal:
+           mac_keyterm(window, event);
+           break;
+       }
+    }       
 }
 
 static void mac_menucommand(long result) {