Page 2 of 2

Posted: Sun Apr 08, 2007 7:09 pm
by JensAyton
I have solved the tab key thing. It’s not a Mac-specific issue per se; it’s the default plist included in the AddOns folder with the Mac distribution.

It’s like this:
  • This version of keyconfig.plist is in the text-based format, not XML.
  • The text-based property list format has no way of representing numbers; numerals are treated as strings.
  • Oolite’s key set-up code deliberately looks for single-digit strings and treats them as key names rather than numbers.
Throw away that keyconfig.plist and it’ll work right. (If you want a non-broken one as a template, control-click Oolite, open Contents, open Resources, open Config; there is an XML version of keyconfig.plist there.)

Posted: Tue Apr 10, 2007 6:10 am
by Commander McLane
Thanks for solving the keyboard-issue, Ahruman!

I followed your advice and replaced the list in the addons-folder with a copy of the list from Oolite itself, only changing the keys I had changed before in the process.

Anyway I noticed that the original text-based-list in the addons-folder contained two keys that were not in the XML-list in Oolite, namely key_cloaking_device and key_contract_info. I added them to the list which is now in my addons-folder.

But what I'd like to know: Are they defined somewhere else as well? Or what would happen if a player just throws away the list in the addons-folder? Would he still be able to use these two functions?

Another small oddity: All key-definitions in the XML-list in Oolite itself are defined by their ASCII-codes, except the external view, which is defined as:

Code: Select all

	<key>key_custom_view</key>
	<string>v</string>
Obviously that works, but for the sake of unification perhaps in the next distribution it should be:

Code: Select all

	<key>key_custom_view</key>
	<string>118</string>
(I am referring to Oolite Mac 1.65 as my current version.)

Posted: Tue Apr 10, 2007 8:27 am
by JensAyton
Commander McLane wrote:
But what I'd like to know: Are they defined somewhere else as well? Or what would happen if a player just throws away the list in the addons-folder? Would he still be able to use these two functions?
Yes, defaults are set up in code.

Edit: it’s possible to use "\t" to specify tab in text-format plists. In future versions, 09 will also work.

I’ve generated a new, readable keyconfig.plist from the defaults used in code. It should work with existing versions.

Code: Select all

key_roll_left               = 253;      // left arrow
key_roll_right              = 252;      // right arrow
key_pitch_forward           = 255;      // up arrow
key_pitch_back              = 254;      // down arrow
key_yaw_left                = ",";
key_yaw_right               = ".";

key_increase_speed          = "w";
key_decrease_speed          = "s";
key_inject_fuel             = "i";

key_fire_lasers             = "a";
key_launch_missile          = "m";
key_next_missile            = "y";
key_ecm                     = "e";

key_target_missile          = "t";
key_untarget_missile        = "u";
key_ident_system            = "r";

key_scanner_zoom            = "z";
key_scanner_unzoom          = "Z";

key_launch_escapepod        = 27;       // escape
key_energy_bomb             = "\t";     // tab

key_galactic_hyperspace     = "g";
key_hyperspace              = "h";
key_jumpdrive               = "j";

key_dump_cargo              = "d";
key_rotate_cargo            = "R";

key_autopilot               = "c";
key_autopilot_target        = "C";
key_autodock                = "D";

key_snapshot                = "*";
key_docking_music           = "s";

kay_advanced_nav_array      = "!";
key_map_home                = 302;       // Home
key_map_info                = "i";

key_pausebutton             = "p";
key_show_fps                = "F";
key_mouse_control           = "M";

key_comms_log               = "`";
key_next_compass_mode       = "\";

key_cloaking_device         = "0";

key_contract_info           = "?";

key_next_target             = "+";
key_previous_target         = "-";

key_custom_view             = "v";

// key_dump_target_state    = "H";