keydown - multiple simultaneous key press c# -
i programming game in microsoft visual studio c# , have catch lot's of keys simultaneously. can't detect q,w,e,r,t,y @ same time can detect q,w,e,r,t,a.
i tried use keydown , [dllimport("user32.dll")]
both of them has same result. difference between y , keys , how can solve problem?
int code1 = getvirtualkeycode(keys.q); int code2 = getvirtualkeycode(keys.w); int code3 = getvirtualkeycode(keys.e); int code4 = getvirtualkeycode(keys.r); int code5 = getvirtualkeycode(keys.t); int code6 = getvirtualkeycode(keys.y); if ((array[code1] & 0x80) != 0 && (array[code2] & 0x80) != 0 && (array[code3] & 0x80) != 0 && (array[code4] & 0x80) != 0 && (array[code5] & 0x80) != 0 && (array[code6] & 0x80) != 0) { listbox1.items.add("asdasdasd"); }
it may related keyboard. when gamer, know property of keyboards able send multiple keystrokes @ same time; depending on keyboard, number differ, different combinations or wouldn't work.
Comments
Post a Comment