Keybinding issues (when remapping keys in OS)
Re: Keybinding issues
I am a using the BÉPO keyboard layout, a Dvorak-inspired layout for French. I play on Ubuntu 18.10.
Today I wanted to use an external blueprint, but the usual keyboard shortcuts for pasting didn't work. I tried both CTRL+V and SHIFT+Insert.
I then tried CTRL+., which matches the QWERTY CTRL+V and it works… however it pastes the text TWICE – it took me a moment to understand why blueprints were not accepted (except one for some reason). Similarly, I can cut with CTRL+Y and copy with CTRL+X.
I reproduced the issue with the save dialog, the “LAN player name” field in Other settings and the search item field (in the key bindings screen). This is of course mostly annoying for blueprint strings.
Note that in game, CTRL+Insert and SHIFT+Insert work fine for copy/pasting as I configured them as secondary bindings. These usually have the advantage of being layout independent and my keyboard allows to easily make this combination.
I tried restarting the game with the AZERTY layout and I don't have the problem. However if I then switch to BÉPO while the game is running, pressing CTRL+. now pastes once but also adds the dot.
As a side note, you can probably also reset the key bindings when upgrading to 0.17 for people with a BÉPO layout – it was completely messed up for me with even some Unknown key bindings.
Today I wanted to use an external blueprint, but the usual keyboard shortcuts for pasting didn't work. I tried both CTRL+V and SHIFT+Insert.
I then tried CTRL+., which matches the QWERTY CTRL+V and it works… however it pastes the text TWICE – it took me a moment to understand why blueprints were not accepted (except one for some reason). Similarly, I can cut with CTRL+Y and copy with CTRL+X.
I reproduced the issue with the save dialog, the “LAN player name” field in Other settings and the search item field (in the key bindings screen). This is of course mostly annoying for blueprint strings.
Note that in game, CTRL+Insert and SHIFT+Insert work fine for copy/pasting as I configured them as secondary bindings. These usually have the advantage of being layout independent and my keyboard allows to easily make this combination.
I tried restarting the game with the AZERTY layout and I don't have the problem. However if I then switch to BÉPO while the game is running, pressing CTRL+. now pastes once but also adds the dot.
As a side note, you can probably also reset the key bindings when upgrading to 0.17 for people with a BÉPO layout – it was completely messed up for me with even some Unknown key bindings.
Re: Keybinding issues
You probably assigned a scroll movement to some other action. I had the same issue when I started playing the intro campaign (couldn't zoom out) and it took me a lot of time to figure out that it was assigned to undo (also causing other troubles…). The thing is… there is a scrollbar in the keybinding screen, and it could happen that you just intended to scroll the screen, but assigned scrolling (either direction) to a random action.
I think the UI would benefit from some improvements there: maybe rearrange it to avoid having a scrollbar, or show a confirmation dialog when you assign scroll/click/esc/delete/backspace/enter to a key.
Re: Keybinding issues
Hello posila, I feel like my previous comment about the issue with copy/pasting has been unnoticed. Should I have reported it in a new topic? I had understood you wanted to track all such issues here:
Re: Keybinding issues
No, it seems to be an issue of shortcuts not respecting your layout when typing into text boxes ... which is related to this topic.
Re: Keybinding issues (when remapping keys in OS)
I'm one of the people who remaps their Caps Lock to Control, too, and with v0.17 this is no longer honored. It wouldn't be such a big deal if one could reconfigure that in settings, but it seems Caps Lock isn't permitted as a modifier and therefore hitting "Caps+C" doesn't seem to register and just leaves "C" there.
(On Linux here and remapped Ctrl both via Xmodmap and xkbmap `ctrl:nocaps`)
(On Linux here and remapped Ctrl both via Xmodmap and xkbmap `ctrl:nocaps`)
Last edited by m811 on Sun Apr 07, 2019 1:56 am, edited 1 time in total.
Re: Keybinding issues (when remapping keys in OS)
Most if not all problems people are having can be fixed by using Autohotkey. Because I have problems on my mouse using the middle mouse button, I was able to remap an unused key combination to the middle mouse button so I could use the new quickbar easier.
In doing that, I found that some of the default key mappings, such as 'm' for activating the map, prevent me from assigning Ctrl-m shift-m or Alt-m to anything else. Using them always brings up the map. Is this an intended result of the changes or a bug? (There are many more keys that are set up by default in Factorio that have this issue. We are running out of keys to use for our mods.)
(I, as some others have re-assigned the Alt key to the letter 'i' and more recently the mostly unused scroll lock key. I fail to see the logic in using a key that many of us have used for years as an alternate shift key for something totally different. Sorry for the rant.)
In doing that, I found that some of the default key mappings, such as 'm' for activating the map, prevent me from assigning Ctrl-m shift-m or Alt-m to anything else. Using them always brings up the map. Is this an intended result of the changes or a bug? (There are many more keys that are set up by default in Factorio that have this issue. We are running out of keys to use for our mods.)
(I, as some others have re-assigned the Alt key to the letter 'i' and more recently the mostly unused scroll lock key. I fail to see the logic in using a key that many of us have used for years as an alternate shift key for something totally different. Sorry for the rant.)
Re: Keybinding issues
FYI, the issue is still present in 0.17.25. I also spent some time to check what happens on Windows. There the keyboard layout is not respected either for copy/paste in text boxes (one has to use CTRL+Y for cut, CTRL+X for copy and CTRL+. for paste as well), but the "double paste" issue is not present. I also checked with US-Dvorak layout and the behaviour is the same (use CTRL+QJK instead of XCV).LFarquaad wrote: ↑Sun Mar 10, 2019 3:12 pm I am a using the BÉPO keyboard layout, a Dvorak-inspired layout for French. I play on Ubuntu 18.10.
Today I wanted to use an external blueprint, but the usual keyboard shortcuts for pasting didn't work. I tried both CTRL+V and SHIFT+Insert.
I then tried CTRL+., which matches the QWERTY CTRL+V and it works… however it pastes the text TWICE – it took me a moment to understand why blueprints were not accepted (except one for some reason). Similarly, I can cut with CTRL+Y and copy with CTRL+X.
It seems though that this topic isn't getting much attention, whereas people posting separate similar bug reports actually get them fixed. So maybe this topic isn't the best way to track them?
(note that I can perfectly understand if those issues are not a priority, but it would be better to make it clear)
-
- Long Handed Inserter
- Posts: 54
- Joined: Mon Apr 03, 2017 5:47 pm
- Contact:
Re: Keybinding issues (when remapping keys in OS)
This issue is very annoying with trying to import bluestring.
As people have explained, for some reason, the shortcut for pasting blueprint strings requires you to use ctrl + ? where ? is the key v is mapped to into qwerty. This combineason is not the same than the paste combineason you can remap in the hotkeys.
There's apparently no way to re-map that key (the paste hotkey doesn't work).
I hope we get a fix soon.
As people have explained, for some reason, the shortcut for pasting blueprint strings requires you to use ctrl + ? where ? is the key v is mapped to into qwerty. This combineason is not the same than the paste combineason you can remap in the hotkeys.
There's apparently no way to re-map that key (the paste hotkey doesn't work).
I hope we get a fix soon.
Re: Keybinding issues (when remapping keys in OS)
I am sorry for radio silence on this, the fixes required big changes and we were focusing mostly on crashes or bug reports that can be fixed quickly.
For 0.17.32:
Text boxes (and GUI in general) should fully respect keyboard layout (except for cases like 68809, it seems Windows translates scancodes to keycodes with latin characters, but Linux not ... so if we detect there is no scancode that would translate to keycode 'C', 'V', 'X', we use default US QWERTY mapping instead).
As for remapping modifier keys; if you swap keys (eg. you swap Ctrl and Caps Lock) it should work, if you map some non-modifier key as extra modifier (eg. you map Caps Lock as the third Control), it won't work.
As for escape remapping, we don't seem to have escape hardcoded anywhere anymore, everything seems to be handled by "Toggle Menu" control setting, so it should be possible to rebind it in game, I think?
For 0.17.32:
Text boxes (and GUI in general) should fully respect keyboard layout (except for cases like 68809, it seems Windows translates scancodes to keycodes with latin characters, but Linux not ... so if we detect there is no scancode that would translate to keycode 'C', 'V', 'X', we use default US QWERTY mapping instead).
As for remapping modifier keys; if you swap keys (eg. you swap Ctrl and Caps Lock) it should work, if you map some non-modifier key as extra modifier (eg. you map Caps Lock as the third Control), it won't work.
As for escape remapping, we don't seem to have escape hardcoded anywhere anymore, everything seems to be handled by "Toggle Menu" control setting, so it should be possible to rebind it in game, I think?
Re: Keybinding issues (when remapping keys in OS)
Thank you!
Factorio has been unplayable without ctrl-caps swapping (literally... I can't bend my wrist in that way to get to the ctrl key without it hurting after 20 minutes). Can't wait to do a new play through!
Factorio has been unplayable without ctrl-caps swapping (literally... I can't bend my wrist in that way to get to the ctrl key without it hurting after 20 minutes). Can't wait to do a new play through!
Re: Keybinding issues (when remapping keys in OS)
I use XKBOPTIONS="ctrl:nocaps" before which still doesn't work in the latest experimental factorio
However using XKBOPTIONS="ctrl:swapcaps" does now, as per the comment above about swapping control being supported but a third control key not being supported.
In an ideal world the keyboard shortcut window would still support using arbitrary scancodes including caps lock (0x66) as modifier keys so that people don't need to swap from nocaps to swapcaps every time they play factorio. Definitely an improvement that I can now use the caps lock key for control though.
However using XKBOPTIONS="ctrl:swapcaps" does now, as per the comment above about swapping control being supported but a third control key not being supported.
In an ideal world the keyboard shortcut window would still support using arbitrary scancodes including caps lock (0x66) as modifier keys so that people don't need to swap from nocaps to swapcaps every time they play factorio. Definitely an improvement that I can now use the caps lock key for control though.
Re: Keybinding issues (when remapping keys in OS)
I'm glad I found this tidbit! Thanks for this info, posila. I'd mapped things to ctrl:nocaps, and the preferred control key was just being ignored... but based on the above, I changed it to ctrl:swapcaps, and now things work as expected. (I only wish I'd learned earlier, so I hadn't gotten somewhat used to reaching for that other key in Factorio -- which is now CapsLock, which doesn't help! )
I will just say that if there's some way to treat any control key as a control key, that'd be nifty... but, at least I'm able to use the key to the left of a (which is at the same spot in both QWERTY and Dvorak) as control now. Yay.
Re: Keybinding issues (when remapping keys in OS)
andIssues to solve:
Handle remapped modifier keys.
So here we are, nearly 4 years after this issue was reported by the developers themselves after introducing it by themselves, and it's still not solved and not even a workaround is availableif you map some non-modifier key as extra modifier (eg. you map Caps Lock as the third Control), it won't work.
When can we expect a fix, please? It used to work in 0.16.
A lot of people use `setxkbmap -option ctrl:nocaps`, it's practically a feature of Xorg to have this remapped.
Re: Keybinding issues (when remapping keys in OS)
If you really need to keep scan code processing, can we at least please have some config file option (or better yet, a menu item), to specify which scancodes are treated as which modifiers? I'm guessing the same issue will happen if someone remaps their Alt or Shift keys.