Archived

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

granat

DInput...Keyboard question..

Recommended Posts

To my knowledge, keyboards don''t have actual keys with letters like that but, rather, you press a certain key, then another and you get the letter and the symbol together. So, if I''m correct, then you''ll only be able to deal with the actual keys on your keyboard.

Share this post


Link to post
Share on other sites

That´s how it works on my keyboard...

But maybe keyboards with those actual keys exist in
Spain, where they use those letters ???

My danish keyboard have 3 letters on it specific to the danish language......(Æ, Ø, Å)...

Are DIK values simply ASCII values ??

Share this post


Link to post
Share on other sites
I think the DIK_* values are the same no matter what keyboard you use, but they're not always accurate, they just represent the physical keys.

The DIK values are most probably made from an english keyboard, so whatever keys your Æ, Ø, Å keys represent on the english keyboard layout, that's the keys you're looking for.

I know that wasn't a really good explanation, but I hope you get the idea.
Also, correct me if I'm wrong, anyone.

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Edited by - Spiff on 4/4/00 4:29:40 AM

Share this post


Link to post
Share on other sites
"if that is the case then Direct Input is pathetic" - I think all keyboard input works like that, Windows too, it''s just that you have to specify what physical keyboard layout you''ve got. Like me, I''ve got a swedish keyboard, but if I choose an american layout in Windows, my Å Ä and Ö keys turns into some other characters (the corresponding default ones).

Haven''t you noticed that sometimes if you don''t load a keyboard layout in DOS, all keys are not where they''re supposed to be.

============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Share this post


Link to post
Share on other sites
Just a question: Are ''Z'' and ''Y'' exchanged on the german keyboard only, or on other keyboard layouts, too?? That''s what bothers me all the time, if a program doesn''t support german layout.

Share this post


Link to post
Share on other sites
Afaik, there are at least 3 contries in europe where the y and z keys are swapped on a computer keyboard. I myself use a german keyboard, ä, ö and ü are actual keys, generating the letter instantly when you press them.

If you want to compare an english keyboard with a german one, or get the DIK_ codes for the special keys, just look at this page:
http://www.lunaticsystems.de/truefx/tfxinputkeymap.html

It shows an english keyboard and a german one, both using an image map - so you can just click on a key and its DIK_ constant and scancode is displayed.
(The page belongs to a dinput manager lib written by me)

-Markus-

Btw, the designers of C surely used an english keyboard, since we've got to type combinations of alt and num keys to obtain a backslash, { } and so on :-)


Edited by - Cygon on 4/4/00 6:13:34 PM

Share this post


Link to post
Share on other sites
Aren''t the DIK_ codes representative of the scan codes, not ASCII values?

If such is the case, then DIK_Y and DIK_Z will always represent yY and zZ, respectively. If the keyboard is set up properly, at least.

I would''ve thought that the DIK_ codes and the standard Win32 VK_ codes are the same, in fact.

If this isn''t the case, someone needs to shoot the people who agreed to that system, since the VK_ codes work that way (the good way).

TheTwistedOne
http://www.angrycake.com

Share this post


Link to post
Share on other sites