Scancodes and keyboard layouts. Germans apply plz.

Blitz3D Forums/Blitz3D Programming/Scancodes and keyboard layouts. Germans apply plz.

napole0n(Posted 2004) [#1]
I'm currently working on a game which is controlled using the keyboard. This game features two sets of movement controls, one of which is mapped on the [Z],[C] and [S] keys. The Z key is the bottom-left letter (so no slash or other character) on the keyboard.

However, I remember that the German keyboard has a different layout, where the [Y] and [Z] keys are swapped compared to regular US keyboards. I was wondering if this also means that the scancodes are different.

For my US keyboard, the scancode for [Z] is 44. Could someone with a German (or other) keyboard layout please try if the bottom-left letter has the same scancode?


Perturbatio(Posted 2004) [#2]
I wrote this a while ago, but no-one with foreign keyboards would test it for me.
here
I had hoped it would help resolve this, since you can use ascii values instead of scancodes.


napole0n(Posted 2004) [#3]
I can't help you there, as I've got a regular US keyboard. And I really need the scancodes, because I want to have continuous input, which isn't possible with ASCII codes I think.

But there would surely be somebody kind enough to help us with this?


Damien Sturdy(Posted 2004) [#4]
Argh. sorry, i just put my aserty keyboard into storage. Heading there later though, il get back to you if i pull it out.




..yes. I said Aserty !! ??? (why cant they be universal)
as far aas i can tell, the scancodes stay the same because otherwise there would be no need to customise your keyboard within windows.


Cheers


Murphy(Posted 2004) [#5]
the Y on the german/austrian keyboards are scancode 44.


napole0n(Posted 2004) [#6]
That makes sense...

I also noticed that the scancodes are more or less organised in order of the ways the keys are placed, and not the characters they represent. So I guess my controls will work fine on a German keyboard, although I'll have to mention somewhere that the letters on the keys might be different.


napole0n(Posted 2004) [#7]
Thanks a lot guys.

I'll continue with my current setup then.


jfk EO-11110(Posted 2004) [#8]
Usualy I accept Y or Z as a Y-Keyhit, to make sure it works on both keyboards. Easy and quick solution, if you don't need a special "Z" key.


Fry Crayola(Posted 2004) [#9]
To be 100% sure, allow for the player to redefine the keys.


napole0n(Posted 2004) [#10]
@ Fry Crayola (aren't you also on RLLMUK?): I will add a 'customise controls' option, as a lot of people seem to prefer to set their own controls.

@jfk: That is a good solution. The keys I choose are not choosen because of the letters they represent, but just the location on the keyboard. I've got the 'right' controls (left, right, up) mapped on the cursor keys, and the 'left' controls (left [z], right [c], up [s]) on the left side of the keyboard.


Fry Crayola(Posted 2004) [#11]
I am. Too much of the time. I'm suffering more than you with the getting things done part, I think. I got a kick up the arse today though.


napole0n(Posted 2004) [#12]
Well, at least I can not access that forum from work, so that helps ;) But I find that if you really want to get something done, the best thing to do is to take out your network cable and pull out the phone. Especially if you're easily distracted. While the Internet is a huge source of knowledge, it's even more a huge source of distraction.

This game is just a little hobby of mine, although I hope to exploit it commercially when it gets finished.


Fry Crayola(Posted 2004) [#13]
In my case I'm unemployed and thus really should have no excuse. You're very right about the waning enthusiam. Anyhow, enough.

Back on topic, German keyboards are annoying. I use "y" frequently. There's nothing like tzping a sentence that alwazs ends up exactlz like this.


Perturbatio(Posted 2004) [#14]
I want to have continuous input, which isn't possible with ASCII codes I think.

It is with that dll.