Archived

This topic is now archived and is closed to further replies.

zipless

Weird keyboard error

Recommended Posts

zipless    122
I got myself a nice new cherry keyboard a couple of weeks ago and almost immediately i noticed that it has a very weird problem. When i hold down the up arrow, left arrow and the space bar at the same time the space bar is NOT picked up. At first i figured it was the way that i read in key values using GetAsyncKeystate() but i''ve just finished implementing my input stuffs in DirectInput and the problem is still there. It''s not that bad, i can live with it, but i''m a bit worried that it''s a fairly common problem. If it is that means that my game won''t run properly if you have a keyboard that works in this way. Also if it is a common problem then there must be some sort of solution or workaround for it, right? Has anyone else come across this? Does anyone even know what i''m talking about? zipless

Share this post


Link to post
Share on other sites
GoofProg    127
the keyboard seems to be able to check for multiple key presses, but it actually is not doing so. the DirectInput API makes it look like it does... and up to 256 on/off switches. In reality, it only can output one char at a time. It alternates between the different keypresses. Probably checking the keyboard presses several times might workaround your problem.

Share this post


Link to post
Share on other sites
hemihua    122
I think its coz the keyboard can only report back so many simultaneous keypresses at a time. If youv''e ever played 2 player games on the same computer, you get keyjams quite often because of so many keys being pressed at the same time. I think its a limitation in the design of the keyboard hardware.

Share this post


Link to post
Share on other sites
zipless    122
UP, RIGHT and SPACE work fine so it can''t be a key limit. In fact UP, LEFT and SPACE is the only combination i''ve noticed that fails to work (not that i''ve been looking that hard).

I poll the keystates every game turn and there is no change. holding those 3 keys down just does not work.

I''ve e-mailed cherry about the problem and hopefully i''ll get a reply soon. It''s not the worst problem in the world but movein up and left whilst fining in my game is now impossible. I can live with it but i don''t waat anyone playing the game (ESPECIALY when i''ve sent it in as part of a portfolio) to have the same problem.

I guess i''ll have to move the fire button to the Alt or return key :-(

zipless

Share this post


Link to post
Share on other sites
zipless    122
Thought i should let you guys know i got a reply from Cherry today (V quick!).

Basically they say that the only 3 key combination garaunteed to work is CTRL-ALT-DEL, although many combinations will work some won''t. Aparently cherry use a non-default *matrix* to map the keys so their combination differ from standard boards. Soooooo, while Cherry boards don''t like UP,LEFT and SPACE they will like some other combinations that normal boards don''t.

The moral of this story: Don''t take for granted that your mulitple key combinations will work. Always offer at least one alternative. I guess the ability to keymap would be good.

Anyhoo, now that i know this is a hardware issue i''ll just allow the user to switch between the arrow keys/WASD/keypad(4568) at least then EVERYONE should have a combination that works.

zipless

Share this post


Link to post
Share on other sites
Zawinul    122
Yeah, it happens pretty randomly with different keyboards, and can be pretty annoying at times. I''ve had my last keyboard work fine with 3 keys pressed at once, then my new keyboard (which is actually better, and nicer) now doesn''t work with those 3 keys at once.

Best bet, is to allow the user to remap all keys, so if they know their keyboard sucks with a particular key combo, they can change a keys if that works.

- Zawinul

Share this post


Link to post
Share on other sites
zipless    122
Yeah, like you i prefer my newer keyboard, despite it''s issue it kicks much ass. The old one i had was picked up for about 5 quid and had 6 keys missing (i pried them off when they got stuck in the down position).

I find it weird that keyboards do that, i guess it must be some need for legacy support that keeps them working like this. I mean the easiest option would surely be to have a 256bit report sent every time the board was queried. Ah well, no matter.

Funny thing is that it''s not really a problem now that i know it''s a common deal. Last night i was about pulling my hair out, hee hee. Guess i should start work on that key remap feature.

zipless

Share this post


Link to post
Share on other sites