Added "Bitstream Vera Sans Mono" as the default font.
[MacVim/jjgod.git] / MMApplication.m
blob3a9723a477031983476ed7c41dc44fade67b9d4a
1 /* vi:set ts=8 sts=4 sw=4 ft=objc:
2  *
3  * VIM - Vi IMproved            by Bram Moolenaar
4  *                              MacVim GUI port by Bjorn Winckler
5  *
6  * Do ":help uganda"  in Vim to read copying and usage conditions.
7  * Do ":help credits" in Vim to see a list of people who contributed.
8  * See README.txt for an overview of the Vim source code.
9  */
11 #import "MMApplication.h"
16 @implementation MMApplication
18 - (void)sendEvent:(NSEvent *)event
20     NSEventType type = [event type];
21     unsigned flags = [event modifierFlags];
23     // HACK! Intercept 'help' key presses and clear the 'help key flag', else
24     // Cocoa turns the mouse cursor into a question mark and goes into 'context
25     // help mode' (the keyDown: event itself never reaches the text view).  By
26     // clearing the 'help key flag' this event will be treated like a normal
27     // key event.
28     if ((NSKeyDown == type || NSKeyUp == type) && (flags & NSHelpKeyMask)) {
29         flags &= ~NSHelpKeyMask;
30         event = [NSEvent keyEventWithType:[event type]
31                                  location:[event locationInWindow]
32                             modifierFlags:flags
33                                 timestamp:[event timestamp]
34                              windowNumber:[event windowNumber]
35                                   context:[event context]
36                                characters:[event characters]
37               charactersIgnoringModifiers:[event charactersIgnoringModifiers]
38                                 isARepeat:[event isARepeat]
39                                   keyCode:[event keyCode]];
40     }
42     [super sendEvent:event];
45 @end