Page 1 of 1
[0.13.10] - Some controls are not cross-compatible
Posted: Sat Jul 23, 2016 5:39 pm
by ZereoX
Summary:
Default control configurations are not properly supported across different operating systems.
The following controls break:
Setting |
Windows Shortcut |
Linux Shortcut
Show info |
ALT |
Alt_L
Enter/Leave vehicle |
ENTER |
Return
Larger terrain building area |
PAD - |
KP_Add
Smaller terrain building area |
PAD + |
KP_Substract
Steps to Reproduce:
- Launch Steam on a Linux operating system.
- Lauch Factorio.
- Once the game is loaded, select Options-> Controls -> Reset -> OK (Pop-up modal).
- Launch Steam on a Windows operating system.
- Wait for Steam to sync.
- Launch Factorio.
- Once the game is loaded, select Options-> Controls and observe some settings are now set to Unknown.
Notes:
- Issue will also occur if Windows default controls are loaded into Linux.
- These or other controls might break under OSX / macOS. I do currently have access to one for testing.
Attachments:
Game Log
Linux Config.ini
Windows Config.ini
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Sat Jul 23, 2016 5:56 pm
by daniel34
Related:
[0.12.x Steam] [kovarex] Keybindings when switching operating system
kovarex wrote:They keys are defined by the system, so there isn't easy general solution.
I made a translation table to standardize some of the key codes, I added
Code: Select all
RETURN->ENTER
ALT_L->ALT
ALT_R->ALT
If you give me more info (the config after saving the keys in linux would help. I can put more values there. (Like the numpad +/- or the console key)
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Sat Jul 23, 2016 8:21 pm
by m44v
The controls shouldn't be cross-compatible, you can't assume that keys that are available in one OS will be in the rest. For example, the ALT key in the majority of Linuxes is used for drag an application's window, in Ubuntu ALT brings its HUD up, so you have to bind it to something else. Factorio should have different defaults for each system.
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Sun Jul 24, 2016 1:25 am
by ZereoX
m44v wrote:The controls shouldn't be cross-compatible, you can't assume that keys that are available in one OS will be in the rest. For example, the ALT key in the majority of Linuxes is used for drag an application's window, in Ubuntu ALT brings its HUD up, so you have to bind it to something else. Factorio should have different defaults for each system.
The problem is not the keys assigned, but rather the definition of the keys assigned by the system. As mentioned in the post above by
daniel34, the default controls are assume to be the same keys (as they should), but they are not defined the same. This causes issue when the game is looking in the config file to assign a key to a command. As implied in my post: "ENTER" is what Windows uses to interpret the Enter key so when it sees "Return" is doesn't know what key to assign as "Return" is what many Linux distribution uses for the Enter key.
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Sun Jul 24, 2016 2:53 am
by m44v
The problem is not the keys assigned, but rather the definition of the keys assigned by the system.
What I did was just add another issue of trying to have the same key configuration across OSes, the definitions are different and the assignments also can be different. Mapping Enter to Return and vice versa is a hack that can get ugly quickly since pretty much every key that isn't a character has a different definition: SHIFT_L vs LSHIFT, SUPER_L vs LWIN, CAPS_LOCK vs CAPSLOCK, the keypad keys, etc.
These OS specific configurations shouldn't be sync across or alternatively saved separately so you don't have to fix your bindings whenever you switch OSes.
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Mon Jul 25, 2016 10:06 am
by Klonan
Thank you for the reports,
We will try to solve these keybinding translation issues
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Mon Jul 25, 2016 10:18 am
by BlakeMW
m44v wrote:The controls shouldn't be cross-compatible, you can't assume that keys that are available in one OS will be in the rest. For example, the ALT key in the majority of Linuxes is used for drag an application's window, in Ubuntu ALT brings its HUD up, so you have to bind it to something else. Factorio should have different defaults for each system.
Indeed. I rebound from L_ALT to R_ALT because on Ubuntu only L_ALT brings up the HUD.
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Sun Sep 11, 2016 5:42 pm
by kovarex
Ok, I made another tweak in the conversions, lets see how it works in 0.14.6
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Thu Oct 06, 2016 8:37 pm
by cogwheel
I'm now on 0.14.9 and still having this issue. Because I'm on Dvorak, the positions of QWE and Z are apostrophe, comma, period, and semicolon, respectively. On Windows these show up as KEY69, KEY72, KEY73, and KEY68. On linux they show up as APOSTROPHE, COMMA, PERIOD, and SEMICOLON.
Besides regular ascii characters there are several other broken ones:
ENTER on windows becomes RETURN on linux
PAD 8 on windows becomes KP_UP on linux, regardless of whether NUMLOCK is on
PAD + on windows becomes KP_ADD on linux
PAD - on windows becomes KP_SUBTRACT on linux
ALT on windows becomes ALT_L on linux
I imagine all of the other numpad keys and non-alpha characters are similarly broken, but I haven't checked. See the screenshots below:
Bad (to hilghight the problems):
- factorio_bindings_windows_bad.png (756.58 KiB) Viewed 7495 times
Windows good:
- factorio_bindings_windows_good.png (720.08 KiB) Viewed 7495 times
Linux good:
- factorio_bindings_linux_good.png (646.99 KiB) Viewed 7495 times
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Wed Oct 19, 2016 5:50 pm
by kovarex
I'm afraid that there are too many different keyboards with different setups and we could do this forever.
It might be solved by having control settings configurations that can be switched, but It doesn't seem to be worth it.
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Tue Oct 25, 2016 5:56 pm
by cogwheel
What about a toggle to store keyboard shortcuts locally instead of to the steam cloud?
The problem isn't that the bindings are different, it's that they get overwritten when switching between systems.
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Wed Nov 09, 2016 8:11 am
by <NO_NAME>
Problem still exists in Factorio 14.19.
I agree that control settings should not be synchronized. Why do we need a function that does not work and only breaks key binding?
Re: [0.13.10] - Some controls are not cross-compatible
Posted: Sat Nov 26, 2016 10:42 pm
by cogwheel
Exactly. If you're not going to make them compatible then at the very least they shouldn't get broken every time we switch systems.