Kbcheck output wrong keyCode

Hi experts,
 
We have a problem in the use of the function "kbcheck" on PC (Windows Xp).
 
We recorded which key subjects pushed during performing some choice reaction time task.
We wrote the script of the task with Matlab. The function "kbcheck" was used in order to record which key subjects pushed.
Sometimes, wrong "keyCode" was returned. So, we can not record correct response of subjects.
 
For example, when subjects pressed "1", returned keyCode was 49.
But, simetimes, the returned keyCode was 25. This keyCode(25) did not represent "1" but ".".
 
My PC is IBM ThinkPad R40, OS:windows Xp, CPU: Pentium4 2.2G, Memory:1G.
 
I think that our problem is related to PC rather than the script we wrote.
 
Could anyone give us a comment for sovling our problem?
 
Sincerely yours,
 
 
--Hidedki Mochizki--