From 25bf887cede96ca9c523f1b34fe28bc6458bc4d9 Mon Sep 17 00:00:00 2001 From: Chris Willmore Date: Mon, 29 Oct 2007 19:19:18 +0100 Subject: [PATCH] Fix for Leopard Ctl-key bug. In Leopard Ctrl-key events are sent to performKeyEquivalent: instead of keyDown:, so we have to deal with them there as well. --- src/MacVim/MMTextView.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/MacVim/MMTextView.m b/src/MacVim/MMTextView.m index e48bb6659b..2c690e70f5 100644 --- a/src/MacVim/MMTextView.m +++ b/src/MacVim/MMTextView.m @@ -302,6 +302,13 @@ static NSString *MMKeypadEnterString = @"KA"; if ([event keyCode] == 50) return NO; + // HACK! On Leopard Ctrl-key events end up here instead of keyDown:. + if (flags & NSControlKeyMask) { + NSLog(@"pass on control key"); + [self dispatchKeyEvent:event]; + return YES; + } + //NSLog(@"%s%@", _cmd, event); NSString *chars = [event characters];