Changing Key Mappings?

News and discussion of the PC port of Oolite.

Moderators: another_commander, winston

DeathStalker
Poor
Poor
Posts: 7
Joined: Sat Jul 25, 2020 2:03 am

Changing Key Mappings?

Post by DeathStalker »

How do I change the key mappings? Ex, I definitely want the up/down arrows swapped - 100%. There are probabably other keys that I will want changed once I get used to it (haven't played in 30+yrs!)

Thanks.
User avatar
phkb
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 2989
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Changing Key Mappings?

Post by phkb »

Key mappings are controlled through the keyconfig.plist file, found in the Oolite\oolite.app\Resources\Config folder.

To swap the up/down arrows, on lines 4 and 5 you'll find these entries

Code: Select all

	key_pitch_forward			= 255;		// up arrow
	key_pitch_back				= 254;		// down arrow
Change them to this:

Code: Select all

	key_pitch_forward			= 254;		// down arrow
	key_pitch_back				= 255;		// up arrow
Then restart Oolite while holding down the shift key, and you should be good to go.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 417
Joined: Mon Sep 17, 2018 5:01 pm

Re: Changing Key Mappings?

Post by Milo »

You may also want the Reverse Control OXP for your Aft View.
DeathStalker
Poor
Poor
Posts: 7
Joined: Sat Jul 25, 2020 2:03 am

Re: Changing Key Mappings?

Post by DeathStalker »

And can I ask why the mouse seems to be basically useless for anything other than selecting menu items?

I would have thought that the mouse would have taken the place of the old joystick, but that is apparently not the case.

I can't tell you how many hundreds of hours I put into the original Atari version, and I can't seem to do squat with this one :(

Flight control is just SO way off with just the arrow keys. Fire should be with the mouse buttons, imho. You all know what to do because you designed it. But I can't see it being very easy for a new user.

--- DS
User avatar
phkb
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 2989
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Changing Key Mappings?

Post by phkb »

I normally use a joystick, so I haven't played with keyboard/mouse for a while. I just tried out the mouse controls, and the left button does fire the lasers. The right button stops all movement, allowing you to avoid constant rolling/pitching/etc. Movement seemed OK in my quick test flight (no combat).

Is the left-mouse-button fire not working on your system? Is mouse movement working at all? (You probably know this but Shift-M will turn it on in flight).
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 14633
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: Changing Key Mappings?

Post by Cody »

By choice I use keyboard/stick, but keyboard/mouse certainly works.
The variables vary too much, and the constants aren't as constant as they seem.
DeathStalker
Poor
Poor
Posts: 7
Joined: Sat Jul 25, 2020 2:03 am

Re: Changing Key Mappings?

Post by DeathStalker »

phkb wrote: Sat Jul 25, 2020 6:42 pm I normally use a joystick, so I haven't played with keyboard/mouse for a while. I just tried out the mouse controls, and the left button does fire the lasers. The right button stops all movement, allowing you to avoid constant rolling/pitching/etc. Movement seemed OK in my quick test flight (no combat).

Is the left-mouse-button fire not working on your system? Is mouse movement working at all? (You probably know this but Shift-M will turn it on in flight).
No, no mouse response at all. I will try Shift+M

Can you map other functions to mouse buttons?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5892
Joined: Wed Feb 28, 2007 7:54 am

Re: Changing Key Mappings?

Post by another_commander »

Mouse buttons are fixed to fire laser (lkeft) and center all motion axes (right). Shift+M, as mentioned, will activate / deactivate the mouse. If you prefer having the yaw left / right controls on the mouse x-axis rather than roll, then press Shift+Ctrl+M instead of just Shift+M to activate it.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 417
Joined: Mon Sep 17, 2018 5:01 pm

Re: Changing Key Mappings?

Post by Milo »

Huh, I never knew that...
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 1713
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Changing Key Mappings?

Post by ffutures »

Keyconfig.plst also contains the code needed to use the numeric keypad of a PC as the arrow keys instead of the cursor pad. You delete the default left, right, up and down key mapping and remove the comment markers from around the four replacement keys immediately below.

I actually remembered how to do it for the new build without having to ask!

So far 1.9 looks prettier, and for some reason the joystick drifts less, on my PC. Excellent!
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 1368
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty
Contact:

Re: Changing Key Mappings?

Post by Cholmondely »

hiran wrote: Thu Apr 15, 2021 9:45 pm
Cholmondely wrote: Thu Apr 15, 2021 11:07 am You need a HUD.oxp loaded which supports MFDs (I presume that the Vanilla game HUD doesn't), and you need to understand the use of the : and ; keys to control the MFDs.
Being a newcomer so hard that I do not even know you can use : and ; to control the MFDs.
I use them to yaw the ship...

EDIT: I am on a german keyboard layout, that may add another layer of difficulty. You might be referring to only one key?
https://upload.wikimedia.org/wikipedia/ ... ny.svg.png
https://upload.wikimedia.org/wikipedia/ ... yboard.png
Hiran, if you did come up with a fix for your German Keyboard (one that you are happy with), is there any chance that you can post it for others to use? Or did you end up using Keyconfig's German option?

You might be able to create a file using http://wiki.alioth.net/index.php/Keyconfig. Or post it in some other way. Not fussed!
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 441
Joined: Fri Mar 26, 2021 1:39 pm
Location: Munich, Bavaria

Re: Changing Key Mappings?

Post by hiran »

Cholmondely wrote: Sun May 02, 2021 11:28 am
hiran wrote: Thu Apr 15, 2021 9:45 pm Being a newcomer so hard that I do not even know you can use : and ; to control the MFDs.
I use them to yaw the ship...

EDIT: I am on a german keyboard layout, that may add another layer of difficulty. You might be referring to only one key?
https://upload.wikimedia.org/wikipedia/ ... ny.svg.png
https://upload.wikimedia.org/wikipedia/ ... yboard.png
Hiran, if you did come up with a fix for your German Keyboard (one that you are happy with), is there any chance that you can post it for others to use? Or did you end up using Keyconfig's German option?

You might be able to create a file using http://wiki.alioth.net/index.php/Keyconfig. Or post it in some other way. Not fussed!
I did not yet try to reconfigure the keyboard. Knowing meanwhile different other expansions may add more key functions that might again collide I decided not to touch some areas of the game.
But what would help a lot were an overview graphics. Wchich are the keys and what do they mean?
The table I found on the wiki is of little help if the keyboard is controlled with make/break codes but the keys are labelled with characters. Yet the make/break codes vary by keyboard layout, not by configured locale so the variations are limited.
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 1368
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty
Contact:

Re: Changing Key Mappings?

Post by Cholmondely »

hiran wrote: Sun May 02, 2021 1:07 pm I did not yet try to reconfigure the keyboard. Knowing meanwhile different other expansions may add more key functions that might again collide I decided not to touch some areas of the game.
But what would help a lot were an overview graphics. Which are the keys and what do they mean?
The table I found on the wiki is of little help if the keyboard is controlled with make/break codes but the keys are labelled with characters. Yet the make/break codes vary by keyboard layout, not by configured locale so the variations are limited.
My understanding is that expansions cannot add key functions (the game code rules it out), but must use the N,n,b & MFD key-presses.

As for the overview graphics, I think that Keyboard Config might give you that - unless you would prefer Clym Angus's (old) 2009 overlays:
Or unless you have made a fortune on bitcoin and want to splurge on a buttonbox: http://wiki.alioth.net/index.php/Buttonboxes
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte
hiran
---- E L I T E ----
---- E L I T E ----
Posts: 441
Joined: Fri Mar 26, 2021 1:39 pm
Location: Munich, Bavaria

Re: Changing Key Mappings?

Post by hiran »

Cholmondely wrote: Sun May 02, 2021 1:34 pm My understanding is that expansions cannot add key functions (the game code rules it out), but must use the N,n,b & MFD key-presses.
That makes it a lot easier for me. :-)
Cholmondely wrote: Sun May 02, 2021 1:34 pmAs for the overview graphics, I think that Keyboard Config might give you that - unless you would prefer Clym Angus's (old) 2009 overlays:
That looks very helpful. I do have exactly that keyboard layout. Albeit it is not complete.
It does not cover the yaw buttons. I am not sure whether they have been introduced later only.
Would it make sense if the Oolite wiki contained one that is authorative and up to date for Oolite? I created something with LibreOffice that could be used as base for the cheat sheet or other documentation: https://app.box.com/s/tg143o5ma6zkwyei0jfzgcgyij6vf2bd
Last edited by hiran on Sun May 02, 2021 8:30 pm, edited 1 time in total.
I have not failed. I've just found 10,000 ways that won't work. [Thomas Edison]
User avatar
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 1368
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of Her Most Britannic Majesty
Contact:

Re: Changing Key Mappings?

Post by Cholmondely »

Clym was using one of the older Mac keyboards.

Please, whatever you can contribute is good! Maik probably has a german keyboard too. Ditto for tsoj.
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte
Post Reply