Page 1 of 1
Built in keymapping feature?
Posted: Thu Feb 16, 2006 9:26 pm
by Jabbro
I was thinking that something added to the Options menu when docked, that could allow a player to change mapped keys from inside the game would be nice. This would greatly help players, such as myself that are predisposed to a previous control confguration (such as the C64/Amiga settings).
Posted: Sun Feb 19, 2006 12:05 pm
by Wiggy
The keyconfig.plist file for key controls is editable, and there is a utility for creating a new plist file that comes with Oolite.
Posted: Sun Feb 19, 2006 1:13 pm
by Rxke
It still would add another layer of polish if you could indeed access that functionality in-game, though... But I guess this one seemingly simple addition could cause some headaches to make it cross-compatible *and* take into account the gazillion existing keyboard-layouts out there...
Posted: Sun Feb 19, 2006 1:53 pm
by JensAyton
Doing it in-game is primarily hampered by the fact that Oolite’s text handling can’t handle non-ASCII text… apart from some esoteric stuff like ? which we added for GrowlTunes. :-) Fixing this has been on my “to look into seriously at some point in the abstract future” list.
The other option is to do it in a standard dialog box. This would only work on Mac OS X. I happen to have written a pretty good library for the non-trivial task of getting suitable text for just about any keypress with any keyboard layout. Unfortunately, making a good control for using it in configuration dialogues in Cocoa has proven difficult due to certain optimisations in Cocoa’s handling of text fields. :-/
Posted: Tue Mar 21, 2006 2:22 am
by hwtan
My question is only partially related to this topic. While I am using Oolite-PC, I am unable to use the key "," and "." for left and right roll to work after editing the keyconfig file. To my finding, they should be 44 and 46 respectively, but they don't work on my win XP.
Any help out there?
Posted: Tue Mar 21, 2006 3:13 am
by dajt
hwtan wrote:My question is only partially related to this topic. While I am using Oolite-PC, I am unable to use the key "," and "." for left and right roll to work after editing the keyconfig file. To my finding, they should be 44 and 46 respectively, but they don't work on my win XP.
Any help out there?
The Linux and Windows ports only have support for the standard key mappings.
In order for this to change, someone has to go into the SDL version of MyOpenGLView and add all the keys into the keyup and keydown case statements.
It isn't hard, but none of the Linux/Windows coders has wanted to remap their keys badly enough to do it!
This is why the target memory wasn't working to begin with. The case statements were ignoring the +, -, and = keys.
Posted: Tue Mar 21, 2006 9:55 am
by winston
With some effort (fixes dajt mentioned, plus additions ahruman mentioned, then adding an OOgui screen similar to the Joystick Setup screen) it could be done.
Which reminds me - the OOgui screen for joystick setup could do with a second page for all the new features which might be nice to assign to joystick buttons and axes.
Posted: Fri Mar 31, 2006 9:23 pm
by Recluse
Is there a file I could look in to see what keys are recognized? I want to remap the movement keys to the more-familiar wasd. I keep jettisoning cargo unintentionaly...
Posted: Sat Apr 01, 2006 5:35 pm
by JensAyton
Keyconfig.plist. Where it is is platform-dependant. You can probably put a copy in the AddOns folder where OXPs live.
Posted: Sat Apr 01, 2006 7:25 pm
by Murgh
Ahruman wrote:Keyconfig.plist. Where it is is platform-dependant. You can probably put a copy in the AddOns folder where OXPs live.
is it so in Linux and PC too, that this then has to be inside a folder named Config?
Posted: Sat Apr 01, 2006 9:11 pm
by dajt
I tried to look at this today, but I cannot find a list of Macintosh key codes anywhere on the net, using google at least!
The way it works is the SDL keycodes are translated to Macintosh keycodes, which is why I need the Mac ones.
So can someone please either post a link to a site with the Mac key codes (e.g. 'a' = 97), or send me a list?
The keys that seem to be missing that people really want at present are , . / [ ]. I was thinking of adding support for pgup, pgdn, end, ins, and del too.
Alternatively, winston can do this change given he has a Mac so can find the Mac codes easily ;)
Posted: Sat Apr 01, 2006 9:34 pm
by aegidian
The standard alphanumerics are all ASCII based.
Then MyOpenGLView does some more translating to get these:
Code: Select all
gvArrowKeyUp = 255,
gvArrowKeyDown = 254,
gvArrowKeyLeft = 253,
gvArrowKeyRight = 252,
gvFunctionKey1 = 241,
gvFunctionKey2 = 242,
gvFunctionKey3 = 243,
gvFunctionKey4 = 244,
gvFunctionKey5 = 245,
gvFunctionKey6 = 246,
gvFunctionKey7 = 247,
gvFunctionKey8 = 248,
gvFunctionKey9 = 249,
gvFunctionKey10 = 250,
gvFunctionKey11 = 251,
gvMouseLeftButton = 301,
gvMouseDoubleClick = 303,
gvHomeKey = 302,
gvNumberKey0 = 48,
gvNumberKey1 = 49,
gvNumberKey2 = 50,
gvNumberKey3 = 51,
gvNumberKey4 = 52,
gvNumberKey5 = 53,
gvNumberKey6 = 54,
gvNumberKey7 = 55,
gvNumberKey8 = 56,
gvNumberKey9 = 57
I dunno if that helps?