Not logged inOpenClonk Forum
Up Topic General / Help and Questions / Configure their own keys ?
- - By Muzaff [fr] Date 2010-12-29 23:54
Hello,

We should add the option to select its own keys, because I have a AZERTY keyboard and really hard to play.

And for multiplayer play it will be very useful because the keys for Player 2 are difficult, I do not even know all the keys.
Parent - - By Clonk-Karl [de] Date 2010-12-30 00:04
You can add a new configuration to System.c4g/PlayerControls.txt. The player can then activate that layout in the player configuration dialog. I did the same for a US Dvorak layout.
Reply
Parent - - By Muzaff [fr] Date 2010-12-30 00:23
Thank you,

I modified my file but it blocked everything, I probably have to edit a line that should not.

I'll reinstalled OC and try again.
Parent - - By Clonk-Karl [de] Date 2010-12-30 01:11
When you are done feel free to submit the new file, so we can add it to the game.
Reply
Parent - - By Muzaff [fr] Date 2010-12-30 02:12 Edited 2010-12-30 03:18
EDIT : it works but my clonk fly,

it can come PlayerControl.txt file or it has nothing to do?
Parent - - By Newton [de] Date 2010-12-30 20:22
Has nothing to do with it.
Parent - - By Muzaff [fr] Date 2010-12-30 21:48 Edited 2010-12-30 22:31
Ah, yes it's true, I was trying with the original file and clonk my flight, then this comes from my OC

So normally it works.

Where is it that I can post the file playercontrol.txt, here or in another Topic ?

Does someone could try if it works, please?

I hereby license the following file(s) under the ISC license

EDIT : The file works, the problem was my system.c4g but I found the solution.

but now it's just my mouse because he digs that diagonally, it could come from the script ?
Attachment: PlayerControls.txt (22k)
Parent - - By Newton [de] Date 2011-01-01 18:21
Hmm, I am still doubting that creating a new control set for every possible keyboard layout is the best solution.
Sven, what do you think about that? Any ideas?
Parent - - By Sven2 [de] Date 2011-01-03 10:21 Edited 2011-01-03 10:29
I think it is possible to retrieve absolute key positions from the OS or a library (I think DirectInput does it, but maybe we could also find some platform independent library), so it could determine a working standard layout automatically. The definition file would be written for a specified keyboard layout (e.g. en/US or de) and adapted automatically.

Still, this doesn't replace the need for a possibility to redefine keys to your own need, which is also still to be coded.
Parent - - By Newton [de] Date 2011-01-03 12:30
Yes of course.

>DirectInput


It would be good to know if there are libraries available that can be used platform-independent (or at least if there is a library available that can be used for linux/mac). Anyone knows one?
Parent - By Günther [de] Date 2011-01-03 14:52
On Linux, you can sort-of assume that the keycodes X11 sends you closely correspond to the hardware. Officially, they are undefined, but everyone uses USB or PS/2 keyboards in practice. So the A key in AZERTY and the Q key in QWERTZ will send the same keycode. (Well, except for differences between evdev and the old keyboard input driver, I think, but assuming evdev probably will not break too much nowadays.)
Reply
Parent - - By Newton [de] Date 2010-12-30 20:21
Hmm, how do all the other games that are released in France solve the problem of WASD being ZQSD?
Parent - By Luchs [de] Date 2010-12-31 02:05
At least QWERTZ seems to be ignored usually :(
Up Topic General / Help and Questions / Configure their own keys ?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill