equal
deleted
inserted
replaced
133 TBool found = EFalse; |
133 TBool found = EFalse; |
134 |
134 |
135 if (aField->IsInput() && aField->IsData() && |
135 if (aField->IsInput() && aField->IsData() && |
136 (aField->UsagePage() == EUsagePageButton)) |
136 (aField->UsagePage() == EUsagePageButton)) |
137 { |
137 { |
138 const TInt KMinButtons = 1; |
138 const TInt KButton1 = 1; |
139 const TInt KMaxButtons = 15; |
139 const TInt KButton2 = 2; |
140 |
140 const TInt KButton3 = 3; |
141 // Test for a field containing at least num lock or caps lock |
141 // Test for fields containing mouse buttons, only three mouse buttons event are handled |
142 if ( (aField->UsageMin() >= KMinButtons) |
142 // in mouse driver anyway, detecting for KButton1, KButton2 & KButton3 here. |
143 && (aField->UsageMax() <= KMaxButtons) ) |
143 if ( (aField->UsageMin() <= KButton1) |
|
144 && (aField->UsageMax() >= KButton3) ) |
144 { |
145 { |
145 DBG(RDebug::Print(_L("[HID]\tButtons field found"))); |
146 DBG(RDebug::Print(_L("[HID]\tButtons field found"))); |
146 found = ETrue; |
147 found = ETrue; |
147 } |
148 } |
148 } |
149 } |