[0.13.10] - Some controls are not cross-compatible

This subforum contains all the issues which we already resolved.
ZereoX
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Jun 28, 2016 5:43 am
Contact:

[0.13.10] - Some controls are not cross-compatible

Post 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:
  1. Launch Steam on a Linux operating system.
  2. Lauch Factorio.
  3. Once the game is loaded, select Options-> Controls -> Reset -> OK (Pop-up modal).
  4. Launch Steam on a Windows operating system.
  5. Wait for Steam to sync.
  6. Launch Factorio.
  7. 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
Attachments
In-game Linux with Windows Default
In-game Linux with Windows Default
Linux with Windows Default.jpg (607.33 KiB) Viewed 7880 times
In-game Linux Default
In-game Linux Default
Linux Default.jpg (607.01 KiB) Viewed 7880 times
Linux with Windows Config.log
Log file of Factorio on Linux attempting to open a Windows Config.ini
(2.19 KiB) Downloaded 309 times
Windows Default.ini
Config.ini with Default Windows Controls
(5.14 KiB) Downloaded 335 times
Linux Default.ini
Config.ini with Default Linux Controls
(5.15 KiB) Downloaded 305 times
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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)
quick links: log file | graphical issues | wiki
m44v
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sun May 15, 2016 8:55 pm
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
ZereoX
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Jun 28, 2016 5:43 am
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
m44v
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sun May 15, 2016 8:55 pm
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5267
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post by Klonan »

Thank you for the reports,

We will try to solve these keybinding translation issues
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post by kovarex »

Ok, I made another tweak in the conversions, lets see how it works in 0.14.6
cogwheel
Inserter
Inserter
Posts: 32
Joined: Sun Aug 09, 2015 5:51 pm
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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
factorio_bindings_windows_bad.png (756.58 KiB) Viewed 7496 times
Windows good:
factorio_bindings_windows_good.png
factorio_bindings_windows_good.png (720.08 KiB) Viewed 7496 times
Linux good:
factorio_bindings_linux_good.png
factorio_bindings_linux_good.png (646.99 KiB) Viewed 7496 times
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
cogwheel
Inserter
Inserter
Posts: 32
Joined: Sun Aug 09, 2015 5:51 pm
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 295
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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?
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!
cogwheel
Inserter
Inserter
Posts: 32
Joined: Sun Aug 09, 2015 5:51 pm
Contact:

Re: [0.13.10] - Some controls are not cross-compatible

Post 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.
Post Reply

Return to “Resolved Problems and Bugs”