From: Ben Harris Date: Sun, 7 Mar 1999 23:20:20 +0000 (+0000) Subject: Pass keyboard events to the terminal front-end. X-Git-Tag: ben-hacked-terminal~8 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=85ea86e36135003a76d7472f08536752db39627d;p=PuTTY.git Pass keyboard events to the terminal front-end. [originally from svn r75] --- diff --git a/mac.c b/mac.c index 19636019..721e007c 100644 --- 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 #include #include /* putty.h needs size_t */ +#include /* 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) {