Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Malko's avatar
Malko
Honored Guest
13 years ago

UDK viewport keyboard remap

Hello rifters!

A little question today, more about UDK configuration rather than Oculus in itself.

In the perspective viewport, we can navigate using flight controls with the WASD key.
But I'm using a french keyboard and would have liked to remap these keys to ZQSD.

I've located two .ini files that are supposed to register this kind of preference and modified the bindings accordingly.
From what I understood, we have two BaseInput.ini files, one located in \Engine\Config\ and the other one in \UDKGame\Config. The first one is about the editor bindings, and the second one is related to the game, when tested through the "play on PC" option, and inherits from the first one.

Basically, it's about changing these lines

Bindings=(Name="W",Command="MoveForward")
Bindings=(Name="S",Command="MoveBackward")
Bindings=(Name="A",Command="StrafeLeft")
Bindings=(Name="D",Command="StrafeRight")


to this

Bindings=(Name="Z",Command="MoveForward")
Bindings=(Name="S",Command="MoveBackward")
Bindings=(Name="Q",Command="StrafeLeft")
Bindings=(Name="D",Command="StrafeRight")


And of course, I took are of also remapping the keys affected by that change, for not having any duplicate entries.

I'm a bit confused because these parameters are repeated at several locations. We have one under [Engine.PlayerInput], and another one under [GameFramework.DebugCameraInput] for the file located in \Engine\Config\

Once my changes are saved, I restart UDK and notice that my modification works well in the game, but not in the editor, which is still using WASD bindings.

Switching my keyboard to a qwerty layout is not an option as it's not very convenient for all the other keys.
The most immediate workaround is to use the arrow keys, which work well independently of the keyboard used, and it's pretty much what I'm doing right now. But this issue is bugging me and after having spent too much a bit of time trying to investigate the problem, I'm polling you guys, just in case someone went into that detail.
I'm using the 2013-03 Oculus version

Thank you!

5 Replies

Replies have been turned off for this discussion
  • Bonjour Malko,

    Well, where is your question ? ^_^

    Key binding for your game, and for the editor are 2 differents things. Located in 2 differents places.

    For your game it's ...\UDKGame\Config\UDKInput.ini
    For the editor it's ...\UDK\Engine\Config\BaseInput.ini

    So you will need to change both.

    Regarding the more multiple "binding places" it's because there are some "default" config and some for your own game.

    Let's say you create a game with all the folder and all :
    UDK will then create config file FROM the default reference config file. (ConfigDefaultInput.ini)
    (it is said not to edit the default config...)
    ...\UDKGame\ConfigDefaultInput.ini

    Then you will have to modify the newly created one just one time. (UDKInput.ini)
    You will notice in that folder many Default files. don't edit them
    Sometime you may have to roll back to them if you messed up somewhere.

    it's the same process with all the default files (engine, editor, game...)

    On the good process of doing things, I make shortcuts to these so i can fetch them fast and easy and also I noted on a separate txt file the change I made. So if I change UDK version, or have to roll back or any other issues i will have this txt file as a reference to tell me what I changed to i can change it again. Because you will forget ^_^

    I hope I answered you non question ^_^
  • Malko's avatar
    Malko
    Honored Guest
    Bonjour Olivier, thanks for your time and your help
    Sorry if I wasn't clear enough in my first post

    I managed to have the ZSQD keys working:
    -in the perspective viewport of the editor when using the "play in viewport" command (the blue play icon)
    -in the game when launched with "Play on PC", from the "Play" menu in the top menu bar.

    but not in the perspective viewport of the editor, which keeps the WASD bindings.

    I'm very new to UDK and have a ton to learn. I'm still probably missing lots of important core concepts.
    Thanks for the tip to keep track of these config files modifications, I already figured out that was quite important. It could be good to use a revision control system for that.
  • No worries, no problem ^_^

    Glad you manage to rebind.

    Yeah in the editor, you have to change the "default" ones (make a backup of it)

    Try this :
    in DefaultInput.ini
    In Game Keyboard Mouse Bindings area
    then Primary default bindings

    Replace this :
    Bindings=(Name="W",Command="GBA_MoveForward")
    Bindings=(Name="S",Command="GBA_Backward")
    Bindings=(Name="A",Command="GBA_StrafeLeft")
    Bindings=(Name="D",Command="GBA_StrafeRight")

    with
    Bindings=(Name="Z",Command="GBA_MoveForward")
    Bindings=(Name="S",Command="GBA_Backward")
    Bindings=(Name="Q",Command="GBA_StrafeLeft")
    Bindings=(Name="D",Command="GBA_StrafeRight")

    You need to change also this one or you will have a double binding :
    Bindings=(Name="Q",Command="GBA_ToggleTranslocator")


    That should work for you then.
    On a side note, I am French also, but a long time ago I switched to qwerty keyboard and OS in english...
    All the soft I use are English anyway, and at at time there were no translation of the UI for many, not instead of fighting with a azerty keyboard I went for full English.
    And also when you to programing these keys : [{}]/\ are VERY easy to access... no alt+shitf crap ^_^
    ( I am fighting with accent now...)
  • Malko's avatar
    Malko
    Honored Guest
    Hi Olivier,

    Thanks again.
    I already tried the solution you suggested, without success.
    Just in case, I wiped out my UDK folder and did a clean install, just in case something was messed up in my config files, and it doesn't solve the thing.
    I also tried with a version not linked to Oculus, downloaded straight from the unreal website, and... no it's not that.

    I'm running Win7 64 in english, with a french keyboard. Maybe UDK relies on the OS language for some of the editor keyboard mapping, I don't know.
    However, thank you again, but don't worry too much as it's a minor issue anyway. I was just curious and was asking about a possible solution on these forums just in case I missed something obvious.

    I've been coding for years on a french keyboard and I tend to think we can get used to everything, even these weird finger stunts to type all the symbols required for programming, haha!
    But I still write a lot of content in french, and we both agree on the fact that accents are a pain in the ### on qwerty keyboards. That's why I brought a french keyboard in my suitcase when I first came to Australia!

    I'll keep that thread updated if I find a solution.
  • Try adding something similar to this at the end of DefaultInput.ini :

    [Engine.PlayerInput]
    ; Remove old bindings.
    -Bindings=(Name="W",Command="GBA_MoveForward")
    -Bindings=(Name="S",Command="GBA_Backward")
    -Bindings=(Name="A",Command="GBA_StrafeLeft")
    -Bindings=(Name="D",Command="GBA_StrafeRight")
    -Bindings=(Name="E",Command="GBA_Use")
    -Bindings=(Name="Q",Command="GBA_ToggleTranslocator")

    ; Add new bindings.
    .Bindings=(Name="Z",Command="GBA_MoveForward")
    .Bindings=(Name="S",Command="GBA_Backward")
    .Bindings=(Name="Q",Command="GBA_StrafeLeft")
    .Bindings=(Name="D",Command="GBA_StrafeRight")
    .Bindings=(Name="???",Command="GBA_Use")
    .Bindings=(Name="???",Command="GBA_ToggleTranslocator")


    Check out : UDN Configuration files #Special Characters