Discovery Gaming Community
multiple keymaps - possible ? - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Discovery General (https://discoverygc.com/forums/forumdisplay.php?fid=3)
+--- Forum: Discovery RP 24/7 General Discussions (https://discoverygc.com/forums/forumdisplay.php?fid=23)
+--- Thread: multiple keymaps - possible ? (/showthread.php?tid=152403)

Pages: 1 2 3 4


multiple keymaps - possible ? - Stabby_Dave - 08-02-2017

Hi.

I fly both snubs and caps (both badly) and have different keyboard setups for each.

Is it possible to have more than one keymap file and to switch to the relevant one, depending on the ship class I'm flying?

Cheers.


RE: multiple keymaps - possible ? - Sombs - 08-02-2017

If you have enough space, just have two version of Discovery installed. I do that for example when I want to record something without any graphical alterations.


RE: multiple keymaps - possible ? - Stabby_Dave - 08-02-2017

Great idea. Would never have thought of that in a million years.

Fantastic (happy)

Cheers.


RE: multiple keymaps - possible ? - DragonRider - 08-02-2017

That won't work, as the 2 discovery games will read off the same keymap file.

You can have 2 different keymap files and switch them around. Or use some kind of macro system, but that will be much more complicated.


RE: multiple keymaps - possible ? - Stabby_Dave - 08-02-2017

Even if they're discrete installations in discrete folders? Registry pointers to the same file? Would that be the problem?

Macro could work. I'm a DBA/programmer of over 30 years (although not in dos/windows), so it's a possibility, however remote.

In the meantime, it's a few keys to reassign every time, but it's not an "elegant" solution, which bugs me.

Some things you can't let go Smile

Any more ideas welcomed.

Cheers.


RE: multiple keymaps - possible ? - DragonRider - 08-03-2017

Every Discovery installation reads off the same files in My Documents>My Games>Freelancer. The file called "UserKeyMap" contains the keys. If you don't mind restating the game everytime you want to switch between snub and cap layouts, you can have 2 instances of this file and switch it around.

If you only have a few keys I may have a solution.

I often use a macro program called AutoHotKey. One feature is to make one key register as another. For example, I can make pressing the "A" key make the computer see as pressing "S".

So here's what you can do. Make a toggle that enables/disables this macro (caps lock or scroll lock is good if your keyboard has a light). Then say on your snub setup you use "R" to launch missiles and on your cap setup you use "Q". When the macro is enabled, make "Q" count as "R".

Only downside to this is you have to disable it every time you want to chat.

I can help you set this up if you like the idea.


RE: multiple keymaps - possible ? - Antonio - 08-03-2017

You can do what I do. If I'm flying a snub, I have my primary keys set as WASD for strafing, tab for thrust, X for reverse, Q for CD and 1-6 weapon groups. When I'm flying a cap, I switch the WASD for steering, but I also have a secondary strafing loadout which is needed in some scenarios (99% of that is on battleships, but sometimes strafing in other caps comes in handy) which is O,K,L and whatever is right of L for you for strafing, U for thrust, . for reverse, i for CD and 7,8,9,0,',+ for weapon groups.


RE: multiple keymaps - possible ? - Stabby_Dave - 08-03-2017

(08-03-2017, 07:18 AM)DragonRider Wrote: Every Discovery installation reads off the same files in My Documents>My Games>Freelancer. The file called "UserKeyMap" contains the keys. If you don't mind restating the game everytime you want to switch between snub and cap layouts, you can have 2 instances of this file and switch it around.

If you only have a few keys I may have a solution.

I often use a macro program called AutoHotKey. One feature is to make one key register as another. For example, I can make pressing the "A" key make the computer see as pressing "S".

So here's what you can do. Make a toggle that enables/disables this macro (caps lock or scroll lock is good if your keyboard has a light). Then say on your snub setup you use "R" to launch missiles and on your cap setup you use "Q". When the macro is enabled, make "Q" count as "R".

Only downside to this is you have to disable it every time you want to chat.

I can help you set this up if you like the idea.

This is just what I'm after. I'll have my default setup for caps, then, if I fly a snub, I'll enable it and switch over. That way, I should be able to chat most of the time without a problem.

@Antonio : Also a good idea.

Thanks, all. Off to install AutoHotKey

Cheers.


RE: multiple keymaps - possible ? - DragonRider - 08-03-2017

Let me know if you need help with setting the macro. Like code and all.


RE: multiple keymaps - possible ? - Stabby_Dave - 08-03-2017

Cheers. Written some code. Not working yet. I'll post a copy when I get back from the pub.

[EDIT]

Hmmm. Can't get it working. It recognises when the scroll lock key is pressed, but doesn't seem to remap the keys correctly.

Registered on the AutoHotKey forum, but account not activated yet.

Here's the code:

Code:
; Changes the WASD keys to ARROW keys when Scroll Lock is toggled on. Reverts when off.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

;#IfWinActive ahk_class Freelancer

~ScrollLock::

    KeyWait, ScrollLock

    while GetKeyState("ScrollLock","T")
    {        
        MsgBox,0,,Scroll lock ON
        $w:: send {Up}
        $Up:: send w
        $s:: send {Down}
        $Down:: send s
        $a:: send {Left}
        $Left:: send a
        $d:: send {Right}
        $Right:: send d
    }
    
    MsgBox,0,,Scroll lock OFF
    
Return

;#IfWinActive

All help greatly appreciated.

Cheers.