Page 1 of 1

Inconsitentcies with XModMap

Posted: Mon Jul 29, 2019 12:24 am
by JustAPerson
Hi,

I'm using Factorio 0.17.59 on Ubuntu 18.04 with AwesomWM instead of GNOME. I use XModMap to switch control and capslocks, and some other modifiers on my laptop for ergonomics.
Here is my `~/.Xmodmap` file:

Code: Select all

clear      lock 
clear   control
clear      mod1
clear      mod2
clear      mod3
clear      mod4
clear      mod5
keycode      66 = Control_L
keycode      64 = Super_L
keycode     133 = Alt_L
add     control = Control_L Control_R
add        mod1 = Alt_L Alt_R Meta_L
add        mod2 = Num_Lock
add        mod3 = Hyper_L
add        mod4 = Super_L Super_R
add        mod5 = Mode_switch ISO_Level3_Shift
The line `keycode 66 = Control_L` specifies that capslock should be treated as the left control key. Factorio does not respect this consistently.

When I press what is notionally the left control (physically the capslock key),it is ignored by the game keybindings, so inventory transfers etc are not working as expected. However, if I type in the chatbox and press control-backspace, a whole word is deleted as would be expected. So it appears the modifiers are respected in some cases and not in others.

Re: Inconsitentcies with XModMap

Posted: Mon Jul 29, 2019 4:18 am
by Rseding91
I believe that's working as intended. Factorio pays attention to the physical key being pressed and not what the key is mapped to.

Re: Inconsitentcies with XModMap

Posted: Mon Jul 29, 2019 5:51 am
by posila
In-game input handling assumes there is one left control and one right control, if there are multiple keys mapped to the same modifier key, only one of them will be recognized as a modifier.

65093#p423382

Re: Inconsitentcies with XModMap

Posted: Mon Jul 29, 2019 11:37 am
by JustAPerson
Posila was correct. Altering my map such that there was only 1 key mapped to left control fixed the problem.