I game on both Windows and Linux, sharing my current save via Steam syncing. I've noticed that when I switch from one to the other (doesn't matter which) a few of the keybindings break. The most important being enter/leave vehicle. It always gets set to a red unknown value.
Screenshot of the most recent Windows -> Linux transition:
I haven't customized any settings. Everything setting is stock.
[0.12.x Steam] [kovarex] Keybindings when switching operating system
Re: Keybindings when switching operating system
Thanks for the report,
Seems like it could be a big problem moving forward
Seems like it could be a big problem moving forward
Re: [0.12.x Steam] Keybindings when switching operating system
Here's a screen shot of a Linux -> Windows transition:
One thing I noticed was "show info." On Linux, it seems that the ALT keys show up separately. I use the left alt key in both operating systems. On Linux, Factorio shows the keybinding as ALT_L, but in Widows, it's just ALT. It may be a similar problem with enter/leave vehicle. If I remember correctly, it shows up as RETURN in Linux, but looking at Windows right now, it's ENTER. (That could be wrong. I didn't double check Linux.) (It's probably the same with the Lua console where SHIFT_L + ` is interferring with Windows' SHIFT + `.
I won't speculate too much about the input handling since I obviously don't have the source code. Nonetheless, perhaps there's a more generic representation of these keys available in your libraries that would treat ALT, ALT_L, and ALT_R the same and similarly for ENTER and RETURN.
One thing I noticed was "show info." On Linux, it seems that the ALT keys show up separately. I use the left alt key in both operating systems. On Linux, Factorio shows the keybinding as ALT_L, but in Widows, it's just ALT. It may be a similar problem with enter/leave vehicle. If I remember correctly, it shows up as RETURN in Linux, but looking at Windows right now, it's ENTER. (That could be wrong. I didn't double check Linux.) (It's probably the same with the Lua console where SHIFT_L + ` is interferring with Windows' SHIFT + `.
I won't speculate too much about the input handling since I obviously don't have the source code. Nonetheless, perhaps there's a more generic representation of these keys available in your libraries that would treat ALT, ALT_L, and ALT_R the same and similarly for ENTER and RETURN.
Re: [0.12.x Steam] Keybindings when switching operating system
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
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)
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
Re: [0.12.x Steam] [kovarex] Keybindings when switching operating system
Here's my config in Linux after getting the keys fixed.
When I switched back to Linux today, I noticed that the Lua console binding wasn't broken, which was a little surprising. The only two with problems were RETURN and ALT_L, and it sounds like your patch covers that perfectly.
Thanks so much for looking into this. It's not a major problem by any stretch, but I'm really thankful how seriously you take the quality.
I doubt this is important, but worth mentioning that I'm using a US QWERTY keyboard with standard "us" layout (reported by setxkbmap).
Config
Turns out I was wrong about SHIFT_L; it's always just SHIFT. I was right about ENTER/RETURN, though.When I switched back to Linux today, I noticed that the Lua console binding wasn't broken, which was a little surprising. The only two with problems were RETURN and ALT_L, and it sounds like your patch covers that perfectly.
Thanks so much for looking into this. It's not a major problem by any stretch, but I'm really thankful how seriously you take the quality.
I doubt this is important, but worth mentioning that I'm using a US QWERTY keyboard with standard "us" layout (reported by setxkbmap).
Last edited by daniel34 on Wed Apr 27, 2016 4:09 pm, edited 1 time in total.
Reason: fixed config code spoiler
Reason: fixed config code spoiler