For test results, bug reports, announcements of new builds etc.
Moderators: winston , another_commander , Getafix
commander_STyx2909
Dangerous
Posts: 77 Joined: Sun Dec 13, 2020 1:22 pm
Post
by commander_STyx2909 » Sun Dec 13, 2020 1:49 pm
On Ubuntu 18.04, I have spent more than 48 hours troubleshooting keyboard switch to keyboardconfig.plist (?). It is surprisingly erratic.
I don't know what to think. I have yet tests to perform, but in many cases, neither numeric code i.e "38" or character chain i.e "&" is working... Very, very strange. No way to assign Front View key (which is "&" on our layout).
Many others to follow, I will report progress here.
While working on this I cleaned up the keyboardconfig.plist a bit and added many comments to make it readable quickly.
Asus K61ic, 4Gb RAM, Nvidia GT220M (1Gb VRAM), OpenGL renderer version: 3.3.0 ("3.3.0 NVIDIA 340.108").
Ubuntu 20.06 .
commander_STyx2909
Dangerous
Posts: 77 Joined: Sun Dec 13, 2020 1:22 pm
Post
by commander_STyx2909 » Sun Dec 13, 2020 3:21 pm
Definitely running into troubles.
Code: Select all
// French keyboard version with numpad for Oolite 1.90 by STyx2909
{
//all maneuverability commands deported to NUMPAD
key_roll_left = 314; //numpad 4
key_roll_right = 316; //numpad 6
key_pitch_forward = 318; //numpad 8
key_pitch_back = 312; //numpad 2
key_yaw_left = 317; //numpad 7
key_yaw_right = 319; //numpad 9
/* alternative with arrow keys
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 = ":";
*/
//Fixing view and GUI screens for French Keyboards... => no way 8-/
key_view_forward = "1"; //launch from dock, value '38' and "&" don't work 8-/
key_view_aft = "2"; //save and quit menu when paused or docked, "é" doesn't work 8-/
key_view_port = "3"; //Ship outfitting once docked, value '34' doesn't work, obviously """ as well ;-) 8-/
key_view_starboard = "4"; //Ship and system interfaces once docked, value '39' works! 8-D
key_gui_screen_status = "5"; //Commander's status, "(" and value '40' don't work 8-/
key_gui_chart_screens = "6"; //Galactic chart, "-" works! 8-D
key_gui_system_data = "7"; //Selected planet's Data, "è" doesn't work 8-/
key_gui_market = "8"; //Commodity market, "_" and value '95' don't work. 8-/
key_gui_arrow_left = 253;
key_gui_arrow_right = 252;
key_gui_arrow_up = 255;
key_gui_arrow_down = 254;
/* alternative settings to use numpad instead
key_gui_arrow_left = 314; //numpad 4
key_gui_arrow_right = 316; //numpad 6
key_gui_arrow_up = 318; //numpad 8
key_gui_arrow_down = 312; //numpad 2
*/
key_increase_speed = "q"; //was "w"
key_decrease_speed = "w"; //was "s"
key_inject_fuel = "i";
key_fire_lasers = 32; //spacebar, was "a"
key_weapons_online_toggle = 310; //numpad 0, was "_" (existing on French keyboard directly but doesn't work)
key_launch_missile = "x"; //was "m"
key_next_missile = "m"; //was "y"
key_ecm = "e";
key_prime_equipment = "N";
key_activate_equipment = "n";
key_mode_equipment = "b";
key_fastactivate_equipment_a = "a"; //was "0", untested
key_fastactivate_equipment_b = "\t"; //TAB, value '9' doesn't work (display wrong in key configuration display) and untested
key_target_incoming_missile = "T";
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 (hit twice to eject)
// now primable equipment; old key works for compatibility
// 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"; //autopilot is a confusing name. It is a docking feature in fact
key_autodock = "C";
key_docking_clearance_request = "L";
key_snapshot = "*"; //can be coupled with key for lasers or missiles for fun ;-), working from NUMPAD not from standard keyboard... 8-/
key_docking_music = 304; //END, was "s";
key_advanced_nav_array = "="; //was "^", untested yet
key_map_home = 303; //HOME
key_map_info = "i";
key_pausebutton = "p";
key_show_fps = "F";
key_mouse_control = "M";
key_hud_toggle = "o";
key_comms_log = 251; //F11, was "`"; value '8', /b", '²' (top left key under ESC and left of '1'), NUMPAD "/" and F11 are not working 8-/
key_prev_compass_mode = 308; //PAGEDOWN, was "|";
key_next_compass_mode = 307; //PAGEUP, "\\";
// now primable equipment; old key works for compatibility
// key_cloaking_device = "0";
// in 1.76 switches between contracts and long range chart
// in 1.77 to 1.78 does nothing
// in 1.79 or later, cycles long range chart highlight mode
// key_contract_info = "?"; // old name works for compatibility
key_chart_highlight = "!"; //only available with shift+',' and doesn't work, untested yet
key_market_filter_cycle = "!"; //was "?";
key_market_sorter_cycle = ":"; //was "/";
key_cycle_mfd = ","; //was ";"
key_switch_mfd = ";"; //was ":"
key_next_target = 249; //F9, was "+", "!" and F9 are not working 8-/
key_previous_target = 250; //F10, was "-", ":" and F10 are not working 8-/
key_custom_view = "v";
key_dump_target_state = "H";
key_oxzmanager_setfilter = "f";
key_oxzmanager_showinfo = "i";
key_oxzmanager_extract = "x";
key_inc_field_of_view = "l";
key_dec_field_of_view = "k";
}
Asus K61ic, 4Gb RAM, Nvidia GT220M (1Gb VRAM), OpenGL renderer version: 3.3.0 ("3.3.0 NVIDIA 340.108").
Ubuntu 20.06 .
another_commander
Quite Grand Sub-Admiral
Posts: 6775 Joined: Wed Feb 28, 2007 7:54 am
Post
by another_commander » Sun Dec 13, 2020 3:40 pm
The problem with foreign keyboard layouts is known for ages and it is not so much an Oolite issue, rather than an SDL 1.2.x one. All keyboards are treated as if they were US layout and you will find quite a few projects using SDL that have similar inconveniences.
Using SDL 1.2.x's unicode inputs seems to help, but unfortunately unicode inputs recognize only keydown events and not keyup ones. Getting this to work properly may not be impossible, but it is not straightforward either.
commander_STyx2909
Dangerous
Posts: 77 Joined: Sun Dec 13, 2020 1:22 pm
Post
by commander_STyx2909 » Sun Dec 13, 2020 8:05 pm
Thank you, unfortunately, not. It really looks like some keymaps can't get configurated at all. I have not tried in strict mode though.
Asus K61ic, 4Gb RAM, Nvidia GT220M (1Gb VRAM), OpenGL renderer version: 3.3.0 ("3.3.0 NVIDIA 340.108").
Ubuntu 20.06 .