Keyboard configuration

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
kcallis
Dangerous
Dangerous
Posts: 86
Joined: Sun Jan 25, 2009 2:45 pm
Location: N. Little Rock, AR
Contact:

Keyboard configuration

Post by kcallis »

I attempted to use the left control key and the left ALT key to handle yaw movement (replacing , and .). I also tried to set the space bar to replace A for laser firing. So far, this has not worked and I am at a loss for what is going wrong.
Has anyone been successful with changing their keyboard keys? Please let me on on the secret!!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6740
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Can you please post the contents of your keyconfig.plist?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

And, perhaps even more important, the whereabouts of the keyconfig.plist.

There is one inside the game, but you'd better leave that untouched. Instead, c&p it into a folder named 'Config' inside your 'AddOns' folder. If it doesn't yet exist, create it. This is the plist you should change. It will overwrite the plist inside Oolite itself.

Therefore, if you have changed the plist inside Oolite itself and there happens to be another keyconfig.plist already in the AddOns/Config folder (I am not familiar with the contents of the Linux distribution), it would have overwritten your changes.

Oh, and whenever you change the content of any plist, you have to clear Oolite's cache when restarting the application, or else it will use the old, unchanged content from its cache. Holding SHIFT while starting Oolite should clear the cache in Linux as well. (You can see it in the logfile, although I can't tell you where you find that in Linux.)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
Oh, and whenever you change the content of any plist, you have to clear Oolite's cache when restarting the application, or else it will use the old, unchanged content from its cache.
Actually, that’s not true for keyconfig.plist (or, more obscurely, debugConfig.plist).
User avatar
kcallis
Dangerous
Dangerous
Posts: 86
Joined: Sun Jan 25, 2009 2:45 pm
Location: N. Little Rock, AR
Contact:

Post by kcallis »

Commander McLane wrote:
And, perhaps even more important, the whereabouts of the keyconfig.plist.

There is one inside the game, but you'd better leave that untouched. Instead, c&p it into a folder named 'Config' inside your 'AddOns' folder. If it doesn't yet exist, create it. This is the plist you should change. It will overwrite the plist inside Oolite itself.

Therefore, if you have changed the plist inside Oolite itself and there happens to be another keyconfig.plist already in the AddOns/Config folder (I am not familiar with the contents of the Linux distribution), it would have overwritten your changes.

Oh, and whenever you change the content of any plist, you have to clear Oolite's cache when restarting the application, or else it will use the old, unchanged content from its cache. Holding SHIFT while starting Oolite should clear the cache in Linux as well. (You can see it in the logfile, although I can't tell you where you find that in Linux.)
The keyconfig.plist is located in my hone directory ~/.Oolite/AddOns/Config and the following is my keyconfig.plist. All the standard key are standard, with the exception of these keys:

{
key_yaw_left=058;
key_yaw_right=056;
key_fire_lasers= 057;
}

I am using 058 for the replacement of the , key, because I have the keyboard set in such a way that the control key is swapped for the CAP Lock. IN theory, this should work, but instead, none of the keys (the one that I changed work, nor does the default keys).[/b]
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6740
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I am not entirely sure how this would work with Linux, but after having a look at the code and doing some tests on Windows, I don't think you can assign the Ctrl and Alt keys as game keys at this moment. For firing lasers with space, however, you just need to put key_fire_lasers = " "; (one space between the double quotes) in keyconfig.plist and that should do it.
Post Reply