Not logged inOpenClonk Forum
Up Topic General / Help and Questions / reconfigure WASD keys to arrow keys control
- - By Anonymous Date 2018-02-18 17:27
Goal: use arrow keys instead of WASD keys.

Why: Some people are left handed therefore use the mouse located left of the keyboard with their left hand on the mouse, it is akward to use WASD

with the right hand because it is too close to the mouse, especially when your space is restricted and you cannot move your keyboard.

What I intuitively tried: Options > Controls then click on a key, press enter, was expecting to be able to enter a new key but no luck, also tried

right click but no luck as well.

Question 1: Is there a way to remap keys from the GUI?

Question 2: If not, Is there a configuration file like an ini file to modify, could not find one, on a Windows dist could see only files

with extension oc... some letter, apparently they are object files. On a Linux dist could not even find the files under /usr/games/openclonk

Question 3: is there a way to edit these oc? files, change them and used them in the game?

Thanks Guys, Great Game by the way.
Reply
Parent - By Zapper [de] Date 2018-02-18 18:36
Heyo!

>Question 1: Is there a way to remap keys from the GUI?


It's definitely possible to change the key assignments. You have to click on the key, though (i.e. not on the text "Left" but on "A"). That's not very visible from the UI :I
Please make sure that you clicked on the name of the key - is it possible to then assign a new key?

>Question 2: If not, Is there a configuration file like an ini file to modify, could not find one, on a Windows dist could see only files


There is also a text configuration file for the default assignments. It is packed in System.ocg/PlayerControls.txt
That's the file: https://github.com/openclonk/openclonk/blob/master/planet/System.ocg/PlayerControls.txt

>Question 3: is there a way to edit these oc? files, change them and used them in the game?


Yes! Those are basically just zip files (with a custom header). You can unpack/pack them with the command-line tool c4group (which is included in the release).
Basically all of the content is scripted in C4Script, so it's pretty easy to create mods

Here's the SDK documentation: http://docs.openclonk.org/en/sdk/
Feel free to ask more questions!

>On a Linux dist could not even find the files under /usr/games/openclonk


I don't know where they go on Linux, unfortunately
Parent - - By Luchs Date 2018-02-18 18:45 Edited 2018-02-18 18:48
[Edit: Well, Zapper was faster than me]

>What I intuitively tried: Options > Controls then click on a key, press enter, was expecting to be able to enter a new key but no luck, also tried


You were almost there: try clicking on the key assignment. E.g. to change "Left" with default assignment A, click on the A. It will then show a dialog and wait for a key press. You're right in that the usability of that dialog is not great.

>Question 2: If not, Is there a configuration file like an ini file to modify,


There is configuration, but it's not easy to edit the key assignments from there. On Windows, it's in the Registry (not sure about the exact path). On Linux, it's in the file ~/.clonk/openclonk/config.

>Question 3: is there a way to edit these oc? files, change them and used them in the game?


There are two main file types: Objects (ocd) and scenarios (ocs) (which are organized in folders (ocf)). I recommend trying the built-in editor for editing scenarios first. Just click the "Editor" button in the main menu. (Unfortunately, the editor is broken on the Windows release - here are instructions for fixing this until we release 8.1.) You can then create a new scenario or open existing ones to edit them.

If you want to look into the game files themselves, the easiest way is probably to download them from the repository. Click on the green button "Clone or download", then "Download ZIP". The game data is in the "planet" folder. You can find more information about these files in the documentation.
Parent - - By Anonymous Date 2018-02-21 12:36
Thanks Guys, it was very helpful!
Reply
Parent - - By Clonkonaut [de] Date 2018-02-21 13:29
In case you want to write down your key assignments, we could incorporate those into the game for a default left-handed scheme.
Reply
Parent - - By Anonymous [us] Date 2018-03-05 23:00
This is my mapping for lefties(Everything under the right hand):

Drop:    Numeric Enter Key
Inventory Menu:   Delete Key
Left:      Left Arrow
Right:    Right Arrow
Down:    Down Arrow
Up:      Up Arrow
Jump:    Up Arrow
Interact:    End Key
Pick Up:    Shift Right
Player Menu:  Page Down Key
Hotkey 1:    Numeric 1
...
Hotkey 9:    Numeric 9
Reply
Parent - By Caesar [jp] Date 2018-03-05 23:49
Thank you. Leaves the question about what to do for notebook keyboards. I guess we can mark this as "left-handed Num-block" or so?
Parent - - By Mupf [de] Date 2018-03-06 22:08
Wouldn't Num0 be closer for drop than enter?
Parent - By MadScientist [us] Date 2018-03-06 22:37
Not really for me, easier to reach enter with my pinky than 0 with my thumb, with index above 1, middle above 2, ring above 3.
Reply
Parent - By K-Pone [de] Date 2018-03-07 22:56
I would say that depends on the keyboard model that you use. Especially notebook keyboards often have tighter layouts for the arrow keys and numpad areas while you have plenty of space inbetween on a regular keyboard. Also notebook keyboards are often missing keys (like for example the one on a Dell Latitude E5500 doesn't have a context menu key and right windows/super key. Not to forget the Fn key on most notebook keyboards which you don't have on a regular one. It also doesn't have a specific position, so it could be everywhere on the keyboard.)
Parent - - By MadScientist Date 2018-03-17 00:08
I might reconsider Drop as Numeric Enter Key because it seems it also maps to Regular Enter Key.

We all know on planet OpenClonk that clonks have a tendancy to get stuck on small pixels and to solve the problem it is common to use:

CTL F5 + Enter + /script GetCursor(0)->eval("SetPosition(GetX()+10,GetY())")

So the Enter key does not work when Drop is mapped to Enter, it seems the Debug Field enters in an endless loop, try it it is fun!

So I am testing mapping Drop to + sign or even 0 like Mupf suggested.
Reply
Parent - By Caesar [jp] Date 2018-03-17 05:26
Hm, we should fix that, though…
Up Topic General / Help and Questions / reconfigure WASD keys to arrow keys control

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill