Built in keymapping feature?
Moderators: winston, another_commander
Built in keymapping feature?
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).
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
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. :-/
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. :-/
E-mail: [email protected]
-
- Quite Grand Sub-Admiral
- Posts: 364
- Joined: Tue Aug 17, 2004 7:05 am
- Location: Orange, NSW, Australia
The Linux and Windows ports only have support for the standard key mappings.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?
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.
Regards,
David Taylor.
David Taylor.
- winston
- Pirate
- Posts: 731
- Joined: Mon Sep 27, 2004 10:21 pm
- Location: Port St. Mary, Isle of Man
- Contact:
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.
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.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Keyconfig.plist. Where it is is platform-dependant. You can probably put a copy in the AddOns folder where OXPs live.
E-mail: [email protected]
-
- Quite Grand Sub-Admiral
- Posts: 364
- Joined: Tue Aug 17, 2004 7:05 am
- Location: Orange, NSW, Australia
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 ;)
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 ;)
Regards,
David Taylor.
David Taylor.
- aegidian
- Master and Commander
- Posts: 1161
- Joined: Thu May 20, 2004 10:46 pm
- Location: London UK
- Contact:
The standard alphanumerics are all ASCII based.
Then MyOpenGLView does some more translating to get these:
I dunno if that helps?
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