NsKey = KeyDescriptor + 1;\r
for (Index2 = Index + 1; Index2 < KeyboardLayout->DescriptorCount; Index2++) {\r
CopyMem (&TempKey, NsKey, sizeof (EFI_KEY_DESCRIPTOR));\r
- if (TempKey.Modifier & EFI_NS_KEY_DEPENDENCY_MODIFIER) {\r
+ if (TempKey.Modifier == EFI_NS_KEY_DEPENDENCY_MODIFIER) {\r
KeyCount++;\r
} else {\r
break;\r
}\r
}\r
\r
- if (KeyDescriptor->AffectedAttribute & EFI_AFFECTED_BY_NUM_LOCK) {\r
+ if ((KeyDescriptor->AffectedAttribute & EFI_AFFECTED_BY_NUM_LOCK) != 0) {\r
//\r
// For key affected by NumLock, if NumLock is on and Shift is not pressed, then it means\r
// normal key, instead of original control key. So the ScanCode should be cleaned.\r