Page 1 of 1

Changing the keyboard mappings

Posted: Mon Mar 21, 2011 4:45 pm
by jrnyfan4life
Hi guys,

I was just wondering if it's possible to change the keyboard mappings for the camera controls, as my ctrl button no longer works and I can't switch cabs.

Re: Changing the keyboard mappings

Posted: Thu Mar 24, 2011 8:52 am
by LoneWolfDon
**Edit:
I went ahead an whipped-up a little script for you:
http://www.rryard.com/files/Ctrl_to_Caps.zip

This is a self-contained executable file, just download, un-zip, then when wanting to use the script, simply run the "Ctrl_to_Caps.exe" file. You will see a little icon appear in your system tray that indicates the script is now running.
This script will make the "Capslock" key act as if you were pressing the "Ctrl" key (I picked CapsLock key in this case because as far as I know the CapsLock key is not used for any RailWorks keyboard commands), then run RailWorks as normal. Now, when you get to some point you want to use the "Ctrl" key command, instead press the CapsLock key which should now be re-mapped to function as the Ctrl key.

Once you close RailWorks to exit the script simply right-click on the script-icon in the system-tray and select Exit.
That's it. Hope it works for you and does what you want. If you'd prefer a different key to be remapped instead, let me know.

Cheers! :)
=================================================

As far as I know, there's no built-in option with RailWorks to re-map any of the default keys.
But, it is possible.

But, first a couple of things:
Most keyboards have two "Ctrl" keys, are both of them not working for you?
Also, with the Driver's HUD, you can now click on the camera-views buttons towards the right-hand side to change a view.

If you still want a way to re-map the Ctrl key though, you could do it with the help of a nice free utility such as:
http://www.autohotkey.com/ (though, perhaps AutoHotKeys may not work always work for all versions of Windows depending).

I have use this to make a couple of simple scripts for use with RailWorks.
One such script I wrote was to use the press of the Middle-Mouse-Button to toggle off and on the mouse pointer (as sometimes I find it a but of a nuisance to always have to drag the pointer out of the way when I didn't want to see it, as sometimes always seeing the mouse pointer on the screen can be distracting and break "immersion" a bit).
http://www.rryard.com/files/Hide_Pointer_with_MMB.zip

Another little script I wrote was for some users who either didn't have a mouse (maybe using a laptop with a touchpad), or no-mouse-wheel on their mouse (or it was broken), or maybe they used something like a trackball, but using the 2D map, how to zoom-in or zoom-out you need to use the mouse-wheel for that. So, I wrote a little script that will allow using PageUp and PageDown keys to act as the mouse-wheel commands. Info here:
http://railworksamerica.com/forum/viewt ... 1290#p8126

Learning to use the scripting for AutoHotKeys can be a bit confusing if you're not used to it.
But, if you still want to re-map your Ctrl key to something else and need help with that, just let me know what other key would you like your Ctrl key re-mapped too? I could then whip-up a little self-contained script for you that you simple run before launching RailWorks (it takes up very little memory), then once finish running RailWorks simply close the script.

Re: Changing the keyboard mappings

Posted: Thu Mar 24, 2011 1:21 pm
by Kariban
You might be able to map the default keys to something else in the keymapper files ( unfortunately for you they're per-engine, not global ) but I'm unsure if you can remap default keyboard actions; noone knows what the actions are called atm anyway.