Changing Key Mappings?

News and discussion of the PC port of Oolite.

Moderators: another_commander, winston

Post Reply
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
Commodore
Commodore
Posts: 2675
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: 361
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
Commodore
Commodore
Posts: 2675
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: 13888
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.
A squid eating dough in a polyethylene bag is fast and bulbous! Got me?

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: 5638
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: 361
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: 1507
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!

Post Reply