1

I'm using xmodmap to swap control and command keys on my Macbook pro. However, periodically the key revert back to their original state and this is becoming quite annoying.

I'm on Ubuntu 13.10 and I can remember when this situation started occurring was when the system got a keyboard settings (in the system settings) update. Any ideas as to how to either:

  1. delete the keyboard settings, or
  2. stop the keyboard settings from reverting my keys?
Kulfy
  • 17,696

3 Answers3

0

I believe that gnome is reverting the caps behavior, I had this problem as well.

You can change the gnome settings with gnome-tweaks (which you can apt install if you don't have it already)

Then run gnome-tweaks, select "Keyboard and Mouse" and then "Advanced Layout Options" - and then you can choose the caps lock behavior there instead of calling xmodmap.

0

According to several sources such as this one it is due to the fact that xmodmap is not supported anymore (at least in Ubuntu). In my case, xmodmap is "reverted" when I attach my laptop to a new screen and keyboard after a suspend.

I have not found a solution that works 100%, but I put the xmomap command both in the Startup Programs and in .bashrc so that when xmodmap is reverted I can quickly fix it by opening a terminal.

aless80
  • 111
0

Does it happen when your PC goes to sleep? If so, make sure the keyboard is plugged into the PC and not the monitor. Xmodmap settings are not honored when keyboard devices are hotplugged.

con-f-use
  • 18,813
PKKid
  • 266