Fixes a regression caused by trying to fix the problem of th numeric pad.

This commit is contained in:
zonble 2011-10-17 13:57:38 +08:00
parent a263f5739e
commit 8991ddfa4e
1 changed files with 9 additions and 1 deletions

View File

@ -498,13 +498,21 @@ public:
bool composeReading = false;
// caps lock processing : if caps locked, temporarily disabled bopomofo.
if ([NSEvent modifierFlags] & NSAlphaShiftKeyMask || [NSEvent modifierFlags] & NSNumericPadKeyMask){
if ([NSEvent modifierFlags] & NSAlphaShiftKeyMask){
if ([_composingBuffer length]) [self commitComposition:client];
if ([NSEvent modifierFlags] & NSShiftKeyMask) return NO;
NSString *popedText = [inputText lowercaseString];
[client insertText:popedText replacementRange:NSMakeRange(NSNotFound, NSNotFound)];
return YES;
}
if ([NSEvent modifierFlags] & NSNumericPadKeyMask) {
if (keyCode != 123 && keyCode != 124 && keyCode != 125 && keyCode != 126 && keyCode != 123 && charCode != 32 ) {
if ([_composingBuffer length]) [self commitComposition:client];
NSString *popedText = [inputText lowercaseString];
[client insertText:popedText replacementRange:NSMakeRange(NSNotFound, NSNotFound)];
return YES;
}
}
// see if it's valid BPMF reading
if (_bpmfReadingBuffer->isValidKey((char)charCode)) {