JBoolean JXComposeRuleList::HandleKeyPress ( const KeySym keySym, JCharacter* buffer ) { if (keySym == XK_Shift_L || keySym == XK_Shift_R) { return kJTrue; } else if (!itsIsCollectingFlag && IsInitialKeySym(keySym)) { itsIsCollectingFlag = kJTrue; itsInputSeq->RemoveAll(); itsInputSeq->AppendElement(keySym); return kJFalse; } else if (!itsIsCollectingFlag) { return kJTrue; } else { return MatchesRule(keySym, buffer); } }
static bool MatchesRules(udtVMLinearAllocator& allocator, const udtString& name, const udtStringMatchingRule* rules, u32 ruleCount, udtProtocol::Id protocol) { for(u32 i = 0; i < ruleCount; ++i) { if(MatchesRule(allocator, name, rules[i], protocol)) { return true; } } return false; }