For some weird reason NumLock and Pause keys are messed up - fixed

This commit is contained in:
Alexey 'Cluster' Avdyukhin 2021-06-08 11:39:00 +03:00 committed by zeromus
parent 7c6e7f5e15
commit f22f48e46e
1 changed files with 11 additions and 2 deletions

View File

@ -1004,10 +1004,19 @@ char *MakeButtString(ButtConfig *bc, int appendKB)
strcat(tmpstr, "Right Win + ");
}
if(!GetKeyNameText(((bc->ButtonNum[x] & 0x7F) << 16) | ((bc->ButtonNum[x] & 0x80) << 17), tmpstr+strlen(tmpstr), 16))
/* For some weird reason NumLock and Pause keys are messed up */
if (bc->ButtonNum[x] == SCAN_NUMLOCK)
{
strcat(tmpstr, "NumLock");
}
else if (bc->ButtonNum[x] == SCAN_PAUSE)
{
strcat(tmpstr, "Pause");
}
else if (!GetKeyNameText(((bc->ButtonNum[x] & 0x7F) << 16) | ((bc->ButtonNum[x] & 0x80) << 17), tmpstr + strlen(tmpstr), 16))
{
// GetKeyNameText wasn't able to provide a name for the key, then just show scancode
sprintf(tmpstr+strlen(tmpstr),"%03d",bc->ButtonNum[x]);
sprintf(tmpstr + strlen(tmpstr), "%03d", bc->ButtonNum[x]);
}
}
else if(bc->ButtType[x] == BUTTC_JOYSTICK)