DInput...Keyboard question..

Started by
9 comments, last by granat 24 years ago
Any way to test keyboard for letters like: ä, ö, ü ???? There are no such DIK Values listed in the SDK.
-------------Ban KalvinB !
Advertisement
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.

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 ??
-------------Ban KalvinB !
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
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
if that is the case then Direct Input is pathetic
-------------Ban KalvinB !
There is a gamedev post on scancodes to ASCII check it out
http://www.gamedev.net/reference/programming/features/scan2asc/

//--- Created by Tom Oram ---
// tom.oram@vodafone.net
"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
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
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.
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
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

Nice little tool Cygon !!

-- There IS something rotten in the state of Denmark --
-------------Ban KalvinB !

This topic is closed to new replies.

Advertisement