|
|
@ -35,6 +35,7 @@
|
|
|
|
#include "../../network/network.h"
|
|
|
|
#include "../../network/network.h"
|
|
|
|
#include "../../core/random_func.hpp"
|
|
|
|
#include "../../core/random_func.hpp"
|
|
|
|
#include "../../texteff.hpp"
|
|
|
|
#include "../../texteff.hpp"
|
|
|
|
|
|
|
|
#include "../../window_func.h"
|
|
|
|
|
|
|
|
|
|
|
|
#import <sys/time.h> /* gettimeofday */
|
|
|
|
#import <sys/time.h> /* gettimeofday */
|
|
|
|
|
|
|
|
|
|
|
@ -399,7 +400,6 @@ static bool QZ_PollEvent()
|
|
|
|
|
|
|
|
|
|
|
|
NSString *chars;
|
|
|
|
NSString *chars;
|
|
|
|
NSPoint pt;
|
|
|
|
NSPoint pt;
|
|
|
|
NSText *fieldEditor;
|
|
|
|
|
|
|
|
switch ([ event type ]) {
|
|
|
|
switch ([ event type ]) {
|
|
|
|
case NSMouseMoved:
|
|
|
|
case NSMouseMoved:
|
|
|
|
case NSOtherMouseDragged:
|
|
|
|
case NSOtherMouseDragged:
|
|
|
@ -516,17 +516,18 @@ static bool QZ_PollEvent()
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fieldEditor = [[ event window ] fieldEditor:YES forObject:nil ];
|
|
|
|
if (EditBoxInGlobalFocus()) {
|
|
|
|
[ fieldEditor setString:@"" ];
|
|
|
|
[ _cocoa_subdriver->cocoaview interpretKeyEvents:[ NSArray arrayWithObject:event ] ];
|
|
|
|
[ fieldEditor interpretKeyEvents: [ NSArray arrayWithObject:event ] ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chars = [ event characters ];
|
|
|
|
|
|
|
|
if ([ chars length ] == 0) {
|
|
|
|
|
|
|
|
QZ_KeyEvent([ event keyCode ], 0, YES);
|
|
|
|
QZ_KeyEvent([ event keyCode ], 0, YES);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
QZ_KeyEvent([ event keyCode ], [ chars characterAtIndex:0 ], YES);
|
|
|
|
chars = [ event characters ];
|
|
|
|
for (uint i = 1; i < [ chars length ]; i++) {
|
|
|
|
if ([ chars length ] == 0) {
|
|
|
|
QZ_KeyEvent(0, [ chars characterAtIndex:i ], YES);
|
|
|
|
QZ_KeyEvent([ event keyCode ], 0, YES);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
QZ_KeyEvent([ event keyCode ], [ chars characterAtIndex:0 ], YES);
|
|
|
|
|
|
|
|
for (uint i = 1; i < [ chars length ]; i++) {
|
|
|
|
|
|
|
|
QZ_KeyEvent(0, [ chars characterAtIndex:i ], YES);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|